<?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: DataMapper without a database</title>
	<atom:link href="http://nutrun.com/weblog/datamapper-without-a-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://nutrun.com/weblog/datamapper-without-a-database/</link>
	<description>nutrun</description>
	<pubDate>Tue, 06 Jan 2009 04:38:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dan Kubb</title>
		<link>http://nutrun.com/weblog/datamapper-without-a-database/comment-page-1/#comment-1085</link>
		<dc:creator>Dan Kubb</dc:creator>
		<pubDate>Tue, 10 Jun 2008 04:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://nutrun.com/?p=144#comment-1085</guid>
		<description>Kurt, it would be relatively easy to write a DataMapper Adapter that uses in-memory storage rather than rely on an external dependency like a database.

FYI the AbstractAdapter API is getting a bit of an overhaul based on our usage patterns.  It should be more consistent and easier for Adapter authors to write new adapters.  Work is progressing on it now and it should be ready and tested within the next week or so.  The reason I say this is if you decide to write such an adapter you'll want to join us on IRC for the full details.</description>
		<content:encoded><![CDATA[<p>Kurt, it would be relatively easy to write a DataMapper Adapter that uses in-memory storage rather than rely on an external dependency like a database.</p>
<p>FYI the AbstractAdapter API is getting a bit of an overhaul based on our usage patterns.  It should be more consistent and easier for Adapter authors to write new adapters.  Work is progressing on it now and it should be ready and tested within the next week or so.  The reason I say this is if you decide to write such an adapter you&#8217;ll want to join us on IRC for the full details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt Stephens</title>
		<link>http://nutrun.com/weblog/datamapper-without-a-database/comment-page-1/#comment-1084</link>
		<dc:creator>Kurt Stephens</dc:creator>
		<pubDate>Mon, 09 Jun 2008 22:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://nutrun.com/?p=144#comment-1084</guid>
		<description>DataMapper looks like a much better solution that AR::B, but again we are stuck with objects that require a database to exist.

I've been using the following which almost helped:

module DataMapper::Resource::ClassMethods
  def find_or_create search_opts, create_opts
    create create_opts
  end
  def create create_opts
    new create_opts
  end
end

But at some point it fails in AbstractAdapter#read_set append to an association proxy.

Also many_to_many does not work.

Maybe its time to create a NullAdapter so people can write unit test and use models independently of a database?  For example: serialize object graphs to a client that should not have access to a DB.

When is somebody going to create a truly orthogonal ORM for Ruby, without load-time dependencies, so we can stop modeling databases and start modeling objects with some possibility of reuse?

I'm so ready to ditch AR::Base for the right solution...</description>
		<content:encoded><![CDATA[<p>DataMapper looks like a much better solution that AR::B, but again we are stuck with objects that require a database to exist.</p>
<p>I&#8217;ve been using the following which almost helped:</p>
<p>module DataMapper::Resource::ClassMethods<br />
  def find_or_create search_opts, create_opts<br />
    create create_opts<br />
  end<br />
  def create create_opts<br />
    new create_opts<br />
  end<br />
end</p>
<p>But at some point it fails in AbstractAdapter#read_set append to an association proxy.</p>
<p>Also many_to_many does not work.</p>
<p>Maybe its time to create a NullAdapter so people can write unit test and use models independently of a database?  For example: serialize object graphs to a client that should not have access to a DB.</p>
<p>When is somebody going to create a truly orthogonal ORM for Ruby, without load-time dependencies, so we can stop modeling databases and start modeling objects with some possibility of reuse?</p>
<p>I&#8217;m so ready to ditch AR::Base for the right solution&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Dai</title>
		<link>http://nutrun.com/weblog/datamapper-without-a-database/comment-page-1/#comment-1082</link>
		<dc:creator>David Dai</dc:creator>
		<pubDate>Fri, 06 Jun 2008 05:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://nutrun.com/?p=144#comment-1082</guid>
		<description>If you don't mind a little db dirtiness (or cleanness depending on your perspective) you can try in memory sqlite3 adapter: DataMapper.setup(:default, "sqlite3::memory:"). You can keeping mocking your way through w/ occasional SQL magics.  You'll probably want to do DataMapper.auto_migrate! as well. :)</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t mind a little db dirtiness (or cleanness depending on your perspective) you can try in memory sqlite3 adapter: DataMapper.setup(:default, &#8220;sqlite3::memory:&#8221;). You can keeping mocking your way through w/ occasional SQL magics.  You&#8217;ll probably want to do DataMapper.auto_migrate! as well. <img src='http://nutrun.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Smoot</title>
		<link>http://nutrun.com/weblog/datamapper-without-a-database/comment-page-1/#comment-985</link>
		<dc:creator>Sam Smoot</dc:creator>
		<pubDate>Fri, 30 May 2008 06:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://nutrun.com/?p=144#comment-985</guid>
		<description>Yeah, that's annoying. I'll try to fix it up. Time is a problem. ;-)

So the reason this is happening is because the NamingConventions are per-adapter. So one database can have one set of conventions, another can have a different set.

So, to inflect the #storage_name, we need a handle on the Adapter.

Obviously there's nothing in the above code that actually needs the #storage_name at that point. So we just need to make it a little lazier, and you won't have this issue. As you discovered, a valid connection isn't necessary. Just a handle that responds to #storage_naming_convention and #field_naming_convention.

Thanks for the kind words.

On the plus-side, DM is unofficially-officially supported by my employer, Wieck Media, and I'll be dedicating some more team hours to patching up some of the remaining issues. Expect a 0.9.2 release next Friday if not sooner.</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s annoying. I&#8217;ll try to fix it up. Time is a problem. <img src='http://nutrun.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So the reason this is happening is because the NamingConventions are per-adapter. So one database can have one set of conventions, another can have a different set.</p>
<p>So, to inflect the #storage_name, we need a handle on the Adapter.</p>
<p>Obviously there&#8217;s nothing in the above code that actually needs the #storage_name at that point. So we just need to make it a little lazier, and you won&#8217;t have this issue. As you discovered, a valid connection isn&#8217;t necessary. Just a handle that responds to #storage_naming_convention and #field_naming_convention.</p>
<p>Thanks for the kind words.</p>
<p>On the plus-side, DM is unofficially-officially supported by my employer, Wieck Media, and I&#8217;ll be dedicating some more team hours to patching up some of the remaining issues. Expect a 0.9.2 release next Friday if not sooner.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
