Re: What is the best practice for adding persistence to an MVC model?
| From: | David Otton | Date: | Tue, 27 Oct 2009 16:39:32 +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-299391@lists.php.net to get a copy of this message | ||
2009/10/27 David Otton <phpmail@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 article on Dependency injection
http://en.wikipedia.org/wiki/Dependency_injection