> >
> > [% Ctrl.Search() %]
> >
> > makes Controller::Search any less a controller.
>
> You're right.  It just looks kind of odd to me, invoking a template for
> something that is not a display-related task.  It looks like the way
> people typically do MVC in Mason or Embperl, with a first template that
> doesn't do anything but invoke a module to take over the processing.
>

Embperl 2.0 can invoke such a controller (it's called application object
there) after it has setup it's request parameters (GET/POST data, session
data, etc.) and before any templates are get a chance to run. So this
application object is able to do the necessary processing and give back
parameters to Embperl so the right templates will be displayed, according to
the result of the controllers processing.

This approach has the benefit that Embperl does the tasks that need to be
done for every request, so you don't have to care about it and can
concentrate on the real controller functions. Additionaly it implements an
object orientated approach, so you can get addtional benefits by spliting up
your controllers functionality in different application objects, which
inherit from each other. (same inherence schema can be used for templates)

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



Reply via email to