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 best way to link this "data layer" into MVC.
I disagree. There should be database class(es) which know how to deal with the datastore(s). This may be as simple as a thin layer over the PDO classes. The model talks to and uses the database class, and is the only component which deals with the database class. The model serves up whatever data the controller needs to feed to the view. All are welcome to disagree. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php