How well does it handle a change to the @At annotation once the application is loaded? Or the addition of new pages with @At annotations?
I hope I didn't come off as dismissive ... but I am curious about how other people approach these problems and whether they take in the big picture. I'm beginning to move in the direction of providing a solution that works for a non-clustered environment, with enough information for a clustered override to be created if needed. We may see something like duplicate form submission prevention based on this. On Tue, Mar 29, 2011 at 3:20 PM, Alejandro Scandroli <alejandroscandr...@gmail.com> wrote: > You are absolutely right Howard. That's the case. All the pages are > scanned at startup time to look for the @At annotation and to build > the routes map. > If you want to avoid the "scanning" phase you can, but you will need > to contribute, one by one, all your @At annotated pages to the > Dispatcher. > I don't have any experiences with projects with hundreds of pages nor > clustering, that's why I didn't take that into account. I'm using it > and I took the time to sharing it because I thought it could be useful > for some else, there is a lot of scenarios where having this level of > customization in your URLs could be interesting even if we have to pay > a little performance penalty. Of course there are scenarios where this > shouldn't be used at all, for instance in a clustered environment. I > will add these comments to the wiki so all users are warned. > > Cheers. > Alejandro. > > On Tue, Mar 29, 2011 at 5:53 PM, Howard Lewis Ship <hls...@gmail.com> wrote: >> I've never put a feature such as this into Tapestry core, because it >> seems to me that you have to, at start up, locate and load all page >> classes to find the @At annotation (something I'd rather not do, >> because a Tapestry application might have hundreds of pages, and I >> don't want to pay that startup cost). Is that the case? If not, in a >> cluster, how to you recognize the routing for a page that has not yet >> been loaded? >> >> On Tue, Mar 29, 2011 at 12:38 AM, Alejandro Scandroli >> <alejandroscandr...@gmail.com> wrote: >>> From the same guys that brought you tapestry-exceptionpage, >>> tapestry-model, tapestry-resteasy, tapestry-security, >>> tynamo-federatedaccounts and other beautiful little modules, here >>> comes yet another beautiful little module called tapestry-routing. >>> >>> In a nutshell, tapestry-routing allows you to provide your own custom >>> mapping between Tapestry pages and URLs. >>> >>> Did you ever wanted to change the order of the path params in an URL? >>> now you can! >>> >>> Let's say you have a page: pages.projects.Members which have 2 >>> parameters in its activation context: (Long projectId, Long memberId) >>> and you want the URL for that page to look like /projects/1/members/1 >>> Just add the @At annotation to you page, like this: >>> >>> package ...pages.projects; >>> @At(" /projects/{0}/members/{1}") >>> public class Members { >>> void onActivate(Long projectId, Long memberId) >>> >>> That's it! >>> tapestry-routing Dispatcher will take care of recognizing incoming >>> requests and dispatching the proper render request >>> tapestry-routing PageRenderLinkTransformer will do the rest of the >>> work, it will transform every Link for a page render request >>> formatting it according to your route rule. >>> >>> We really need some feedback, so please give it a try: >>> http://tynamo.org/tapestry-routing+guide >>> >>> Enjoy, >>> Tynamo Team >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator of Apache Tapestry >> >> The source for Tapestry training, mentoring and support. Contact me to >> learn how I can get you up and productive in Tapestry fast! >> >> (971) 678-5210 >> http://howardlewisship.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org