[Solar-talk] Method-Based Actions
Travis Swicegood
development at domain51.com
Sat Jun 24 07:22:26 PDT 2006
Rob Allen wrote:
> Travis Swicegood wrote:
>
>> As for the naming, I've seen both done and both are legible. Ideally,
>> you won't have any methods on a controller other than the actions
>> anyhow, so the documentation argument becomes moot. Given that there's
>> reasons for both, why not handle the method mapping in an object that
>> can be replaced.
>>
>
> Configuration for configuration's sake IMO. At the end of the day it
> really doesn't matter as long as whenever you pick up a Solar app, it's
> the same convention every time...
>
Including both might be, but I would still allow the flex point. The
other option here is to hard code it, which completely locks someone
into the exampleAction() naming convention. I'm working on an OS
framework that uses the actionExample(). Not having the ability to
write my own mapper to support both method names during the transition
is one more factor I have to take into account if I were to port an
application to the Solar framework.
As far as being able to pick up a Solar app and figure out what's going
on. A long term solution might be some sort of introspection that goes
through all of the configuration values and spits out what's happening.
I've seen this used in Java apps where you can add all sorts of custom
things. Custom query languages pop into mind on JCR -
Repository::getQueryLanguages() or something like that.
-Travis
More information about the solar-talk
mailing list