News Feed
Sections




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

Jani Hartikainen's Blog:
The problems faced by a common model interface in frameworks
December 18, 2008 @ 08:46:05

Jani Hartikainen looks at a certain something that's missing from several PHP frameworks offered today - a good library for working with the M (Model) in MVC:

While ZF provides data access classes in the form of Zend_Db and related components, it doesn't provide any concrete examples of how you would implement a model class. This often confuses especially beginners. Providing a common base model, or an interface for implementing models, does have certain benefits, but it also has some problems...

He defines what a good model interface should be and do before looking at the good and the bad of implementing them. A good reason to have an interface is to have a common method the classes could use rather than just using a database wrapper class. On the downside, this can also be very limiting and require you to be locked in to how that interface works without the flexibility you might be used to with a looser framework.

0 comments voice your opinion now!
problem framework model library interface common component wrapper


blog comments powered by Disqus

Similar Posts

Sanisoft Blog: Theming your CakePHP apps (V1.2)

Jim Plush's Blog: Followup on rethinking Zend Models with DDD - Framework code included

Code2Learn.com: Using HighCharts with php , MySQL and CodeIgniter

Phil Sturgeon's Blog: Benchmark 2011: A call for Participants

Pádraic Brady's Blog: Zend_Yaml Proposal added


Community Events

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


development laravel5 library framework language community extension voicesoftheelephpant release threedevsandamaybe podcast introduction opinion interview api feature wordpress series laravel unittest

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