Re: What is the best practice for adding persistence to an MVC model?
| From: | Paul M Foster | Date: | Tue, 27 Oct 2009 16:39:12 +0000 |
| Subject: | Re: What is the best practice for adding persistence to an MVC model? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299389@lists.php.net to get a copy of this message | ||
On Tue, Oct 27, 2009 at 04:11:32PM +0000, David Otton wrote:
> 2009/10/27 Paul M Foster <paulf@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 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
>
> Paul, you already did this in one of Eric's threads a couple of weeks
> back, and the best you could come up with when pressed was "Probably
> not a great example, but...". Is it really necessary to rehash this?
I don't track threads closely enough to know if it's the same OP on this
thread. Apologies if I'm repeating myself.
I don't recall anyone disputing my example, nor any effective rebuttal
at all. And by the time I finished writing that email, I thought it was
a better example than I originally believed.
Paul
--
Paul M. Foster