News for hackers. Stuff that matters.
Re:Recess PHP Framework Public Preview by KrisJordan on Friday December 26, 2008 @07:15AM (#410126)
Thanks for the feedback. The belief is that though this practice may feel uncomfortable at first it should make things easier to mange in large applications. The premise is routes don't exist without a controller and method to route to - so why duplicate that information in another place? With routes stored somewhere else if you want to change a method name in a big app (especially one you're not the sole author of) there is an extra step of finding all the places that method name was potentially referenced. Routes in controllers is an attempt at being more DRY than routes.rb and less raw than Django's list of regexps.

For what its worth Rails actually generates code with comments that give examples of routes in its controllers: http://tinyurl.com/5jstgu

Regarding not having to register, here are links directly to the bits: http://news.ycombinator.com/item?id=410119

There are no comments on this comment yet.