Well.. we finally decided that we should give the MVC framework process a chance, to see if we could truly benifit from it.
I’m going to be using a simple ish MVC framework and Smarty for the templating system, this seems to be working both logically and easy for us, or fairly easy anyway.
The way im going to do this is have a main page which will control the configuration etc, and then a series of templates for each section (ill come back to this) and then modules for each section too.
What i mean by section is this.. Basically the way I see how our company runs the existing database is based on a few sections(Customers, Orders, Searching, Report).. there is more, but this is just an example, so i’ve decided to have these as our main controlling elements.
So our intranet should work on this basis: http://address/index.php?section=Customer meaning our program knows we only want to be working with whatever is involved with a Customer, the same goes for Orders, Reports and so on, keeping the whole process a lot simpler (or so i think anyway)
With this in mind, ive now got a CustomerModelController which will take aditional parameters defining which action should be performed now we’re only concerned with the customer, for instance Search for Customers.
Our intranet again shows how easy and logical this makes things:
http://address/index.php?section=Customer&action=search_for_users or add_user etc, you get the idea anyway.
These methods allow me to have custom templates for each section, and still keep my code nice and tidy, so i’ve not got 100’s of smaller functions within one big controller.
I’ve tried not to go into too much detail here, so not to confuse people/myself anymore, but if anyone wants further explanations just let me know, and ill go into more detail.
Just want to say thanks to the people who have commented on the MVC ideas so far, definately made an interesting read, cheers!