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:
Food for thought utilizing models in MVC
December 08, 2008 @ 10:26:15

Jani Hartikainen has posted some food for thought to his blog today concerning models in a typical Model-View-Controller (MVC) setup.

"What is a model" and "Is Zend_Db_Table a model" seem to be asked once in a while on #zftalk. Frameworks say they have a full model available, thus they are MVC frameworks ORM libraries say they generate models. It seems the ActiveRecord pattern has become somewhat synonymous with model.

He points to a post from Padraic Brady on the subject and talks about how one might put it into practice. He admits to making a controller action just to get data from the database into a view, but offers a "more correct" alternative - a view helpers that creates a model instance your view scripts can use directly without the controller in between.

0 comments voice your opinion now!
mvc modelviewcontroller database access view helper instance


blog comments powered by Disqus

Similar Posts

Lorna Mitchell's Blog: Building A RESTful PHP Server: Output Handlers

Community News: PerlCoders and PHP Labs Marge (with Promotion)

Damian Sromek's Blog: [How to] Run PHPUnit tests using database 10x faster

O\'Reilly: Designing a database-driven PHP App? Don\'t Forget the Data!!

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 4: The View Factory


Community Events

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


unittest introduction framework php7 library community version language extension development laravel api interview video release voicesoftheelephpant series laravel5 podcast opinion

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