On Jan 15, 2008 10:38 AM, Max Ischenko <[EMAIL PROTECTED]> wrote: > On Jan 14, 2008 9:52 AM, Mike Orr <[EMAIL PROTECTED]> wrote: > > > > I've finished my Routes 2 spec. > > > > http://wiki.pylonshq.com/display/routes/Routes+2+Spec > > > > It defines a minimum functional spec, and optional features that can > > be added. This is to guide the > > implementation to make sure the core is robust. It also allows us to > > decide which features to support. > > > > 1. Mapper.connect('foobar') looks both simpler and more explicit than > RouteMap.foobar. Why this "magic"?
I just had a chance to look at the Routes 2 spec, and this was my first thought as well. Having route names as attributes on the RouteMap object will be very confusing since the methods used to manipulate the RouteMap will be indistinguishable from the routes themselves. RouteMap.add("foobar", ...) or RouteMap.connect("foobar", ...) is clearer. You also risk name conflicts with RouteMap.foobar - what happens if I want a route called "fail" or "redirect"? I think with respect to the default routes and route minimization, explicit is better than implicit. If users want "/{controller}/{action}/{id}" with defaults and minimization, there should be three routes defined, for "/{controller}", "/{controller}/{action}" and "/{controller}/{action}/{id}". When a user creates a new project via paste, these routes can be setup for him. I do like the redirect / failure routes. Cheers, Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~----------~----~----~----~------~----~------~--~---