<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Meta Bates &#187; orm</title>
	<atom:link href="http://www.metabates.com/tag/orm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metabates.com</link>
	<description>The technical ramblings of Mark Bates.</description>
	<lastBuildDate>Wed, 10 Mar 2010 15:46:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Saying Goodbye to ActiveRecord</title>
		<link>http://www.metabates.com/2008/05/01/saying-goodbye-to-activerecord/</link>
		<comments>http://www.metabates.com/2008/05/01/saying-goodbye-to-activerecord/#comments</comments>
		<pubDate>Thu, 01 May 2008 21:07:00 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=87</guid>
		<description><![CDATA[I&#8217;ve been wrestling with this for a while now, and I&#8217;ve finally made my peace with it. I&#8217;ve decided to remove native support for ActiveRecord from Mack. From now on it&#8217;ll be DataMapper by default, out of the box. This was not an easy decision to make. Essentially it boils down to one of the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wrestling with this for a while now, and I&#8217;ve finally made my peace with it. I&#8217;ve decided to remove native support for ActiveRecord from Mack. From now on it&#8217;ll be DataMapper by default, out of the box. This was not an easy decision to make. Essentially it boils down to one of the key tenants of Mack, use the best of breed technologies to build a best of breed framework. I truly feel that DataMapper, especially when it hits the 0.9.0 release, is the best ORM, and persistence, system out there. I also feel that it is a natural fit for the Mack framework.</p>
<p>The other reason why I made the decision was time. It&#8217;s very time consuming to constantly maintain two different, and with 0.9.0 extremely different, ORMs. There are plenty of features that I could&#8217;ve done faster, had I only been supporting the one ORM.</p>
<p>Now I know I might come under fire from some people for this, but it&#8217;s a decision that I think is best for the framework. If some enterprising developer out there wants to build a plugin, or a gem, that adds ActiveRecord support, then I&#8217;m all for it! Please do!</p>
<p>The question you&#8217;re probably asking yourself now, is when will this be happening. It&#8217;ll be happening in the next release of Mack, probably the end of this week or the beginning of next week.</p>
<p>Again, I&#8217;m sorry for those of you were hoping to use ActiveRecord with Mack. Check out DataMapper, I&#8217;m sure you&#8217;ll be happy with it.</p>
<p>Comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/05/01/saying-goodbye-to-activerecord/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migration support almost there.</title>
		<link>http://www.metabates.com/2008/04/10/migration-support-almost-there/</link>
		<comments>http://www.metabates.com/2008/04/10/migration-support-almost-there/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 02:49:49 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=57</guid>
		<description><![CDATA[Now that I&#8217;m back on track with DataMapper, I&#8217;ve got migration support for both it and ActiveRecord just about done. In addition to the actual rake task, db:migrate (btw), I had to set up a good way to test rake tasks, something I&#8217;ll share at a later date, but needless to say it&#8217;s included with [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;m back on track with DataMapper, I&#8217;ve got migration support for both it and ActiveRecord just about done. In addition to the actual rake task, db:migrate (btw), I had to set up a good way to test rake tasks, something I&#8217;ll share at a later date, but needless to say it&#8217;s included with Mack. I also had to deal with the pain in the ass-ness of dealing with two VERY different ORMs, in the same test system! Let me tell you, that sucked!</p>
<p>Good news is that things seem to be working, at least going in the &#8216;up&#8217; direction anyway. I still need to write the &#8216;down&#8217; direction revert stuff. Hopefully, that shouldn&#8217;t take too long now that I have a good way of testing the task and the migration stuff.</p>
<p>Unfortunately, I feel as though as soon as I release this stuff, which should be by the end of this weekend, DataMapper 0.9.0 will be out, and I&#8217;ll have to re-write most of the DataMapper stuff because the API is changing so radically. I guess I&#8217;ll just have to deal with that when the time comes.</p>
<p>In the meantime I&#8217;ll let y&#8217;all know when migrations are done and out there in the wild.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/10/migration-support-almost-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rethinking DataMapper</title>
		<link>http://www.metabates.com/2008/04/07/rethinking-datamapper/</link>
		<comments>http://www.metabates.com/2008/04/07/rethinking-datamapper/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 02:28:58 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=51</guid>
		<description><![CDATA[So about 2 minutes after my post earlier about DataMapper a video was posted by one of the developers:

http://mtnwestrubyconf2008.confreaks.com/04katz.html
I watched the video, start to finish, and I do believe I&#8217;m starting to come around to the idea of DataMapper. I even understand why they do the &#8216;properties&#8217; in the model. Once you understand that DataMapper [...]]]></description>
			<content:encoded><![CDATA[<p>So about 2 minutes after my post earlier about DataMapper a video was posted by one of the developers:</p>
<div>
<p><a href="http://mtnwestrubyconf2008.confreaks.com/04katz.html" target="_blank">http://mtnwestrubyconf2008.confreaks.com/04katz.html</a></p>
<p>I watched the video, start to finish, and I do believe I&#8217;m starting to come around to the idea of DataMapper. I even understand why they do the &#8216;properties&#8217; in the model. Once you understand that DataMapper is meant to be used with an persistent back end, not just a database, that starts to make more sense.</p>
<p>The concepts, and the ideas, behind what they&#8217;re trying to do is really good, and I love some of the features that are hidden behind an almost ActiveRecord like syntax.</p>
<p>With that said, I still don&#8217;t understand why I&#8217;m getting the performance numbers that I&#8217;m getting. It just doesn&#8217;t seem to right to me. I feel as though I&#8217;m missing some fundamental.</p>
<p>So, again, I throw the challenge out there to people to help me figure out why I&#8217;m not seeing great numbers when it comes to DataMapper.</p>
<p>In the meantime, I&#8217;m going to start to really get to know it&#8217;s API, because I think it has a lot of potential.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/07/rethinking-datamapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s talk DataMapper</title>
		<link>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/</link>
		<comments>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 19:19:08 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=50</guid>
		<description><![CDATA[As you may, or may not know, DataMapper is the new ORM framework on the scene these days in the Ruby world. It&#8217;s getting a lot of hype for being clean, fast, simple, and feature rich. Oh, and it&#8217;s not ActiveRecord. I think that seems to be the real thing that is driving people to [...]]]></description>
			<content:encoded><![CDATA[<p>As you may, or may not know, DataMapper is the new ORM framework on the scene these days in the Ruby world. It&#8217;s getting a lot of hype for being clean, fast, simple, and feature rich. Oh, and it&#8217;s not ActiveRecord. I think that seems to be the real thing that is driving people to DataMapper, the fact that it&#8217;s not ActiveRecord.</p>
<p>I will say DataMapper is clean, simple, and feature rich. In 0.3.0 they&#8217;ve added migrations, which is great. Btw, a little off topic, but I&#8217;m working on migration support for both ActiveRecord and DataMapper in Mack as we speak. It should, hopefully, be out sometime this week. What I won&#8217;t give DataMapper is that it&#8217;s fast. In my tests, and I&#8217;ll provide some number below, DataMapper only seems to win on inserts, after that ActiveRecord beats it hands down. In all fairness to DataMapper I&#8217;m starting to think that the problems are not at the DataMapper layer, but at the underlying Data Objects layer that DataMapper uses. As you&#8217;ll see from my tests DataMapper seems very heavilyÂ optimizedÂ towards MySQL over PostgreSQL. This, to me, leans towards a difference in the underlying adapters.</p>
<p>Another problem I have with DataMapper is that I have to set the &#8216;properties&#8217; of the model inside the model itself. It&#8217;s an old school approach, and it does have the benefit of being self documenting, but it also has the drawbacks of constantÂ maintenanceÂ and clutter at the top of your model. Not to mention potential conflicts when running through migrations, etc&#8230;</p>
<p>I&#8217;m also having one other little problem these days. This has only been a problem since I&#8217;ve gone DataMapper 0.3.0. At the end of some of rake tasks, if I have DataMapper required, I get this:</p>
<p>Â </p>
<pre>/usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect': undefined method `suite' for Gem::VerificationError:Class (NoMethodError)
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:58
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `[]'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:213:in `run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
from /usr/local/lib/ruby/1.8/test/unit.rb:278</pre>
<p>The rake task completed successfully, but I get this fairly random error message. If anyone out there is also getting this message, please let me know what it is. I&#8217;m open for ideas on this one.</p>
<p>Despite these issues I have with DataMapper, I&#8217;m going to keep striving to provide support for both it and ActiveRecord in Mack. I think it&#8217;s important to give people a choice and not force them to use the one I think is either easier to code for, or better. Both of which I&#8217;m not saying about ActiveRecord, but in technologies in general.</p>
<p>Anyway, enough of my blather, here are the test results I was speaking about:</p>
<p>Â </p>
<p><span style="color: #800000;">Running time 1.693881 seconds. [MESSAGE]: DM: postgresql: Inserts</span><br />
Running time 2.799189 seconds. [MESSAGE]: AR: postgresql: Inserts</p>
<p>Running time 1.368185 seconds. [MESSAGE]: DM: postgresql: Individual Reads<br />
<span style="color: #800000;">Running time 0.734143 seconds. [MESSAGE]: AR: postgresql: Individual Reads</span></p>
<p>Running time 0.917551 seconds. [MESSAGE]: DM: postgresql: Bulk Reads<br />
<span style="color: #800000;">Running time 0.121198 seconds. [MESSAGE]: AR: postgresql: Bulk Reads</span></p>
<p>Running time 2.309244 seconds. [MESSAGE]: DM: postgresql: Updates<br />
<span style="color: #800000;">Running time 2.079578 seconds. [MESSAGE]: AR: postgresql: Updates</span></p>
<p>Running time 1.802914 seconds. [MESSAGE]: DM: postgresql: Deletes<br />
<span style="color: #800000;">Running time 1.708714 seconds. [MESSAGE]: AR: postgresql: Deletes</span></p>
<p><span style="color: #800000;">Running time 0.433761 seconds. [MESSAGE]: DM: mysql: Inserts</span><br />
Running time 2.621093 seconds. [MESSAGE]: AR: mysql: Inserts</p>
<p>Running time 1.073741 seconds. [MESSAGE]: DM: mysql: Individual Reads<br />
<span style="color: #800000;">Running time 0.207305 seconds. [MESSAGE]: AR: mysql: Individual Reads</span></p>
<p>Running time 0.827842 seconds. [MESSAGE]: DM: mysql: Bulk Reads<br />
<span style="color: #800000;">Running time 0.073593 seconds. [MESSAGE]: AR: mysql: Bulk Reads</span></p>
<p><span style="color: #800000;">Running time 1.204845 seconds. [MESSAGE]: DM: mysql: Updates</span><br />
Running time 1.738602 seconds. [MESSAGE]: AR: mysql: Updates</p>
<p><span style="color: #800000;">Running time 1.010774 seconds. [MESSAGE]: DM: mysql: Deletes</span><br />
Running time 1.251691 seconds. [MESSAGE]: AR: mysql: Deletes</p>
<p>Â </p>
<p>Â </p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/04/07/lets-talk-data-mapper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The History Of Mack, pt. 3</title>
		<link>http://www.metabates.com/2008/02/27/the-history-of-mack-pt-3/</link>
		<comments>http://www.metabates.com/2008/02/27/the-history-of-mack-pt-3/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 16:35:30 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[thin]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/2008/02/27/the-history-of-mack-pt-3/</guid>
		<description><![CDATA[Why did I fall in love with Rack and Thin? That&#8217;s easy. I love Thin because it lives up to it&#8217;s name. It&#8217;s thin. It&#8217;s incredibly fast, has great clustering support built in, and is the next generation of Ruby web servers. It kicks Mongrel&#8217;s ass and it takes names. I&#8217;m sure if you asked [...]]]></description>
			<content:encoded><![CDATA[<p>Why did I fall in love with <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> and <a href="http://code.macournoyer.com/thin/" target="_blank">Thin</a>? That&#8217;s easy. I love Thin because it lives up to it&#8217;s name. It&#8217;s thin. It&#8217;s incredibly fast, has great clustering support built in, and is the next generation of Ruby web servers. It kicks Mongrel&#8217;s ass and it takes names. I&#8217;m sure if you asked Zed Shaw he would have no problem with Thin replacing Mongrel.</p>
<p>Rack I love because of it&#8217;s simplicity, and it&#8217;s uniformity. It&#8217;s setting out to create a standard for which any Ruby web application can very easily be plugged into a web server. By abstracting that layer out it makes it easier for developers to focus on writing great apps, and not having to worry about how to deploy them.</p>
<p>Once I started to play around with Rack it didn&#8217;t take me more then a few minutes to have a very simple site up and running.</p>
<p>Within a few days I had the basics of a Rails like framework rocking, and within two weeks I had the core of Mack coded, and that&#8217;s where I am today.</p>
<p>Mack is a very fast, stable, and extensible framework. It&#8217;s designed to be lean and mean and not be all things to all people. It&#8217;s meant to get you started on the right path, but to let you have your own opinions. It&#8217;s designed to help you build portal applications simply and efficiently, and deploy with just as much ease.</p>
<p>Mack is ORM agnostic, although it does have some special hooks for ActiveRecord and DataMapper. It does not force you to use a certain type of system for doing web services, although it does promote a RESTful lifestyle. Configuration and setup is system, but there&#8217;s no reason for you to use it as is out of the box.</p>
<p>Mack encourages experimentation, andÂ  it hopes that you customize it make it your own.</p>
<p>Go and scour through the <a href="http://api.mackframework.com/" target="_blank">API</a> and then download the gem and start building your next generation application the way YOU want to, not the way someone else tells you you have to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/02/27/the-history-of-mack-pt-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORM Support</title>
		<link>http://www.metabates.com/2008/02/27/orm-support/</link>
		<comments>http://www.metabates.com/2008/02/27/orm-support/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 15:46:44 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/2008/02/27/orm-support/</guid>
		<description><![CDATA[If you would like to add ORM support to your application, it&#8217;s simple. Out of the box Mack has support for two popular ORMs, ActiveRecord and DataMapper.Our tests show that DataMapper is 10x slower then ActiveRecord, but who knows, your mileage my vary.
When you create your mack app you can do the following which will [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like to add ORM support to your application, it&#8217;s simple. Out of the box Mack has support for two popular ORMs, ActiveRecord and DataMapper.Our tests show that DataMapper is 10x slower then ActiveRecord, but who knows, your mileage my vary.</p>
<p>When you create your mack app you can do the following which will add ORM support to your generated app:</p>
<pre>$ mack my_cool_mack_app -o activerecord</pre>
<p>If you already have a mack app you can very easily add ORM support by adding the following configuration parameter to the default.yml file:</p>
<pre>mack::orm: activerecord</pre>
<p>And also add a database.yml file to your config directory that looks like this:</p>
<pre>development:
  adapter: mysql
  database: my_cool_mack_app_development
  host: localhost
  username: root
  password:

test:
  adapter: mysql
  database: my_cool_mack_app_test
  host: localhost
  username: root
  password:

production:
  adapter: mysql
  database: my_cool_mack_app_production
  host: localhost
  username: root
  password:</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/02/27/orm-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.289 seconds -->
<!-- Cached page served by WP-Cache -->
