Re: [SMARTY] A question about Smarty and MVC...

From: Date: Thu, 13 Mar 2003 14:09:10 +0000
Subject: Re: [SMARTY] A question about Smarty and MVC...
References: 1 2 3 4 5  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8618@lists.php.net to get a copy of this message
Hi John, You might want to take a look at http://www.zend.com/zend/tut/tutsweatpart1.php and http://www.zend.com/zend/tut/tutsweatpart2.php which I wrote about a year ago. This is just a php script that is a framework that can encapsulate a small application within a single php script and a single template. In the context of this script. The script itself acts as the controller. The model - business logic - is cases of the first switch statement, and views are implemented in the second switch. I believe in one thread this fall Monte mentioned their standard architecture is similar, however each of the cases was broken out into a separate php script that was included in the case statement. The will lend to a better overall separation of the model and the controller that is lacking in the type of application I described in the tutorials. HTH Jason ----- Original Message ----- From: "John Wells" <jb@sourceillustrated.com> To: <sweatjejm@mchsi.com> Cc: <smarty-general@lists.php.net> Sent: Thursday, March 13, 2003 7:57 AM Subject: Re: [SMARTY] A question about Smarty and MVC... > Hmmm....but the calling script most often contains business logic, > correct? That would place it in the conceptual "Model", and not the > controller. > > Ah well, I'll have to think about this a bit more. Any additional input > is welcome. > > Thanks! > John > > Jason Sweat said: > >> Would Smarty be considered the controller? > > My answer to that questions would be no. Smarty is firmly in the "View" > > part of the model view controller paradigm. If anything, the php script > > calling the smarty object could be considered the controller, > > particularly if the script selects different data, and shows different > > templates based on context. > > > > ----- Original Message ----- > > From: "John Wells" <jb@sourceillustrated.com> > >> Thanks for the info. I've seen both phrame and php.mvc. I guess my > >> question if more general and specific to Smarty's common usage. In > >> other words, would your typical app developed with Smarty be > >> considered MVC? Would Smarty be considered the controller? > >> > >> Thanks, > >> > >> John > >> > >> > > > > > > -- > > Smarty General Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.smarty.general (#8618) next »