<?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"
	>
<channel>
	<title>Comments on: What Should An ORM Offer?</title>
	<atom:link href="http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/</link>
	<description>Stuart Herbert's PHP Blog - Architecture, Code, and Hosting</description>
	<pubDate>Sat, 05 Jul 2008 20:44:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Alvaro Carrasco</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-21510</link>
		<dc:creator>Alvaro Carrasco</dc:creator>
		<pubDate>Sat, 24 May 2008 00:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-21510</guid>
		<description>- Transparent. No 'extends ActiveRecord', or 'extends Persistent', or ::save() methods on my entities.

- Entities that look good when you 'print_r' them. When I print_r or var_dump an entity it should only show what I expect there: the entity properties. No database configuration, mappings, connection objects, or collections cache.

- Public properties for table fields. No need to create getters and setters for each field in PHP (just my preference).

- Easy to use straight sql when needed.

Since I couldn't find one that met my needs (I've mostly used propel in the past), I wrote my own: http://outlet.knowledgehead.com (It's open source) I wouldn't recommend it for a production project yet (still version 0.1) but it's working great for me so far and I would love to get some feedback.</description>
		<content:encoded><![CDATA[<p>- Transparent. No &#8216;extends ActiveRecord&#8217;, or &#8216;extends Persistent&#8217;, or ::save() methods on my entities.</p>
<p>- Entities that look good when you &#8216;print_r&#8217; them. When I print_r or var_dump an entity it should only show what I expect there: the entity properties. No database configuration, mappings, connection objects, or collections cache.</p>
<p>- Public properties for table fields. No need to create getters and setters for each field in PHP (just my preference).</p>
<p>- Easy to use straight sql when needed.</p>
<p>Since I couldn&#8217;t find one that met my needs (I&#8217;ve mostly used propel in the past), I wrote my own: <a href="http://outlet.knowledgehead.com" rel="nofollow">http://outlet.knowledgehead.com</a> (It&#8217;s open source) I wouldn&#8217;t recommend it for a production project yet (still version 0.1) but it&#8217;s working great for me so far and I would love to get some feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry Garfield</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-21207</link>
		<dc:creator>Larry Garfield</dc:creator>
		<pubDate>Sat, 17 May 2008 15:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-21207</guid>
		<description>- No code generation.  Code generation means repeating yourself, but being lazy and making the computer repeat yourself for you.  That's still repeating yourself.

- Multi-entity operations.  I want to be able to write "make all books written by author with name 'Bob' have the publisher named 'Addison-Wesley'", and have it not generate N queries.  In straight SQL, I can do that in a single query with a subselect.  With an ORM, some extra overhead is acceptable but it should not be more than 4 queries.  (Find author Bob, find all his books, find publisher, set publisher.)

- Don't do string parsing.  String parsing is nasty, error prone, and difficult to debug.  If I wanted to write a custom language that gets parsed back into a data structure, I'd write SQL.  

- Transparent.  I should always be able to bypass the ORM and hit the SQL directly to run any query I want.  That means the underlying tables should be properly normalized, not a bunch of serialized PHP data structures.</description>
		<content:encoded><![CDATA[<p>- No code generation.  Code generation means repeating yourself, but being lazy and making the computer repeat yourself for you.  That&#8217;s still repeating yourself.</p>
<p>- Multi-entity operations.  I want to be able to write &#8220;make all books written by author with name &#8216;Bob&#8217; have the publisher named &#8216;Addison-Wesley&#8217;&#8221;, and have it not generate N queries.  In straight SQL, I can do that in a single query with a subselect.  With an ORM, some extra overhead is acceptable but it should not be more than 4 queries.  (Find author Bob, find all his books, find publisher, set publisher.)</p>
<p>- Don&#8217;t do string parsing.  String parsing is nasty, error prone, and difficult to debug.  If I wanted to write a custom language that gets parsed back into a data structure, I&#8217;d write SQL.  </p>
<p>- Transparent.  I should always be able to bypass the ORM and hit the SQL directly to run any query I want.  That means the underlying tables should be properly normalized, not a bunch of serialized PHP data structures.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gasper_k</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-21000</link>
		<dc:creator>gasper_k</dc:creator>
		<pubDate>Tue, 13 May 2008 08:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-21000</guid>
		<description>DG: no. :)</description>
		<content:encoded><![CDATA[<p>DG: no. <img src='http://blog.stuartherbert.com/php/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DG</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20804</link>
		<dc:creator>DG</dc:creator>
		<pubDate>Fri, 09 May 2008 12:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20804</guid>
		<description>Doesn't Propel (http://propel.phpdb.org) already do most (if not all) of the things people are asking for?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t Propel (http://propel.phpdb.org) already do most (if not all) of the things people are asking for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gasper_k</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20790</link>
		<dc:creator>gasper_k</dc:creator>
		<pubDate>Fri, 09 May 2008 09:25:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20790</guid>
		<description>What I miss most with Propel, is some sort of an Identity Map. Two subsequent calls to ObjectPeer::retrieveByPk(1) actually return a different object, which can become very bothersome with larger object graphs.</description>
		<content:encoded><![CDATA[<p>What I miss most with Propel, is some sort of an Identity Map. Two subsequent calls to ObjectPeer::retrieveByPk(1) actually return a different object, which can become very bothersome with larger object graphs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20784</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Fri, 09 May 2008 08:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20784</guid>
		<description>Have a look at &lt;a href="http://www.qcodo.com" rel="nofollow"&gt;Qcodo&lt;/a&gt;. Although this is a framework, the ORM is separate and can be used independently of the view component.

It's the best PHP ORM I've found. Features include:
- Solid PHP5 OO code
- Lightweight
- Easy to extend
- Code generation for all data classes
- Understands foreign key relationships
- Supports many-to-many relationships</description>
		<content:encoded><![CDATA[<p>Have a look at <a href="http://www.qcodo.com" rel="nofollow">Qcodo</a>. Although this is a framework, the ORM is separate and can be used independently of the view component.</p>
<p>It&#8217;s the best PHP ORM I&#8217;ve found. Features include:<br />
- Solid PHP5 OO code<br />
- Lightweight<br />
- Easy to extend<br />
- Code generation for all data classes<br />
- Understands foreign key relationships<br />
- Supports many-to-many relationships</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Gauthier</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20761</link>
		<dc:creator>Michael Gauthier</dc:creator>
		<pubDate>Fri, 09 May 2008 01:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20761</guid>
		<description>My wish list:
 - Object-Oriented PHP5
 - Uses an iterator interface object that is separate from the recordset itself ala Java collections.
 - Support non-numeric primary keys
 - Support multi-column primary keys
 - Support many-to-many relationships
 - serializable objects</description>
		<content:encoded><![CDATA[<p>My wish list:<br />
 - Object-Oriented PHP5<br />
 - Uses an iterator interface object that is separate from the recordset itself ala Java collections.<br />
 - Support non-numeric primary keys<br />
 - Support multi-column primary keys<br />
 - Support many-to-many relationships<br />
 - serializable objects</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20758</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 09 May 2008 00:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20758</guid>
		<description>It should be exactly what it says on the tin, a mapper. A method of automating the data mapper pattern. Far too many so called ORMs implement Active Record, requiring you to use these as domain objects or create your own mapping interface, thus defeating the object. I'd say this largely encompasses the views commented above.</description>
		<content:encoded><![CDATA[<p>It should be exactly what it says on the tin, a mapper. A method of automating the data mapper pattern. Far too many so called ORMs implement Active Record, requiring you to use these as domain objects or create your own mapping interface, thus defeating the object. I&#8217;d say this largely encompasses the views commented above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward  Finkler</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20748</link>
		<dc:creator>Edward  Finkler</dc:creator>
		<pubDate>Thu, 08 May 2008 21:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20748</guid>
		<description>Off the top of my head, a couple key things:

- it should be able to create ORM classes from existing data structures
- it should avoid verbosity as much as possible. I would prefer to edit config files that raw PHP code.</description>
		<content:encoded><![CDATA[<p>Off the top of my head, a couple key things:</p>
<p>- it should be able to create ORM classes from existing data structures<br />
- it should avoid verbosity as much as possible. I would prefer to edit config files that raw PHP code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.stuartherbert.com/php/2008/05/08/what-should-an-orm-offer/#comment-20745</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 08 May 2008 18:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stuartherbert.com/php/?p=41#comment-20745</guid>
		<description>Have a look at JPA. It should provide the posibilities to model your data on a meta level. To list a few things:

Model relationships like in an ER diagram (1-1, 1-N N-N),  lazy loading and cascade (delete, update, save)</description>
		<content:encoded><![CDATA[<p>Have a look at JPA. It should provide the posibilities to model your data on a meta level. To list a few things:</p>
<p>Model relationships like in an ER diagram (1-1, 1-N N-N),  lazy loading and cascade (delete, update, save)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
