Previously Ben Bangert wrote: > On Apr 28, 2009, at 2:43 PM, Wichert Akkerman wrote: > > >If you decide to use zope.component a controller could be a named > >utility. You could then register it like so: > > > > class BaseController(object): > > """This is the standard Pylons base controller class.""" > > implements(IPylonsController) > > > > > > class MyController(BaseController): > > """My very own controller.""" > > > > registerUtility(MyController, name="my_controller") > > Yikes! :)
Why the yikes? The only change for a Pylons user is adding a single line to register the controller. The interface that is used to manage the registrations can be hidden in the BaseController class and internal pylons logic - people may never need to know about it. This gives you a lot of extra flexbility and pluggability, at the expense of asking people to add a single line of code for each controller. Wichert. -- Wichert Akkerman <wich...@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---