Re: QuickForm and MVc
| From: | Justin Patrin | Date: | Mon, 12 Jul 2004 18:04:24 +0000 |
| Subject: | Re: QuickForm and MVc | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13663@lists.php.net to get a copy of this message | ||
On Mon, 12 Jul 2004 14:16:45 +0200, Bertrand Mansion
<bmansion@mamasam.com> wrote:
> Don Fitzsimmons wrote:
>
> >Can HTML_QuickForm work in an MVC framework like Phrame. I use Phrame
> >and Smarty together a lot and I don't see how I could separate form
> >actions from normal actions using quickform. Has anyone on the list
> >used these two together?
>
> I'd say that using Smarty is not really MVC for a start so the first question
> you should ask yourself is : "Is using Smarty for MVC ok ?" and the answer would
> be no, because Smarty adds logic to your View so MVC is broken from the ground
> up :)
>
[snip]
It was my understanding that each of the three components can still
have code and logic as long as it pertains to its function. For
instance, it's fine for the view to use code to choose the part of the
navigation to highlight based on the current page. If you're putting
that code in the model or controller, you're putting view code not in
the view.
Of course you can put M and C conponents in Smarty if you want, but
that's your choice as a developer. You can never completely force
seperation of the three components inless you as a coder force
yourself to. The code will always let you do anything anywhere.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--