Re: PHP MVC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Scott wrote:
On Thu, 2006-03-30 at 15:29 +1000, SLaVKa wrote:
Hey all, I am desiging my own MVC framework, now i know you can pass views in the string like index.php?view=displayAdmin , but what if the admin model has a choice of displaying a few views as well, like editing user, or editing product etc, how do i pass subviews, in other words is there elegant solution someone can suggest?


You could take a look at the way we do it in our MVC Framework.
Basically in the controller you set up a switch with "action" cases.
depending on the action in the query string, it will return a template.

To see it in action, go to http://fsiu.uwc.ac.za
get the code at http://avoir.uwc.ac.za/projects/nextgen/ I would
recommend doing an anonymous CVS checkout here, as we only do a new
release on Friday...

--Paul

So you only have one level of actions/views , what happens in a situation where the page you are loading has various sections which want either displayed or hidden?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux