News Feed
Sections




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

Zend Developer Zone:
Introduction to DataModeler
September 01, 2010 @ 08:49:31

On the Zend Developer Zone today there's the first part of a series from Vic Cherubini about an ORM tool he's created to make pulling data from your database of choice (via PDO objects) simpler - DataModler. This first part looks at creating testable models.

DataModeler allows you to create easily testable Models that are not dependent on any datasource. The majority of your logic should take place in the Model, and not the Controller (making your application even easier to test as data sources can be mocked). I try to keep my code as simple as possible, so DataModeler is fairly small.

He talks about how the DataModler tool uses dependency injection and how one primary namespace (DataModlerModel) contains the bulk of the code. He includes code samples showing how to create a simple mode, give the attributes data types and access them via magic "set" and "get" methods. For more information on this ORM tool, check out the latest source on github.

0 comments voice your opinion now!
introduction datamodler orm layer database tdd


blog comments powered by Disqus

Similar Posts

NuoDB.com: Using NuoDB from the PHP Zend Framework

Zend Developer Zone: Security Tip: Use a Database Abstraction Layer to help prevent SQL Injection

WebReference.com: XML and PHP Simplified - XML,PHP and the Database

DevShed: Performing Basic Tasks with MySQL 4.1 and Above, using mysqli with PHP 5

PHP Thinktank Blog: PHP-GTK with scottmattocks (IRC Talk Series)


Community Events





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


framework library composer version podcast example interview voicesoftheelephpant introduction symfony series language conference community opinion security release laravel list tool

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