News Feed
Jobs Feed
Sections




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

Rob Allen:
Objects in the model layer Part 2
April 02, 2013 @ 11:55:50

Rob Allen previously posted about some of his practices around the different types of objects in the model layer of his Zend Framework 2 applications. In this latest post he follows up and shares some example code for the different types.

I previously talked about the terms I use for objects in the model layer and now it's time to put some code on those bones. Note that,as always, all code here is example code and not production-ready.

He includes sample classes related to his "books" examples - a "book" entity (with title, author, id and ISBN), a mapper object to load/save/delete the entity and a service object that provides an interface for the entity to the rest of the application.

0 comments voice your opinion now!
object model layer entity mapper service interface book


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Zend Framework: Surviving The Deep End - Performance Optimisation

PHP-Coding-Practices.com: Making CakePHP's Pagination work with Model::expects()

DevShed: Introducing Builder Objects in PHP 5

Christopher Kunz's Blog: Review: Serendipity - Individuelle Weblogs fur Einsteiger und Profis"

DevShed: Enforcing Object Types in PHP - Filtering Input Objects in PHP 4


Community Events











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


install security hack overview application hhvm package framework opinion facebook series language release code composer podcast component unittest symfony2 introduction

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