<?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: Domain-driven Ruby on Rails??</title>
	<atom:link href="http://www.blog.dannynet.net/archives/70/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blog.dannynet.net/archives/70</link>
	<description>Pondering Programming and Poetry</description>
	<pubDate>Fri, 21 Nov 2008 19:33:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Bala Paranj</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-96209</link>
		<dc:creator>Bala Paranj</dc:creator>
		<pubDate>Wed, 28 Nov 2007 22:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-96209</guid>
		<description>Domain Driven Design has nothing to do with the language or framework that you use to implement a solution. Ruby is a object oriented language. Rails is built on top of Ruby. There is nothing that holds the developer back from using Ruby to implement a solution that is the result of DDD. 

You can create a model that does not extend from ActiveRecord and this model class could possibly manage other ActiveRecord model classes. This Super Model class can have all the business logic related to that concept. So you can have model classes that represent the domain model which is not concerned with any persistence. You can also create your own DSL that will encapsulate your domain logic and use it in the non-persistent model classes.</description>
		<content:encoded><![CDATA[<p>Domain Driven Design has nothing to do with the language or framework that you use to implement a solution. Ruby is a object oriented language. Rails is built on top of Ruby. There is nothing that holds the developer back from using Ruby to implement a solution that is the result of DDD. </p>
<p>You can create a model that does not extend from ActiveRecord and this model class could possibly manage other ActiveRecord model classes. This Super Model class can have all the business logic related to that concept. So you can have model classes that represent the domain model which is not concerned with any persistence. You can also create your own DSL that will encapsulate your domain logic and use it in the non-persistent model classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Boothy</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-80083</link>
		<dc:creator>Peter Boothy</dc:creator>
		<pubDate>Sat, 15 Sep 2007 03:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-80083</guid>
		<description>I think that Danny's observations are spot-on. Rails really isn't friendly to DDDesign as described by Eric Evans. I have spent the last few days slogging through Evan's book whilst working on a new Rails project. It's not an easy fit.

I think that using pure Ruby is a valid approach for domain driven design. I hope to have a more informed opinion soon ;-)</description>
		<content:encoded><![CDATA[<p>I think that Danny&#8217;s observations are spot-on. Rails really isn&#8217;t friendly to DDDesign as described by Eric Evans. I have spent the last few days slogging through Evan&#8217;s book whilst working on a new Rails project. It&#8217;s not an easy fit.</p>
<p>I think that using pure Ruby is a valid approach for domain driven design. I hope to have a more informed opinion soon <img src='http://www.blog.dannynet.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-19045</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Sat, 10 Mar 2007 16:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-19045</guid>
		<description>I'd say Rails is far from anything related do DDD. It is to closely linked with persistency issues to qualify as such (but hey, it's opiniated!). As per usual, maybe we should look at Smalltalk once again. It has a lovely persistency framework called Glorp. Check it out</description>
		<content:encoded><![CDATA[<p>I&#8217;d say Rails is far from anything related do DDD. It is to closely linked with persistency issues to qualify as such (but hey, it&#8217;s opiniated!). As per usual, maybe we should look at Smalltalk once again. It has a lovely persistency framework called Glorp. Check it out</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny&#8217;s Blog &#187; Blog Archive &#187; JavaPolis 2006, a good start</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-8131</link>
		<dc:creator>Danny&#8217;s Blog &#187; Blog Archive &#187; JavaPolis 2006, a good start</dc:creator>
		<pubDate>Sun, 10 Dec 2006 20:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-8131</guid>
		<description>[...] Danny&#8217;s Blog Pondering Programming and Poetry      &#171; Domain-driven Ruby on Rails?? [...]</description>
		<content:encoded><![CDATA[<p>[...] Danny&#8217;s Blog Pondering Programming and Poetry      &laquo; Domain-driven Ruby on Rails?? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralf Wolter</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-7805</link>
		<dc:creator>Ralf Wolter</dc:creator>
		<pubDate>Tue, 05 Dec 2006 10:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-7805</guid>
		<description>The way i see it, domain driven design is a way of working. It's about creating a coherent domain model and placing this at the center of your application. All other aspects are secondary. From that perspective any framework that takes those aspects out of the development supports ddd.

The start point of rails is a database schema. In some ways you could argue that this means that rails is data driven. A model and an interface are derived from the schema. The model however can be a real domain model and most implementations use it as such. The database starting point is simply the means the domain sketches must be translated to the database before domain code is generated. Not quite the ideal way for ddd, but workable and better than most.

From an OO perspective the real issue is the way active record integrates with the domain model. Because the object derive from active record there is a tight coupling between the domain model and the persistence library. It is however a compromise that is often made, in Java as well. Most of my domain models derive from observable creating a similar coupling. I really want a framework that generates persistence and presentation based on a domain model, but with the current frameworks there is always a compromise. for some this is annotations, other require xml or some other descriptors and some require a database schema...

On Ruby for your enterprise domain model I don't really see a problem. Sure, the Java compile could catch some things, but mostly syntactic error not the functional ones. Unit test should be written either way and will catch most syntactic errors as well. The real reason I like Ruby for domain models is the interactive mode. While i'm developing a domain model i can load the objects in irb and test them on the fly. If the model is complete i should be able to play the usecases from the prompt just by creating domain object and calling business methods. If find this the best way to test if my domain model really supports the usecases. the closest thing in Java are unittests (which don't really count as i have these in Ruby as well) and the scrap pages from eclipse neither of which come close to the interactive and direct feedback of irb.</description>
		<content:encoded><![CDATA[<p>The way i see it, domain driven design is a way of working. It&#8217;s about creating a coherent domain model and placing this at the center of your application. All other aspects are secondary. From that perspective any framework that takes those aspects out of the development supports ddd.</p>
<p>The start point of rails is a database schema. In some ways you could argue that this means that rails is data driven. A model and an interface are derived from the schema. The model however can be a real domain model and most implementations use it as such. The database starting point is simply the means the domain sketches must be translated to the database before domain code is generated. Not quite the ideal way for ddd, but workable and better than most.</p>
<p>From an OO perspective the real issue is the way active record integrates with the domain model. Because the object derive from active record there is a tight coupling between the domain model and the persistence library. It is however a compromise that is often made, in Java as well. Most of my domain models derive from observable creating a similar coupling. I really want a framework that generates persistence and presentation based on a domain model, but with the current frameworks there is always a compromise. for some this is annotations, other require xml or some other descriptors and some require a database schema&#8230;</p>
<p>On Ruby for your enterprise domain model I don&#8217;t really see a problem. Sure, the Java compile could catch some things, but mostly syntactic error not the functional ones. Unit test should be written either way and will catch most syntactic errors as well. The real reason I like Ruby for domain models is the interactive mode. While i&#8217;m developing a domain model i can load the objects in irb and test them on the fly. If the model is complete i should be able to play the usecases from the prompt just by creating domain object and calling business methods. If find this the best way to test if my domain model really supports the usecases. the closest thing in Java are unittests (which don&#8217;t really count as i have these in Ruby as well) and the scrap pages from eclipse neither of which come close to the interactive and direct feedback of irb.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danny</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-7782</link>
		<dc:creator>Danny</dc:creator>
		<pubDate>Mon, 04 Dec 2006 20:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-7782</guid>
		<description>Remco, you're in luck. At this year's &lt;a href="http://www.javapolis.com" rel="nofollow"&gt;JavaPolis,&lt;/a&gt; the domain-driven guru Eric Evans will do a session on domain-driven design.

In my view of ddd, there's really only on possible type of entrance point into the domain classes, and that is business methods, based only on usecases. Business methods usually do not equal crud functions; they are task-oriented, where crud methods are data-oriented. Furthermore, the domain classes contain only those methods needed to perform the business methods, and the database model in its turn only serves to persist domain classes (without the domain knowing).

By the way, I haven't been using anything BEA for a long time now; it's just me and my Eclipse. Maybe I've become too dependant on it, so much so that I can't imagine domain coding without it. There's something else though. The reason why I see Rails at the frontend side of an enterprise environment is because that's where Java really sucks (if you dislike BEA Portal, try using bare Struts). And that's where Rails could shine and win people over. Domain classes and business logic don't need rapid development. But that webshop needs to be online yesterday!

(Oh, and isn't cleaning up the controller and moving code to the model just a matter of proper object oriented design?)</description>
		<content:encoded><![CDATA[<p>Remco, you&#8217;re in luck. At this year&#8217;s <a href="http://www.javapolis.com" rel="nofollow">JavaPolis,</a> the domain-driven guru Eric Evans will do a session on domain-driven design.</p>
<p>In my view of ddd, there&#8217;s really only on possible type of entrance point into the domain classes, and that is business methods, based only on usecases. Business methods usually do not equal crud functions; they are task-oriented, where crud methods are data-oriented. Furthermore, the domain classes contain only those methods needed to perform the business methods, and the database model in its turn only serves to persist domain classes (without the domain knowing).</p>
<p>By the way, I haven&#8217;t been using anything BEA for a long time now; it&#8217;s just me and my Eclipse. Maybe I&#8217;ve become too dependant on it, so much so that I can&#8217;t imagine domain coding without it. There&#8217;s something else though. The reason why I see Rails at the frontend side of an enterprise environment is because that&#8217;s where Java really sucks (if you dislike BEA Portal, try using bare Struts). And that&#8217;s where Rails could shine and win people over. Domain classes and business logic don&#8217;t need rapid development. But that webshop needs to be online yesterday!</p>
<p>(Oh, and isn&#8217;t cleaning up the controller and moving code to the model just a matter of proper object oriented design?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RemVee</title>
		<link>http://www.blog.dannynet.net/archives/70#comment-7763</link>
		<dc:creator>RemVee</dc:creator>
		<pubDate>Mon, 04 Dec 2006 09:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.dannynet.net/archives/70#comment-7763</guid>
		<description>I don't understand your reasoning, maybe because I don't understand the domain-driven philosophy.  But as I understand it, it's about putting back model logic where it belongs, in (or close to?) the object model.  This is exactly what DHH's CRUD mission is about, cleanup the controller and move logic to the model layer.  And this is perfectly in sync with &lt;a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model" rel="nofollow"&gt;Skinning Controller Fat Model&lt;/a&gt; Jamis Buck wrote about.  These two movements make Rails a interesting contender to implement a domain model and webservices to make them available.

I must admit I am running through greenfields throwing Ruby on everything that moves, small scale if you will.  But scale is irrelevant and you should realize you're wandering BEA city still drunk on it's code generating tools.  But Ruby will seep into the cogs of the enterprice; glueing incompatible worlds together, replacing business rules with a pretty DSL, and you will even find domain models being served by packs of rails mongrels.  Charles and Thomas already pickaxed their way into Sun to bring us the tools.  It is time to educate the programmer next to you and show them, don't tell them but really show them, it's cool stuff.

And oh, I don't want to alarm you but the Java compiler doesn't check your back it just tells you the code will run without knowing if it will run in the right direction.  If you want to rely on tools the check your writing why stop at the compiler, why not use PMD, Bugfinder and all those other tools.  To me this seems like the false sense of security the war on terror is bringing.  The best cover is writing tests, test ensure your code is running in the right direction and still does after (manual) refactoring, basta!</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand your reasoning, maybe because I don&#8217;t understand the domain-driven philosophy.  But as I understand it, it&#8217;s about putting back model logic where it belongs, in (or close to?) the object model.  This is exactly what DHH&#8217;s CRUD mission is about, cleanup the controller and move logic to the model layer.  And this is perfectly in sync with <a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model" rel="nofollow">Skinning Controller Fat Model</a> Jamis Buck wrote about.  These two movements make Rails a interesting contender to implement a domain model and webservices to make them available.</p>
<p>I must admit I am running through greenfields throwing Ruby on everything that moves, small scale if you will.  But scale is irrelevant and you should realize you&#8217;re wandering BEA city still drunk on it&#8217;s code generating tools.  But Ruby will seep into the cogs of the enterprice; glueing incompatible worlds together, replacing business rules with a pretty DSL, and you will even find domain models being served by packs of rails mongrels.  Charles and Thomas already pickaxed their way into Sun to bring us the tools.  It is time to educate the programmer next to you and show them, don&#8217;t tell them but really show them, it&#8217;s cool stuff.</p>
<p>And oh, I don&#8217;t want to alarm you but the Java compiler doesn&#8217;t check your back it just tells you the code will run without knowing if it will run in the right direction.  If you want to rely on tools the check your writing why stop at the compiler, why not use PMD, Bugfinder and all those other tools.  To me this seems like the false sense of security the war on terror is bringing.  The best cover is writing tests, test ensure your code is running in the right direction and still does after (manual) refactoring, basta!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
