[Solar-talk] Method-Based Actions
Paul M Jones
pmjones at solarphp.com
Sat Jun 24 07:47:47 PDT 2006
On Jun 24, 2006, at 9:22 AM, Travis Swicegood wrote:
> Rob Allen wrote:
>
>> 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..
Have to agree with Rob here; consistency is a big deal to me.
> 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.
I can't speak to porting applications in or out of Solar; again, I
really like the idea of all Solar apps looking more or less
identical; I think a common vocabulary and set of expectations goes a
long way to ease of learning and ease of use.
> 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.
That's fine for the long-running app instances that Java provides,
but in a shared-nothing architecture like PHP, the introspection has
to happen on every request, which can be terribly slow in relation to
everything else. Yeah, you could cache it after the first
introspection and read the cache, but even so I think that particular
tradeoff (speed for flexibility) is not one I'd like to make right now.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list