News Feed
Sections




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

Marcelo Gornstein's Blog:
Writing PHP applications with Doctrine2 as ORM and Ding as DI container
January 31, 2012 @ 08:59:18

In a recent post Marcelo Gornstein takes a look at using dependency injection with Doctrine2 using his Ding container.

This article will show how we can develop software in php with a nifty design and architecture, and very much like other languages like java, using an ORM and an AOP, DI, Events container. I will assume you've read (or at least took a quick look) at this article that explains the tree layout used throughout the code, and that you have some basic knowledge of Doctrine2 and used it before on your own.

He starts with the result - an easy to use, self-contained (and decoupled) system for accessing the Doctrine2 instance. It's event-driven and uses Aspect-oriented programming to mange interactions between components (or as he calls them "beans"). Code is included for the entire process for a logger, the User entity, entity manager, user repository and transactional aspect. You can find the complete source for his example on his github account.

0 comments voice your opinion now!
dependency injection di tutorial doctrine ding orm aspectoriented


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Integrating Propel with the Zend Framework

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

Pathfinder Blog: PHP Spam Injection First Aid with Apache ModSecurity

ProDevTips.com: Ajax, ZF and Smarty feed reader - part 1

IBM developerWorks: Understanding the Zend Framework,Part 4: When there is no feed, Zend_HTTP_Client


Community Events





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


language unittest series introduction composer laravel conference list voicesoftheelephpant version symfony configure release community podcast interview opinion api framework threedevsandamaybe

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