[Catalyst] Program the logic
Matthieu Codron
matthieu at codron.org
Sat Jul 1 11:32:20 CEST 2006
Nilson Santos Figueiredo Junior a écrit :
> On 6/29/06, Matthieu Codron <matthieu at codron.org> wrote:
>> This does not matter much in most cases except big projects where
>> business logic elements are reused in various situations around the
>> application.
>
> Then you put that logic in external regular Perl modules and make your
> controllers just use them. Pretty simple.
Sure, but I think it's cleaner to call a service (or a model) by doing
$c->model('...') (or $c->service) than to instantiate your service
directly.
Actually, after reading Matt S Trout's post, I can't think of anything
$c->service would need that $c->model doesn't have :)
--
Matthieu
More information about the Catalyst
mailing list