Re: MVC and PHP
| From: | Justin Patrin | Date: | Tue, 03 Feb 2004 17:32:27 +0000 |
| Subject: | Re: MVC and PHP | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25444@lists.php.net to get a copy of this message | ||
Dirk Zimmermann wrote:
Hi, is there work on a PEAR MVC framework currently in progress? I'm familiar with Phrame, but I see chances to simplify it greatly, building and relying on other PEAR packages like HTML_Quickform. Some of my ideas: - Only specify basic mappings from URLs to actions. - No forwards to specify, any action can forward to any other action. - Internally, only actions are referenced, no URL paths. - Very minimal bootstrapping code for the controller, no exceptions inFirst, please do not reply to a previous message then alter it to be a new message. That screws up threading (meaning I see your post as part of someone else's post, so it would be easy to accidentally ignore it). Create a new message instead. As for MVC, it seems like what you want is some kind of simple URL rewriting engine, not an MVC framework. IMHO, I don't really need a framework to build upon, I can just use pre-existing components and write a little glue. The only thing I could see for added framework would be a controller architecture, but there is already HTML_QuickForm_Controller (it does the "action" baed on URLs, sounds like what you want). For example, in a recent project, I created my own controller classes which fit the project (simple state machine + sub-controllers), created a few classes which used DB_DataObject for the Model, then used Smarty for the View. The Controller(s) would look at the $_REQUEST and $_SESION vars, modify the model as was needed, then choose which smarty template to use. Then Smarty took over and displayed its template. -- paperCrane <Justin Patrin>the MVC.- Use your own form validation (HTML_Quickform ...) Any input on that greatly appreciated! Dirk