advice on implementing a controller manager
I am writing an application following MVC with Perl Apache modules and the Template Toolkit. Apache is 1.x. I would like to have just one entry point to the application, which would play the role of someone who sets everything necessary up and forwards the actual request to a selected handler. From what I have read, looks like implementing that controller as a PerlFixupHandler which would use push_handlers() and pass things via pnotes() would be fine, but I am not experienced in mod_perl. Would you suggest a different approach? fxn -- s;$;Barcelona Perl Mongers;;$/=$||gaudi||3;map$,+=(split//)*(-1)**$|++, (split)[.11_09,1.714];$.=$!!~m~erce~;$=y~catalunya~~,$;=y~rambles~~,$* =$/^$.;$:=$.+length,[EMAIL PROTECTED]/**$*%$:,$%=$/*$-$*;print+chr($_0xA?$. .$[$_:m:^$.:?$.$_:$_)for($**($**$%-$//$/),$%-$*,$,*$/,$***$***$*,$* **$,,$[EMAIL PROTECTED]/,$**$,,$;,$***$***$*,$***$*,$.,$**$,$***$,,$***$***$** $,,$.,$*$*,$+$.,$***$,,$,-$.,$[EMAIL PROTECTED]/,$;*$/**$*,$,$.,[EMAIL PROTECTED])
Re: advice on implementing a controller manager
Xavier Noria wrote: I am writing an application following MVC with Perl Apache modules and the Template Toolkit. Apache is 1.x. I would like to have just one entry point to the application, which would play the role of someone who sets everything necessary up and forwards the actual request to a selected handler. From what I have read, looks like implementing that controller as a PerlFixupHandler which would use push_handlers() and pass things via pnotes() would be fine, but I am not experienced in mod_perl. Would you suggest a different approach? A word of advice: if you'd like to use it under different web environments, create your own system for registering/calling handlers instead of using the Apache API. That is, have a map of URL-to-class and have your controller find the class to execute based on the URL and call it directly. This is how OpenInteract does it and it's saved quite a lot of grief. It also makes for nice decoupling which is always a good thing. Of course, you could use OpenInteract as an MVC framework that uses the Template Toolkit, but that's a different matter... :-) Chris -- Chris Winters ([EMAIL PROTECTED]) Building enterprise-capable snack solutions since 1988.
RE: advice on implementing a controller manager
Hi Chris -- A word of advice: if you'd like to use it under different web environments, create your own system for registering/calling handlers instead of using the Apache API. That is, have a map of URL-to-class and have your controller find the class to execute based on the URL and call it directly. This is how OpenInteract does it and it's saved quite a lot of grief. It also makes for nice decoupling which is always a good thing. If you want a unique URL which points to a particular perl class, you could also use CGI::Application. It was built to run under mod_perl, and solve exactly this problem. TTYL, -Jesse- -- Jesse Erlbaum The Erlbaum Group [EMAIL PROTECTED] Phone: 212-684-6161 Fax: 212-684-6226