<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 10:49:11 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Handling Collections of Aggregate Roots - the Repository Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/17969</guid>
      <link>http://www.phpdeveloper.org/news/17969</link>
      <description><![CDATA[<p>
On PHPMaster.com today they have a new tutorial focusing on <a href="http://phpmaster.com/handling-collections-of-aggregate-roots/">using the Repository</a> (a part of the <a href="http://en.wikipedia.org/wiki/Domain-driven_design">domain driven design</a> architecture) to enhance your model's current functionality.
</p>
<blockquote>
Unlike mappers, though, which are part of the infrastructure, a repository characterizes itself as speaking the model's language, as it's intimately bound to it. And because of its implicit dependency on the mappers, it preserves the persistence ignorance as well, therefore providing a higher level of data abstraction, much closer to the domain objects.
</blockquote>
<p>
Included in the tutorial is the full code you'll need to create a simple UserInterface class and a User model that extends it. He also makes a UserCollection class to handle working with multiple User objects and a UserMapper to handle the actual data source fetching. Finally, he implements the Repository on top of this base structure showing how it lays on top of everything via the UserMapperInterface instance. At the end some example code showing it in use is also included - making the PDO connection, creating the UserRepository and fetching by a few different data types (email, name and role).
</p>]]></description>
      <pubDate>Thu, 17 May 2012 08:44:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tibo Beijen's Blog: DDD using Doctrine 2: A case study]]></title>
      <guid>http://www.phpdeveloper.org/news/16528</guid>
      <link>http://www.phpdeveloper.org/news/16528</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Tibo Beijen</i> <a href="http://www.tibobeijen.nl/blog/2011/06/27/ddd-using-doctrine-2-a-case-study/">presents a case study</a> about doing Domain Driven Design in an application using <a href="http://www.doctrine-project.org/projects/orm/2.0/docs/en">Doctrine2</a> to work with objects and your database.
</p>
<blockquote>
Nowadays developing web applications usually requires a flexible process due to changing business logic, shifting priorities or new insights. Besides choosing the right methodology this also requires designing the application in such a way that this flexibility can be achieved. [...] In this article I will show how to implement a specific case using Doctrine 2. Full code accompanying this article can be <a href="https://github.com/TBeijen/DDD-HRM/tree/v001">found on GitHub</a>. 
</blockquote>
<p>
He starts by describing the entities (User/TimeSheet/TimeSheetStatusChange) and how they're defined in Doctrine objects. He modifies them to build in some business-level restrictions like "status changes are only allowed in a certain order". He shows that the domain models presented are about more than just working with the database tables. They enforce rules that effect the flow of the application as well.
</p>]]></description>
      <pubDate>Tue, 28 Jun 2011 10:54:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Federico Cargnelutti's Blog: Domain-Driven Design with Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/12195</guid>
      <link>http://www.phpdeveloper.org/news/12195</link>
      <description><![CDATA[<p>
<i>Federico Cargnelutti</i> has posted <a href="http://blog.fedecarg.com/2009/03/22/zend-framework-domain-driven-design/">the latest article</a> in his "domain-driven design" series using the Zend Framework. This time he focuses on putting some of his ideas into practice.
</p>
<blockquote>
Some of the Domain-driven design concepts explained in my previous posts are applied in this sample application. I'm also going to use the Zend Framework infrastructure to speed up some development tasks.
</blockquote>
<p>
His example sets up a domain layer to interface user information for the system from a centralized repository. On top of that he builds his model extended from an abstract class called Zf_Domain_Entity. He also sets up a User collection, a User DAO and the user repository 
</p>]]></description>
      <pubDate>Tue, 24 Mar 2009 10:23:20 -0500</pubDate>
    </item>
  </channel>
</rss>
