[Catalyst] Re: Catalyst Digest, Vol 4, Issue 6
sri at oook.de
Mon Jun 6 21:02:16 CEST 2005
Am 06.06.2005 um 19:24 schrieb Justin Tocci:
>> Am 06.06.2005 um 17:25 schrieb Justin Tocci:
>>> This is exactly what I'm saying. Ideally, the controller should go
>>> to a different component to get the business logic, where all the
>>> business logic and only the business logic lives. I don't want this
>>> to get political, so... consider the example below.
>> What exactly do you mean with "business logic"?
> Whatever is left over after making your components generic and
> completely reusable. Back to the "title on the list page" example,
> business logic is the code that would determine what the title is
> by the table name, or set the title manually by assignment.
>> Actually it looks like you want to build a Maypole like application
>> based on Catalyst,
>> which provides a big n messy config file for "business logic",
> Ugh. Don't know Maypole well enough to answer that but I hope not.
>> something we all know (and hate) from the Java world... do i
> Kind of works like a Java config file, I guess. *cringe*
> Format would not be the same though. Would be more like this:
> Rule 1:
> --> variable needing value
> --> priority level
> --> scope (under what conditions does this rule count)
> --> logic to use to determine value (expression) OR manually
> set value ($name='John')
> Rule 2: etc...
> First the rules would be searched for which rules concern the
> variable in hand, of those, the highest priority rule would be
> checked for scope. If the scope was true, then the logic in that
> rule would determine the value for that variable and the controller
> would move on, if not, the next highest priority rule would be
> checked for scope, etc... until done.
> Some would likely refer to it as big n messy I'm sure. I think it
> could be implemented neatly but that's me.
I understand now, and my suggestion would be "forget it!", but thats
just me. ;)
It may sound interesting at first to build a complete application
based on some config parameters.
But face it, you would need a shitload of params! You will implement
a mini language to handle flow control, it will get very messy and
you'll end up with bigger config files than struts! :)
Perl people will always want to use Perl to define their logic, thats
what Catalyst is all about, it's only purpose is to assist you with
that, but it stays out of your way, while your approach forces one to
use your rules for everything.
Actually i'm more interested in something obra, autrijus, me and some
others have been drooling about, continuations based webapps, which
seems just great in combination with Ajax... (see Continuity on cpan
More information about the Catalyst