<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: My Zend Framework Model Layer: Part Service, Part ORM</title> <atom:link href="http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/feed/" rel="self" type="application/rss+xml" /><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/</link> <description>A periodical blog of experiences from the angle of an autodidactic, paranoid and narcissistic web developer...</description> <lastBuildDate>Mon, 16 Aug 2010 12:08:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator><meta
xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" /> <item><title>By: rvdavid</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1582</link> <dc:creator>rvdavid</dc:creator> <pubDate>Sun, 09 May 2010 14:58:34 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1582</guid> <description>Hi David,Thanks for the heads up. I&#039;ll definitely check it out for inspiration and if it&#039;s complete enough, maybe I&#039;ll even use it for my service layer.Thanks again!</description> <content:encoded><![CDATA[<p>Hi David,</p><p>Thanks for the heads up. I&#8217;ll definitely check it out for inspiration and if it&#8217;s complete enough, maybe I&#8217;ll even use it for my service layer.</p><p>Thanks again!</p> ]]></content:encoded> </item> <item><title>By: rvdavid</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1581</link> <dc:creator>rvdavid</dc:creator> <pubDate>Sun, 09 May 2010 14:57:22 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1581</guid> <description>Hi Leonard,Implementing forms and cache actually worked well for me. The reason that it&#039;s not called a mapper, is that I don&#039;t see Service as a mapper.A Data Mapper deals directly with Data and Domain objects/entities, whereas I see the Service Layer as dealing with functionality. Need a form? Let the service layer do it.Need to validate a form? let the service layer do it, in ZF&#039;s case, this is done by providing a proxy method to the form&#039;s isValid($data) method.Rather than placing the logic in the controller layer, all this is encapsulated into a nice utility Service class. We avoid making the Service class from being a god class by making it specific to a controller.I would say that the Service Layer could even use Data Mappers to fetch data for the controller. Anyone correct me if I&#039;m wrong of course.One thing I did find difficult was implementing ACL into the Service Layer... Maybe I didn&#039;t look into it as much as I should have... I&#039;ve got a better head on me at this point in time so perhaps I&#039;ll revisit the ACL functionality into the Service layer.But other than that, I can vouch that I am definitely enjoying what seems to be a very nice separation of concerns between the model and controller layers... So far anyway...</description> <content:encoded><![CDATA[<p>Hi Leonard,</p><p>Implementing forms and cache actually worked well for me. The reason that it&#8217;s not called a mapper, is that I don&#8217;t see Service as a mapper.</p><p>A Data Mapper deals directly with Data and Domain objects/entities, whereas I see the Service Layer as dealing with functionality. Need a form? Let the service layer do it.</p><p>Need to validate a form? let the service layer do it, in ZF&#8217;s case, this is done by providing a proxy method to the form&#8217;s isValid($data) method.</p><p>Rather than placing the logic in the controller layer, all this is encapsulated into a nice utility Service class. We avoid making the Service class from being a god class by making it specific to a controller.</p><p>I would say that the Service Layer could even use Data Mappers to fetch data for the controller. Anyone correct me if I&#8217;m wrong of course.</p><p>One thing I did find difficult was implementing ACL into the Service Layer&#8230; Maybe I didn&#8217;t look into it as much as I should have&#8230; I&#8217;ve got a better head on me at this point in time so perhaps I&#8217;ll revisit the ACL functionality into the Service layer.</p><p>But other than that, I can vouch that I am definitely enjoying what seems to be a very nice separation of concerns between the model and controller layers&#8230; So far anyway&#8230;</p> ]]></content:encoded> </item> <item><title>By: David Weinraub</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1580</link> <dc:creator>David Weinraub</dc:creator> <pubDate>Sun, 09 May 2010 14:22:52 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1580</guid> <description>Very interesting. I have many of the same architectural issues. I still struggle with them.One interesting implementation of a service layer is in the source code to Ben Scholzen&#039;s blog:http://www.dasprids.de/It has services, which calls mappers to populate models. Services comes from a dependency injection system. It supports Acl on the services. It even has instructions for a Phing build/deployment.I have found it to be fascinating and very instructive.He has released the source code at:http://site.svn.dasprids.de/trunkCheers!</description> <content:encoded><![CDATA[<p>Very interesting. I have many of the same architectural issues. I still struggle with them.</p><p>One interesting implementation of a service layer is in the source code to Ben Scholzen&#8217;s blog:</p><p><a
href="http://www.dasprids.de/" rel="nofollow">http://www.dasprids.de/</a></p><p>It has services, which calls mappers to populate models. Services comes from a dependency injection system. It supports Acl on the services. It even has instructions for a Phing build/deployment.</p><p>I have found it to be fascinating and very instructive.</p><p>He has released the source code at:</p><p><a
href="http://site.svn.dasprids.de/trunk" rel="nofollow">http://site.svn.dasprids.de/trunk</a></p><p>Cheers!</p> ]]></content:encoded> </item> <item><title>By: Project Chronus: a Zend Framework/Dojo/Doctrine Project Quietly Launched &#171; General &#171; rvdavid: A Web Developer&#39;s Blog</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1579</link> <dc:creator>Project Chronus: a Zend Framework/Dojo/Doctrine Project Quietly Launched &#171; General &#171; rvdavid: A Web Developer&#39;s Blog</dc:creator> <pubDate>Sun, 09 May 2010 13:02:20 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1579</guid> <description>[...] Layer &#8211; as per my previous entry: &#8220;My Zend Framework Model Layer: Part Service, Part ORM&#8221; with a few tweaks included. I didn&#8217;t get a chance to include ACL into the Service [...]</description> <content:encoded><![CDATA[<p>[...] Layer &#8211; as per my previous entry: &#8220;My Zend Framework Model Layer: Part Service, Part ORM&#8221; with a few tweaks included. I didn&#8217;t get a chance to include ACL into the Service [...]</p> ]]></content:encoded> </item> <item><title>By: Matthew Turland &#187; Blog Archive &#187; Models in Zend Framework</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1561</link> <dc:creator>Matthew Turland &#187; Blog Archive &#187; Models in Zend Framework</dc:creator> <pubDate>Sat, 27 Mar 2010 00:07:32 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1561</guid> <description>[...] Service layers are another frequent topic related to models. Those aside, I mainly suggest picking a simple model that you can prototype and try several approaches to see which you prefer. If you&#8217;ve got some ZF experience under your belt, I&#8217;d be interested in hearing about your own modeling approaches and experiences and encourage you to leave a comment on this post.    Category: PHP &#160;&#124;&#160;&#160;Comment (RSS) &#160;&#124;&#160;&#160;Trackback [...]</description> <content:encoded><![CDATA[<p>[...] Service layers are another frequent topic related to models. Those aside, I mainly suggest picking a simple model that you can prototype and try several approaches to see which you prefer. If you&#8217;ve got some ZF experience under your belt, I&#8217;d be interested in hearing about your own modeling approaches and experiences and encourage you to leave a comment on this post.    Category: PHP &nbsp;|&nbsp;&nbsp;Comment (RSS) &nbsp;|&nbsp;&nbsp;Trackback [...]</p> ]]></content:encoded> </item> <item><title>By: Zend Framework Blog &#187; Blog Archive &#187; Aus den Zend Framework Blogs</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1528</link> <dc:creator>Zend Framework Blog &#187; Blog Archive &#187; Aus den Zend Framework Blogs</dc:creator> <pubDate>Thu, 04 Mar 2010 21:21:10 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1528</guid> <description>[...] RV David schreibt über seinen eigenen Model Layer mit dem Zend Framework. [...]</description> <content:encoded><![CDATA[<p>[...] RV David schreibt über seinen eigenen Model Layer mit dem Zend Framework. [...]</p> ]]></content:encoded> </item> <item><title>By: Leonard Dronkers</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1514</link> <dc:creator>Leonard Dronkers</dc:creator> <pubDate>Wed, 24 Feb 2010 12:31:12 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1514</guid> <description>I belie in the evolution: “Gateway to the Domain” =&gt; “Service Class” =&gt; &quot;Mapper&quot;Actually, I believe that is where we stand right now! Looking at developments in the zend framework and a &#039;best practice example&#039; in the quick start tutorial download. http://framework.zend.com/demo/ZendFrameworkQuickstart.zipI Also believe that this reflects the ideas in the refered post about the Model Infrastructure by Matthew Weier O&#039;Phinney (d.d. December-2008)
http://weierophinney.net/matthew/archives/202-Model-Infrastructure.htmlI don&#039;t know about adding the functionality for Acl, Forms, Cache etc to a Mapper/Service class. That particular code would get toooo Hot ;)</description> <content:encoded><![CDATA[<p>I belie in the evolution: “Gateway to the Domain” =&gt; “Service Class” =&gt; &#8220;Mapper&#8221;</p><p>Actually, I believe that is where we stand right now! Looking at developments in the zend framework and a &#8216;best practice example&#8217; in the quick start tutorial download. <a
href="http://framework.zend.com/demo/ZendFrameworkQuickstart.zip" rel="nofollow">http://framework.zend.com/demo/ZendFrameworkQuickstart.zip</a></p><p>I Also believe that this reflects the ideas in the refered post about the Model Infrastructure by Matthew Weier O&#8217;Phinney (d.d. December-2008)<br
/> <a
href="http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html" rel="nofollow">http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html</a></p><p>I don&#8217;t know about adding the functionality for Acl, Forms, Cache etc to a Mapper/Service class. That particular code would get toooo Hot <img
src='http://www.rvdavid.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Federico</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1145</link> <dc:creator>Federico</dc:creator> <pubDate>Tue, 26 Jan 2010 10:53:14 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1145</guid> <description>Hi David,The Repository is a type of Service, but has nothing to do with the Service Layer. Repositories are part of the Domain Layer. The Repository provides a higher level of data manipulation, acts as a link between the Domain and Persistence Layers (Entity  DAO). The Repository pattern is a very common pattern, and most ORMs use it.Service classes are not part of the Domain or Persistence Layers and therefore do not provide methods to access data, such as dynamic finders. Dynamic finders are usually found in the Repository.Some people get confused when they use an ORM for the first time, because they think that ORM is a pattern, and it&#039;s not. Mapping relationships is just a technique that uses different patterns to solve the problem of converting data between incompatible systems, e.g. DataMapper, DAO, Factory, Repository, Service Locator, etc.</description> <content:encoded><![CDATA[<p>Hi David,</p><p>The Repository is a type of Service, but has nothing to do with the Service Layer. Repositories are part of the Domain Layer. The Repository provides a higher level of data manipulation, acts as a link between the Domain and Persistence Layers (Entity  DAO). The Repository pattern is a very common pattern, and most ORMs use it.</p><p>Service classes are not part of the Domain or Persistence Layers and therefore do not provide methods to access data, such as dynamic finders. Dynamic finders are usually found in the Repository.</p><p>Some people get confused when they use an ORM for the first time, because they think that ORM is a pattern, and it&#8217;s not. Mapping relationships is just a technique that uses different patterns to solve the problem of converting data between incompatible systems, e.g. DataMapper, DAO, Factory, Repository, Service Locator, etc.</p> ]]></content:encoded> </item> <item><title>By: Federico</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1124</link> <dc:creator>Federico</dc:creator> <pubDate>Mon, 25 Jan 2010 17:36:42 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1124</guid> <description>Hi Paul, I&#039;m using the Repository pattern as well:app/controllers
app/daos
app/domain
app/persistence
app/repositories
app/services
app/viewsI really like GORM, and even though they got rid of the Repositories and DAOs, it allows you to build complex domains using a DDD approach.I haven&#039;t got that far yet, I&#039;m still using these two patterns:http://fedecarg.codepad.org/9iWX4l7e</description> <content:encoded><![CDATA[<p>Hi Paul, I&#8217;m using the Repository pattern as well:</p><p>app/controllers<br
/> app/daos<br
/> app/domain<br
/> app/persistence<br
/> app/repositories<br
/> app/services<br
/> app/views</p><p>I really like GORM, and even though they got rid of the Repositories and DAOs, it allows you to build complex domains using a DDD approach.</p><p>I haven&#8217;t got that far yet, I&#8217;m still using these two patterns:</p><p><a
href="http://fedecarg.codepad.org/9iWX4l7e" rel="nofollow">http://fedecarg.codepad.org/9iWX4l7e</a></p> ]]></content:encoded> </item> <item><title>By: rvdavid</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comment-1093</link> <dc:creator>rvdavid</dc:creator> <pubDate>Sun, 24 Jan 2010 11:28:49 +0000</pubDate> <guid
isPermaLink="false">http://www.rvdavid.net/?p=307#comment-1093</guid> <description>Your advice is precisely fitting in with my train of thought.I&#039;ve experienced the example you gave when you were making a point about how there are no good answers and I did as Fowler suggested - err on the side of consistency.Thank you for contributing. Please keep in touch.</description> <content:encoded><![CDATA[<p>Your advice is precisely fitting in with my train of thought.</p><p>I&#8217;ve experienced the example you gave when you were making a point about how there are no good answers and I did as Fowler suggested &#8211; err on the side of consistency.</p><p>Thank you for contributing. Please keep in touch.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 2/10 queries in 0.005 seconds using disk

Served from: www.rvdavid.net @ 2010-09-10 20:51:56 -->