[ILUG-Webdev] php, smarty and mvc

Donncha O Caoimh donncha.ocaoimh at tradesignals.com
Fri Mar 28 12:16:41 GMT 2003


I've just posted my first attempt at creating an MVC registration page at 
http://blogs.linux.ie/xeer/archives/p/89490179/more/1/c/1
It's only the code (doesn't include the Smarty html templates) and my first 
attempt so I don't expect it to be that great. It works though and I have a 
little sample running on a server here.

To make it more flexible I'll make the model and view classes into parameters 
I pass to the controller. That'll let me use the one registration controller 
for other pages which require different view and model classes. 
This is only a simple implementation of this design. It does not mean I can 
create one controller and use it to control all my registration pages but it 
looks neat, and relatively tidy. (I've gone down the road of creating God 
classes already, and they've become very unwieldy!)

Since I've also created an online editor to edit Smarty templates it means our 
marketing guy can decide which fields should be on any particular form 
without bothering me!

Comments anyone?

Donncha.


More information about the Webdev mailing list