<?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: The problem with Database Abstraction Layers&#8230;</title>
	<atom:link href="http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/</link>
	<description>Thoughts on PHP, MySQL and JavaScript/AJAX Web Development</description>
	<lastBuildDate>Wed, 25 Aug 2010 23:08:44 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris  Renner</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-275</link>
		<dc:creator>Chris  Renner</dc:creator>
		<pubDate>Wed, 25 Aug 2010 23:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-275</guid>
		<description>Thanks for the comments Dan.  I&#039;ve actually begun using Zend_Db in the past couple of months and its growing on me rapidly. Once you get comfortable with the syntax it is not much more trouble than writing raw SQL, and I like the prepared statement features you get when using the PDO_MySql adapter.  The inclusion of PDO was more or less from ignorance, and if I wrote the article fresh today there&#039;s quite a bit I could write differently.</description>
		<content:encoded><![CDATA[<p>Thanks for the comments Dan.  I&#8217;ve actually begun using Zend_Db in the past couple of months and its growing on me rapidly. Once you get comfortable with the syntax it is not much more trouble than writing raw SQL, and I like the prepared statement features you get when using the PDO_MySql adapter.  The inclusion of PDO was more or less from ignorance, and if I wrote the article fresh today there&#8217;s quite a bit I could write differently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-274</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 18 Aug 2010 11:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-274</guid>
		<description>&quot;Larger databases will see huge hits on performance if you try to return only primary keys for a result set, and then loop through the keys, creating an object for each&quot;

I don&#039;t know about other DALs, but Zend DB at least does not do that. If you do a fetchAll query for example, each row object is created from the data in the result set.

Also, not sure why you&#039;ve mentioned PDO as a DAL - it has more or less exactly the same functionality as the php mysql_ functions, but in an object orientated manner.</description>
		<content:encoded><![CDATA[<p>&#8220;Larger databases will see huge hits on performance if you try to return only primary keys for a result set, and then loop through the keys, creating an object for each&#8221;</p>
<p>I don&#8217;t know about other DALs, but Zend DB at least does not do that. If you do a fetchAll query for example, each row object is created from the data in the result set.</p>
<p>Also, not sure why you&#8217;ve mentioned PDO as a DAL &#8211; it has more or less exactly the same functionality as the php mysql_ functions, but in an object orientated manner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris  Renner</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-49</link>
		<dc:creator>Chris  Renner</dc:creator>
		<pubDate>Thu, 08 Oct 2009 16:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-49</guid>
		<description>Thank you.  Looks like I have some reading to do now!</description>
		<content:encoded><![CDATA[<p>Thank you.  Looks like I have some reading to do now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozef</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-48</link>
		<dc:creator>Jozef</dc:creator>
		<pubDate>Thu, 08 Oct 2009 16:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-48</guid>
		<description>I don&#039;t want to convert you to Java ;-) , I only wanted to show you that there is a tool to satisfy your needs for PHP DAL. IMHO there are 3 kinds of DAL (or DAO pattern http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html). 1. classic procedural table oriented approach based on unified database API (ADOdb or PDO) 2. simple data mappers (e.g. iBatis) 3. full featured ORM (Hibernate for Java, Propel or Doctrine for PHP). My winner is the choice 2 where i can build an OO application with a DAL under my complete control.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t want to convert you to Java <img src='http://www.chrisrenner.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , I only wanted to show you that there is a tool to satisfy your needs for PHP DAL. IMHO there are 3 kinds of DAL (or DAO pattern <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html)" rel="nofollow">http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html)</a>. 1. classic procedural table oriented approach based on unified database API (ADOdb or PDO) 2. simple data mappers (e.g. iBatis) 3. full featured ORM (Hibernate for Java, Propel or Doctrine for PHP). My winner is the choice 2 where i can build an OO application with a DAL under my complete control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris  Renner</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-47</link>
		<dc:creator>Chris  Renner</dc:creator>
		<pubDate>Thu, 08 Oct 2009 15:26:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-47</guid>
		<description>Thanks Jozef, but I don&#039;t think I can justify switching to an entirely different language just to get a good mapper layer!  Its not a problem for me in PHP, because I am comfortable writing SQL and I am not quite so hellbent on an OOP-or-nothing approach.</description>
		<content:encoded><![CDATA[<p>Thanks Jozef, but I don&#8217;t think I can justify switching to an entirely different language just to get a good mapper layer!  Its not a problem for me in PHP, because I am comfortable writing SQL and I am not quite so hellbent on an OOP-or-nothing approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozef</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-46</link>
		<dc:creator>Jozef</dc:creator>
		<pubDate>Thu, 08 Oct 2009 14:35:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-46</guid>
		<description>Hi Chris, if you would code in Java, then iBatis would be probably your choice for DAL. (http://ibatis.apache.org/) It is a pity PHP does not have such a great data mapper. The closest I have seen is SQLMapper for Prado (http://www.pradoframework.com/demos/sqlmap/) I have found another one PHP data mapper inspired by iBatis,  http://github.com/retiman/mapsicle</description>
		<content:encoded><![CDATA[<p>Hi Chris, if you would code in Java, then iBatis would be probably your choice for DAL. (<a href="http://ibatis.apache.org/" rel="nofollow">http://ibatis.apache.org/</a>) It is a pity PHP does not have such a great data mapper. The closest I have seen is SQLMapper for Prado (<a href="http://www.pradoframework.com/demos/sqlmap/" rel="nofollow">http://www.pradoframework.com/demos/sqlmap/</a>) I have found another one PHP data mapper inspired by iBatis,  <a href="http://github.com/retiman/mapsicle" rel="nofollow">http://github.com/retiman/mapsicle</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-36</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 29 Sep 2009 12:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-36</guid>
		<description>Hey Jonathan.  Thanks for reading my rantings.  I think this post is a reflection of my growing pains as a developer. We&#039;ll see if I think the same things about DALs a year from now.  The Zend links are very interesting and I plan to spend some time exploring those more thoroughly.  An upcoming project is to completely re-work an existing application that is 100% procedural.  I am considering using ZF for this since I&#039;ve not worked with it yet.

I like to build my own classes for &quot;framework&quot; tasks, mostly for self-education.  But I recognize I&#039;m to the point I probably need to be leveraging some of the existing stuff out there.</description>
		<content:encoded><![CDATA[<p>Hey Jonathan.  Thanks for reading my rantings.  I think this post is a reflection of my growing pains as a developer. We&#8217;ll see if I think the same things about DALs a year from now.  The Zend links are very interesting and I plan to spend some time exploring those more thoroughly.  An upcoming project is to completely re-work an existing application that is 100% procedural.  I am considering using ZF for this since I&#8217;ve not worked with it yet.</p>
<p>I like to build my own classes for &#8220;framework&#8221; tasks, mostly for self-education.  But I recognize I&#8217;m to the point I probably need to be leveraging some of the existing stuff out there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.chrisrenner.com/2009/09/the-problem-with-database-abstraction-layers/comment-page-1/#comment-35</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Thu, 24 Sep 2009 22:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrisrenner.com/?p=180#comment-35</guid>
		<description>I&#039;d be interested to get your opinion on Zend Framework (ZF) and its implementation of the Table Data Gateway and Row Data Gateway patterns. http://framework.zend.com/manual/en/zend.db.table.html. I tend to consider anything from Zend as the standard for PHP.

In general, I would agree that a multi-join query is significantly easier to read and write in straight SQL. I have used Zend_Db_Table_Abstract (http://framework.zend.com/manual/en/zend.db.table.relationships.html) for abstract multi-join queries, and while it works, it just isn&#039;t fun to write. I do use Zend_Db_Table_Abstract for all of my new development, but mainly for simple CRUD operations and sql escaping. Single-line inserts, updates, and deletes are very nice.</description>
		<content:encoded><![CDATA[<p>I&#8217;d be interested to get your opinion on Zend Framework (ZF) and its implementation of the Table Data Gateway and Row Data Gateway patterns. <a href="http://framework.zend.com/manual/en/zend.db.table.html" rel="nofollow">http://framework.zend.com/manual/en/zend.db.table.html</a>. I tend to consider anything from Zend as the standard for PHP.</p>
<p>In general, I would agree that a multi-join query is significantly easier to read and write in straight SQL. I have used Zend_Db_Table_Abstract (<a href="http://framework.zend.com/manual/en/zend.db.table.relationships.html" rel="nofollow">http://framework.zend.com/manual/en/zend.db.table.relationships.html</a>) for abstract multi-join queries, and while it works, it just isn&#8217;t fun to write. I do use Zend_Db_Table_Abstract for all of my new development, but mainly for simple CRUD operations and sql escaping. Single-line inserts, updates, and deletes are very nice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
