On Sep 8, 2009, at 9:52 AM, Szabolcs Heilig wrote:

> After reading that i'm imagining a helper system where symfony form  
> helpers,
> link helpers, etc will be in helper classes. These classes can be  
> inherited
> by AJAX, Lightbox link helper classes and  use and extend codebase  
> of the basic
> link helpers, etc.
> In this case you only have to change the class before the link_to()  
> helper
> method to open your link in a lightbox instead.
>
> I think it will be a big win against the loss of longer helper calls  
> in the template code.

How is changing sfUrl::link_to() to myUrl::link_to() any better than  
changing link_to() to my_link_to()?  It's the same amount of work and  
the same amount of testing.  It's just that one has been wrapped in  
class boilerplate to namespace it.

Helpers are part of the view, and are by definition orthogonal to the  
controller.  They will need to go through the same gyrations to access  
request/response objects or the context or the controller whether in a  
class or not.

Changing helpers to be based on classes has been brought up several  
times in the past.  I've not seen any compelling arguments as to /why/  
using classes for helpers is better.  It just means more typing.

--
Jacob Coby







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to