[Solar-talk] Method-Based Actions

Antti Holvikari anttih at gmail.com
Sat Jun 24 16:25:35 PDT 2006


On 6/23/06, Paul M Jones <pmjones at ciaweb.net> wrote:
> Hi guys,
>
> We had a talk about file-based controller actions vs. method-based
> actions back in March, starting with the Solar 0.14.0 release
> discussion and continuing into a new thread:
>
>      http://mail.killersoft.com/pipermail/solar-talk/2006-March/
> 000693.html
>
>      http://mail.killersoft.com/pipermail/solar-talk/2006-March/
> 000712.html
>
> Everyone in those threads except me figured that methods were the
> better approach, for various reasons: Antti, Arnaud, Matthew, and
> Travis.  Guys, you were right: methods are better for a number of
> reasons, which I will detail below.

Dude, this is great! I've been struggling with my own implementation
to make possible to group those method based actions to separate
files/classes. I'm sorry I have been off from the net and I'm still
with a GPRS connection so I haven't been able to study your
implementation but have you thought about this issue? Basicly the
problem is with Solar's config mechanism (which is beautiful) :-). If
you group those classes using the "standard" way you can't apply
config keys for them since they're never instantiated. If you try
grouping like Zend does with the 'controllers' directory you end up
with a mess with all sorts of dispatchers (hello Zend :-), so that is
not a good option nor is that the "solar way" ;-). But as we discussed
before it would be good to be able the scatter the actions for
multiple files so that you don't end up with a class with 100 methods.
Otherwise, the controller looks very clean and powerful! /me likes

Again, sorry if this has been solved already.

For the naming conventions, I'd prefer 'Action' appended, but
obviously you already made the decision, maybe I can live with it ;-).

-- 
Antti Holvikari <http://antti.dotgeek.org/blog>
Zend Certified Engineer (ZCE)


More information about the solar-talk mailing list