Hi Eric,
IMO, controllers shouldnt be responsible for interacting models and
datastoreres. Controllers might only change the datastore class of a model.
You may use your models in lots of controller functions. Defining datastore in
all controllers seems not a good practice. (too much
I take a different approach :
// In the MainHandler
Define('StorageClassName',_MySQL);
Class UserController {
function __construct($objDataStore=false){
if(!$objDataStore)
$this-DataStore = new
instanceof($this).STORAGECLASSNAME ;
}
On Tue, Oct 27, 2009 at 05:27:07PM +1100, Eric Bauman wrote:
I'm in the process of implementing an ultra-light MVC framework in PHP.
It seems to be a common opinion that the loading of data from a
database, file etc. should be independent of the Model, and I agree.
What I'm unsure of is the
2009/10/27 Paul M Foster pa...@quillandmouse.com:
On Tue, Oct 27, 2009 at 05:27:07PM +1100, Eric Bauman wrote:
I'm in the process of implementing an ultra-light MVC framework in PHP.
It seems to be a common opinion that the loading of data from a
database, file etc. should be independent of
On Tue, Oct 27, 2009 at 04:11:32PM +, David Otton wrote:
2009/10/27 Paul M Foster pa...@quillandmouse.com:
On Tue, Oct 27, 2009 at 05:27:07PM +1100, Eric Bauman wrote:
I'm in the process of implementing an ultra-light MVC framework in PHP.
It seems to be a common opinion that the
2009/10/27 David Otton phpm...@jawbone.freeserve.co.uk:
If you go with the first approach, you're writing code that you and
anyone who comes after you can write useful tests for. The others, and
you're denying maintenance programmers a useful tool.
I should have lead with this: the wikipedia
6 matches
Mail list logo