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

From: Date: Fri, 14 Mar 2003 03:42:34 +0000
Subject: Re: [SMARTY] A question about Smarty and MVC...
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8634@lists.php.net to get a copy of this message
Jason, Thanks for the links. I've read the articles. Goo, but I don't think they address my initial question. Let me restate it a bit: If I were to design an MVC application with Smarty/PHP, could I consider the script that accepts user input to be the controller, Smarty to be the view, and any classes the controller calls based on user input (including the business logic and database classes) to be the view? So, if I have the following code: <?php // get name from request $name = $_REQUEST["name"]; // get id from database $id = someDatabaseQuery($name); $smarty = new Smarty; > 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.

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