[Phpwm] MVC in PHP

David Goodwin david at codepoets.co.uk
Tue May 16 11:47:39 BST 2006

> At the PHPWM meeting it was interesting to learn more about the Smarty
> templating system, especially the fact that it is being used in large scale
> applications. Smarty is something that I had never serious considered using
> before. I have decided now is a good time to reflect on how I write my PHP
> applications and the pro's and con's of alternative techniques.

I'm glad it was of use (my talk and resulting discussion)

> For those of you that do use MVC do you use a formal prewritten framework or
> have you invented/written your own?

I've looked at a number (symfony, cake) but I always seem to think "But
I want to be able to do this....." or "I don't want to have to have a
serial field as a primary key for each table"....  or "how can that
framework map onto this legacy data..."

So, so far, we've just built up a number of functions and suchlike that we use 
to make our lives easier (e.g. functions to fetch stuff out of
$_POST/$_GET/$_REQUEST with automatic sanitisation, using Smarty, functions to 
make database queries more concise etc) - most of these are all 'we keep
repeating the same code for this, so let's make a function to do it for

I'm tempted to do something, but I don't know if it would get called a
framework. What we use at the moment isn't readily portable across 
different projects - so fixing a bug in one project probably means another 
project needs the same patch.


David Goodwin 

[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk       ]

More information about the Phpwm mailing list