> But one thing I hate, hate, hate is "helper" code that is also needed
> regularly in the controller or model layer. Loading helpers there is a
> pain in the ass, and it would be much more convenient to just call a
> static class method. This is why most of the more generic helper-like
> functionality in pkToolkit is in the form of static class methods.


Thanks, Tom. The project I've been working on has been using helpers
as the place to put all re-usable code. Most of these helpers are used
in the actions classes, instead of the view layer. I like the idea of
transforming these helpers into static class methods. That seems more
OOP to me, more in keeping with the framework's goals.




On Sep 8, 9:14 am, Tom Boutell <[email protected]> wrote:
> The short answer is that Rails does it that way, and Symfony began
> life as a Rails clone (though it has evolved considerably since then).
>
> Longish answer... as long as helpers are really, truly
> view-layer-specific code you will never, ever want to call from the
> controller layer, the helper loading mechanism is pretty convenient.
> And it might allow for some interesting override mechanisms that
> haven't yet been exploited without the need for tedious
> ->getInstance()-> calls all over the place.
>
> But one thing I hate, hate, hate is "helper" code that is also needed
> regularly in the controller or model layer. Loading helpers there is a
> pain in the ass, and it would be much more convenient to just call a
> static class method. This is why most of the more generic helper-like
> functionality in pkToolkit is in the form of static class methods.
>
> --
> Tom Boutell
> P'unk Avenue
> 215 755 1330
> punkave.com
> window.punkave.com
--~--~---------~--~----~------------~-------~--~----~
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