News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Travis Swicegood's Blog:
Repository Pattern in PHP
November 21, 2007 @ 10:21:00

In a new post to his blog, Travis Swicegood talks about design patterns, specifically the use of the Repository style in an application:

Josh [Eichorn] argued at the time that dealing directly with the database was a better option. [...] His argument won me over, and until this past week I've viewed that as probably the most sane way to go. [...] Now, what started out as the simplest solution has morphed into this unrecognizable mishmash of SQL, code and convention.

He points out some of the issues that this sort of approach can bring up and how the Repository patten can help to make it a bit more manageable. It makes it simple to add the parameters needed for the query (via filters).

0 comments voice your opinion now!
repository designpattern sql database filter repository designpattern sql database filter


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: PHPUnit Fundamentals: Setting Up and Tearing Down a Doctrine 2 Database

PHPEverywhere: New Improved Yummy ADOdb Session Handler

SitePoint PHP Blog: Build a Database with Eloquent, Faker and Flysystem

PHPMaster.com: PHPFog is Coming to an End - But Donít Panic!

Christopher Kunz's Blog: Warning about the article "SQL Injection" in current "PHP Magazin"


Community Events

Don't see your event here?
Let us know!


list podcast laravel example api project symfony composer community application interview language php7 series opinion introduction part2 programming yii2 framework

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework