<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Visoft, Inc. Blogs</title>
	
	<link>http://blogs.visoftinc.com</link>
	<description>.NET, ASP.NET, AJAX, Ruby and more</description>
	<lastBuildDate>Thu, 08 Dec 2011 04:53:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/VisoftIncBlogs" /><feedburner:info uri="visoftincblogs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Major Ruby OData Update v0.1.0</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/cias1o-x3o8/</link>
		<comments>http://blogs.visoftinc.com/2011/12/07/major-ruby-odata-update-v0-1-0/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 04:40:41 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[OData]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby_odata]]></category>
		<category><![CDATA[WCF Data Services]]></category>
		<category><![CDATA[WCF]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=263</guid>
		<description><![CDATA[It’s here! I’m happy to announce a major release of ruby_odata, v0.1.0. There are many enhancements found in this release so let’s dig in and see what’s new. There is one thing that we need to get out of the way first, a breaking change. In v0.0.10 and below, queries and some instances of calls [...]]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px 15px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="OData_logo_MS_small_thumb7" border="0" alt="OData_logo_MS_small_thumb7" align="right" src="http://blogs.visoftinc.com/wp-content/uploads/2011/12/OData_logo_MS_small_thumb7.png" width="300" height="37" />It’s here! I’m happy to announce a major release of <a href="https://github.com/visoft/ruby_odata/" target="_blank">ruby_odata</a>, v0.1.0. There are many enhancements found in this release so let’s dig in and see what’s new.</p>
<p>There is one thing that we need to get out of the way first, a <strong>breaking change</strong>. In v0.0.10 and below, queries and some instances of calls to <code>save_changes</code> would return a single entity if there was only one returned. This was confusing and could lead to errors. As a consumer of the gem, you wouldn’t know if a call to the Service’s <code>execute</code> method was a single object or an enumerable. Instead of you having to guess, those calls now return enumerables all the time. This applies to calls to <code>execute</code> and <code>save_change</code> additions. Updates, deletes, and <code>add_link</code> calls (we’ll get to those in a minute), as well as batch saves all return Booleans, but single <code>save_change</code> add calls will return an enumerable because those results are parsed similar to <code>execute</code> calls.</p>
<p>Now that that’s out of the way, let’s look at the new features.</p>
<p><span id="more-263"></span><br />
<h2>The Features</h2>
<h3>Partial Results</h3>
<p>The first change is thanks to <a href="https://github.com/arienmalec" target="_blank">arienmalec</a>. OData allows services to do server-side paging in Atom by defining a next link. The default behavior is to repeatedly consume partial feeds until the result set is complete, for example:</p>
<pre class="brush: ruby;">svc.Partials
results = svc.execute # =&gt; retrieves all results in the Partials collection</pre>
<p>If desired (e.g., because the result set is too large to fit in memory), explicit traversal of partial results can be requested via options:</p>
<pre class="brush: ruby;">svc = OData::Service.new &quot;http://example.com/Example.svc&quot;, { :eager_partial =&gt; false }
svc.Partials
results = svc.execute # =&gt; retrieves the first set of results returned by the server
if svc.partial? # =&gt; true if the last result set was a partial result set (i.e., had a next link)
  results.concat svc.next # =&gt; retrieves the next set of results
end
while svc.partial? # =&gt; to retrieve all partial result sets
  results.concat svc.next
end</pre>
<h3>Single Layer Inheritance</h3>
<p>This feature was long overdue! Back in July 2010, <a href="http://odetocode.com/Blogs/scott/articles/about-scott-allen.aspx" target="_blank">Scott Allen</a> wrote <a href="http://odetocode.com/Blogs/scott/archive/2010/07/11/odata-and-ruby.aspx" target="_blank">a post about ruby_odata</a> where he mentioned a change to the Service class that would parse models with single layer inheritance. His code has finally been integrated into ruby_odata. Note, that the addition currently only support single layer inheritance, but that should handle most of the cases you will encounter.</p>
<h3>Querying Links</h3>
<p>There are times when you don’t necessarily want to bring down full navigation property entities. In these cases the OData protocol has support for <a href="http://www.odata.org/developers/protocols/uri-conventions#AddressingLinksBetweenEntries" target="_blank">Addressing Links Between Entities</a>. To support this, there is a new method that can be tacked on to a single entity query (e.g. finding an entity by id) called <code>links</code> where you pass the name of the navigation property of the links that you want to retrieve. For example:</p>
<pre class="brush: ruby;">svc.Categories(1).links(&quot;Products&quot;)
product_links = svc.execute # =&gt; returns URIs for the products</pre>
<h3>Add Link</h3>
<p>There are times when you need to <a href="http://www.odata.org/developers/protocols/operations#CreatingLinksbetweenEntries" target="_blank">create a linkage between a parent and a child</a>, and you don’t want be required to perform an add or update. You can now simply call the <code>add_link</code> method on the <code>OData::Service</code> with the parent object, the name of the navigation property, and the child object. Finally, call <code>save_changes</code>. For example:</p>
<pre class="brush: ruby;">svc.add_link(&lt;Parent&gt;, &lt;Navigation Property Name&gt;, &lt;Child&gt;)
svc.save_changes</pre>
<h3>Lazy Loading</h3>
<p>In previous versions of ruby_odata, if you wanted to perform lazy loading of navigation properties you would need to do it manually, which was extremely ugly. I’m happy to say that there is now a way to perform lazy loading in a graceful way. All you need to do is to call the <code>load_property</code> method on the <code>OData::Service</code> with the entity to fill and the name of the navigation property. For example:</p>
<pre class="brush: ruby;"># Without expanding the query
svc.Products(1)
prod1 = svc.execute.first
# Use load_property for lazy loading
svc.load_property(prod1, &quot;Category&quot;)</pre>
<h3>Reflection / Introspection</h3>
<p>Paul Gallagher (<a href="https://github.com/tardate" target="_blank">tardate</a>) had a <a href="https://github.com/visoft/ruby_odata/issues/11" target="_blank">great suggestion</a>: Why should you have to look at the EDMX metadata file directly when ruby_odata parses all that data? You can now use the <code>OData::Service</code> to access a list of the <code>collections</code> that the service exposes. There is also a <code>classes</code> method, which gives you a list of the classes generated by the OData::Service. A <code>function_imports</code> method, which will list function imports exposed by the service (we’ll get to those in a minute). On a class, you can call the class method, <code>properties</code>, which as you guessed will give you information about each property. Each of these methods return hashes where the keys are the name, and the values are hashes of the metadata for the member that you are introspecting.</p>
<h3>Function Imports</h3>
<p>Quite a while ago, I received an message from a user via this blog asking about the ability to call custom service methods. Within a WCF Data Service, you can expose your own custom methods, which get translated into the <a href="http://www.odata.org/media/6652/[mc-csdl][1].htm#_Toc246717555" target="_blank">EDMX as FunctionImports</a>. These aren’t to be confused with Entity Framework’s <code>FunctionImports</code>. These will be parsed and dynamically added as methods to the <code>OData::Service</code>. When you call one of the methods, they will return a result without you needing to make a call to <code>execute</code> or <code>save_changes</code>. There are different result types. You may get back a true if the <code>FunctionImport</code> doesn’t return any content (for example, a delete). You may get back a single entity, or a collection of entities. Finally, you may get back a single primitive value (e.g. Integer, String, etc), or a collection of primitive values. You can use the <code>function_imports</code> method on the Service to determine the type that will be returned.</p>
<h3>Namespaces</h3>
<p>In the same message as the request for the custom service methods (ok, it was actually a reply), the user mentioned that he received type conflicts with the generated classes if one by the same name already existed. If this is a problem for you, you now have the ability to tell the <code>OData::Service</code> to generate the models in a specific namespace. There is a new option that can be passed in to the constructor’s option hash, <code>:namespace</code>. If you use this option, there shouldn’t be any collisions. You can pass a namespace in either Ruby (with double colons, e.g. <code>RubyOData::Rocks</code>) or .NET style (with periods, e.g. <code>RubyOData.Rocks</code>) if there is more than one part to the namespace that you want to use. If you don’t provide a namespace, then ruby_odata will generate the classes without any namespace just as it has before.</p>
<h3>The Beginnings of Something Cool?</h3>
<p>As developers, the majority of the time we either retrieve collections or a single entity, usually by an ID. I didn’t really like the current steps to retrieve a single entity by ID:</p>
<pre class="brush: ruby;">svc.Categories(1)
category = svc.execute.first</pre>
<p>Sort of ugly, right? So inspired by Ruby on Rails, I added a class method for each created class so that you could just do this:</p>
<pre class="brush: ruby;">category = Category.first(1)</pre>
<p>Great, right? It’s a little nicer, but sadly it’s a one trick pony right now. There’s no filtering, eager loading, etc. My idea was to hopefully expand on the concept like Rails and ActiveRecord, but for now it’s just an easier, cleaner way to get an entity.</p>
<h2>Testing</h2>
<p>In addition to the new features, I’ve been busy working on the testing suite. </p>
<h3>No More Hardcoded URIs</h3>
<p>Having to rely on Windows for testing has made me stick to Windows and e-TextEditor for ruby_odata development. The key word there is actually testing. All that Windows is required for is hosting the WCF Data Service for the Cucumber integration tests, but Cucumber is just one part of it, RSpec is the other. It’s no denying that Ruby on Windows is slower than its *nix counterparts (not to knock the RubyInstaller.com team, if it wasn’t for them, Ruby on Windows would be non-existent). Where you really see a slowdown is when you are doing TDD/BDD testing. You need tests to run fast, and if you ran the command <code>time rake spec</code>, my Windows box is more than 4 times slower than my old MacBook (note, not a Pro), which has similar hardware. Now, multiply that by every spec I write and I want to throw my machine out a window. So, in an effort to migrate development, the URLs and ports required for the sample WCF service are now dynamic. Take a look at features/support/constants.rb for more information. Thanks to Sean Carpenter (<a href="https://github.com/scarpenter" target="_blank">scarpenter</a>) for his fork where he changed the static values in that file to be optionally set by environment variables.</p>
<h3>Hello New Technology</h3>
<p>I decided to change up the technologies used within the test service. First, no more SQL Express, hello SQL Compact 4. Why the change? SQL Compact 4 is simply DLL deployed, you don’t need to install anything, cool. Also, since SQL Compact 4 databases are file based, instead of having to truncate to clean the database for testing, the file could just be blown away and rebuilt easily.</p>
<p>So, a new database, how about a new ORM? Entity Framework 4.1, also known as “<a href="http://www.hanselman.com/blog/SimpleCodeFirstWithEntityFramework4MagicUnicornFeatureCTP4.aspx" target="_blank">magic unicorn edition</a>” is now being used. EF 4.1 “Code First” as it is called, is just awesome. Ditching <a href="http://msdn.microsoft.com/en-us/library/cc982042.aspx" target="_blank">Entity Framework’s EDMX</a> for pure code, now that is right up my alley.</p>
<p>Finally, since I switch to EF 4.1, the current released version of WCF Data Services, well, didn’t work right. You know what did? The <a href="http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/announcing-wcf-data-services-oct-2011-ctp-for-net-4-and-silverlight-4.aspx" target="_blank">WCF Data Services October 2011 CTP</a>, w00t.</p>
<p>Everything you need should be in the new test project (now called RubyODataService, changed from SampleService, though that’s still in the test URLs) thanks to NuGet and my copying of the WCF DS CTP DLLs to the packages directory since there wasn’t a NuGet package for it). </p>
<h3>Pickle</h3>
<p>I love the <a href="https://github.com/ianwhite/pickle" target="_blank">pickle</a> gem. Aside from being authored by <a href="https://github.com/ianwhite" target="_blank">a guy with my last name</a> (no relation), pickle makes Cucumber features so much nicer to read. Throughout development of ruby_odata, I’ve written my own step definitions to do things, essentially cloning what pickle does out-of-the-box, e.g. creating models, asserting against models, etc. I had toyed with getting pickle to work around June of last year, but was having issues. As time passed and experience grew, I finally got it all working. I used it in a few places in new tests, but I hope to do a complete overhaul. My pickle adapter also needs a bit of work since I didn’t put it through all of its paces, and some things need to be added to ruby_odata before it will function as expected. All in all though, it is great to finally have pickle working.</p>
<h2>Conclusion</h2>
<p>I hope that you find the new version of ruby_odata to be useful. In the next version, I hope to further enhance the gem with more of the <a href="http://www.odata.org/developers/protocols/operations" target="_blank">different operations that OData can perform</a>. I’m sure I’ll perform some more housekeeping in the test suite removing my ugly Cucumber steps for nice, clean Pickle steps.</p>
<p>What would you like to see in the new version? Add your suggestions to the <a href="https://github.com/visoft/ruby_odata/issues" target="_blank">issues section on GitHub</a>. I’d also like to know what you think of the API as it stands right now. I’ve essentially been following the OData Silverlight client API syntax (e.g. AddTo&lt;Collection Name&gt; methods, add_link, etc). With the addition of the <code>:first</code> class method, it got me thinking of a bit of a different approach. Not necessarily giving up one for the other, but I think another more Ruby-esq style could co-exist. Anyway, that’s all for now, go forth and do cool things with <a href="https://rubygems.org/gems/ruby_odata" target="_blank">ruby_odata</a>. I’d love to know how you are using the gem. I was excited to find out that ruby_odata was being utilized by the <a href="http://rgovdata.com/" target="_blank">rgovdatablog</a> gem.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/PoCexqL12s-N09RD6Bjjv8mKuy4/0/da"><img src="http://feedads.g.doubleclick.net/~a/PoCexqL12s-N09RD6Bjjv8mKuy4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PoCexqL12s-N09RD6Bjjv8mKuy4/1/da"><img src="http://feedads.g.doubleclick.net/~a/PoCexqL12s-N09RD6Bjjv8mKuy4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=cias1o-x3o8:KNHo0vxRafc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=cias1o-x3o8:KNHo0vxRafc:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=cias1o-x3o8:KNHo0vxRafc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=cias1o-x3o8:KNHo0vxRafc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=cias1o-x3o8:KNHo0vxRafc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=cias1o-x3o8:KNHo0vxRafc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=cias1o-x3o8:KNHo0vxRafc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=cias1o-x3o8:KNHo0vxRafc:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/cias1o-x3o8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/12/07/major-ruby-odata-update-v0-1-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/12/07/major-ruby-odata-update-v0-1-0/</feedburner:origLink></item>
		<item>
		<title>Ruby OData Update v0.0.10</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/T8w7ByLjHeQ/</link>
		<comments>http://blogs.visoftinc.com/2011/09/26/ruby-odata-update-v0-0-10/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 03:55:18 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[OData]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby_odata]]></category>
		<category><![CDATA[WCF Data Services]]></category>
		<category><![CDATA[WCF]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/2011/09/26/ruby-odata-update-v0-0-10/</guid>
		<description><![CDATA[I’m happy to announce that today, ruby_odata has continued to move forward by adding additional features and fixing bugs. I skipped an update for v0.0.9, so let’s revisit what was added/fixed back then. The major change was support for self-signed SSL certificates. That addition was courtesy of J.D Mullin. I’m sure you remember his contributions [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.visoftinc.com/wp-content/uploads/2011/09/OData_logo_MS_small.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px 12px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="OData_logo_MS_small" border="0" alt="OData_logo_MS_small" align="right" src="http://blogs.visoftinc.com/wp-content/uploads/2011/09/OData_logo_MS_small_thumb.png" width="300" height="37" /></a>I’m happy to announce that today, <a href="http://github.com/visoft/ruby_odata" target="_blank">ruby_odata</a> has continued to move forward by adding additional features and fixing bugs. </p>
<p>I skipped an update for v0.0.9, so let’s revisit what was added/fixed back then. The major change was support for self-signed SSL certificates. That addition was courtesy of <a href="http://jdmullin.blogspot.com/" target="_blank">J.D Mullin</a>. I’m sure you remember his contributions <a href="http://bit.ly/ruby_odata008" target="_blank">back in v0.0.8</a> when he added Basic HTTP Authentication. Aside from J.D.’s contributions, the library was refactored to only make one call to the service for building classes and collections. Finally, a few bug fixes wrapped up the release.</p>
<p>Now onto v0.0.10. A lot of changes were implemented in this release that ended up allowing for wider support for ruby_odata. Thanks to input from Michael Koegel (<a href="http://twitter.com/#!/konfusius" target="_blank">@konfusius</a>), Alvaro Tejada (<a href="http://twitter.com/#!/blag" target="_blank">@Blag</a>), Ingo Sauerzapf (<a href="http://twitter.com/#!/IngoS11" target="_blank">@IngoS11</a>), and Juergen Schmerder (<a href="http://twitter.com/#!/schmerdy" target="_blank">@schmerdy</a>) (I apologize if I missed anyone!), ruby_odata now supports (at least basic functionality) for <a href="http://help.sap.com/saphelp_gateway20/helpdata/en/2f/d48687c1e14e87915d41e595a4285d/content.htm" target="_blank">SAP NetWeaver GateWay</a>.</p>
<p>Another big change is the initial support for <a href="http://www.odata.org/developers/protocols/atom-format#CustomizingtheRepresentationofanEntry" target="_blank">feed customizations</a>. Properties may not be represented within the &lt;m:properties&gt; collection of an entity. Currently ruby_odata supports SyndicationTitle and SyndicationSummary, but adding the other syndication options should be easy to support. If you can supply me with the metadata and a copy of the output that includes the additional feed customizations, I will be happy to add them (or feel free to fork the project and add them yourself).</p>
<p>Here’s are the complete list of changes for v0.0.10:</p>
<ul>
<li><strong>New Features</strong>
<ul>
<li>Added the ability to pass additional parameters that are appended to the query string for requests </li>
<li>Added initial support for feed customizations (SyndicationTitle and SyndicationSummary) </li>
<li>Enhanced ruby_odata’s awareness of classes based on the metadata instead of relying on results that are returned </li>
</ul>
</li>
<li><strong>Bug Fixes</strong>
<ul>
<li>Fixed issues with nested collections (eager loading) </li>
<li>Handled ArgumentError on the Time.parse for older versions of Ruby; used DateTime.parse instead if Time.parse fails </li>
<li>Removed the camelize method call when building the root URL for collections (reported by mkoegel, issue #3 on github) </li>
<li>Handled building results (classes) where the category element is missing but there is a title element instead (reported by mkoegel, issue #3 on github in the comments) </li>
</ul>
</li>
<li><strong>Other</strong>
<ul>
<li>Change HTTP port to 8989 since 8888 conflicts with the Intel AppStore </li>
<li>Refactored service step for HTTP calls where the service address is defined within the step making it easier to make changes in the future</li>
</ul>
</li>
</ul>
<p>For the next release, I hope to continue to fix issues, <a href="http://odetocode.com/Blogs/scott/archive/2010/07/11/odata-and-ruby.aspx" target="_blank">finally add support for inheritance</a>, add the ability to call a custom WebGet methods added to the service, and hopefully namespacing of entities to limit collisions. Do you have other requests? Add them to the <a href="https://github.com/visoft/ruby_odata/issues" target="_blank">issues list</a> on <a href="http://github.com/" target="_blank">GitHub</a>. The previous Lighthouse site for issues has been closed in favor of using GitHub.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/T2ZY7bP8FeH64EKHX_VeLnIYT_M/0/da"><img src="http://feedads.g.doubleclick.net/~a/T2ZY7bP8FeH64EKHX_VeLnIYT_M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/T2ZY7bP8FeH64EKHX_VeLnIYT_M/1/da"><img src="http://feedads.g.doubleclick.net/~a/T2ZY7bP8FeH64EKHX_VeLnIYT_M/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=T8w7ByLjHeQ:XHoX4-GoLuQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=T8w7ByLjHeQ:XHoX4-GoLuQ:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=T8w7ByLjHeQ:XHoX4-GoLuQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=T8w7ByLjHeQ:XHoX4-GoLuQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=T8w7ByLjHeQ:XHoX4-GoLuQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=T8w7ByLjHeQ:XHoX4-GoLuQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=T8w7ByLjHeQ:XHoX4-GoLuQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=T8w7ByLjHeQ:XHoX4-GoLuQ:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/T8w7ByLjHeQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/09/26/ruby-odata-update-v0-0-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/09/26/ruby-odata-update-v0-0-10/</feedburner:origLink></item>
		<item>
		<title>Silverlight 4 Multi-Binding Converter Enhancement</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/1lxdq77U15Y/</link>
		<comments>http://blogs.visoftinc.com/2011/09/15/silverlight-4-multi-binding-converter-enhancement/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 04:10:31 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=250</guid>
		<description><![CDATA[We have been using Colin Eberhardt’s MultiBinding Converter for Silverlight for quite a while now. It was great until we realized a problem.&#160; When the MultiBinding Converter was off screen (hidden), it would throw a binding error stating that it couldn’t convert null to whatever (in our case it was an integer in one converter [...]]]></description>
			<content:encoded><![CDATA[<p>We have been using Colin Eberhardt’s <a href="http://www.scottlogic.co.uk/blog/colin/2010/08/silverlight-multibinding-updated-adding-support-for-elementname-and-twoway-binding/" target="_blank">MultiBinding Converter for Silverlight</a> for quite a while now. It was great until we realized a problem.&#160; When the MultiBinding Converter was off screen (hidden), it would throw a binding error stating that it couldn’t convert null to whatever (in our case it was an integer in one converter and FontWeight in another).</p>
<h2>The Solution</h2>
<p>The solution is rather easy.&#160; Add a property called TargetNullValue to <strong>MultiBinding.cs</strong> in Colin’s source.&#160; There’s no “magic” in this name, you can call it whatever you want.&#160; TargetNullValue seems to make the most sense for its purpose in this case, and is the name of the property on the actual Silverlight Binding that we’ll be setting in the next step.</p>
<pre class="brush: csharp;">/// &lt;summary&gt;
/// Gets or sets the target null value.
/// &lt;/summary&gt;
public object TargetNullValue { get; set; }</pre>
<p>
  <br />Then, hop over to <strong>MulitBindings.cs</strong> and change the binding (line 110) to utilize the TargetNullValue property on the binding for the ConvertedValue like so:</p>
<p></p>
<pre class="brush: csharp; first-line: 108; highlight: [7];">// bind the ConvertedValue of our MultiBinding instance to the target property
// of our targetElement
Binding binding = new Binding(&quot;ConvertedValue&quot;)
{
  Source = relay,
  Mode = relay.Mode,
  TargetNullValue = relay.TargetNullValue
};</pre>
<p>
  <br />Now, when you use the MultiBinding, just fill in the TargetNullValue property,&#160; for example:</p>
<p></p>
<pre class="brush: xml; highlight: [4];">&lt;TextBlock ...&gt;
    &lt;multi:BindingUtil.MultiBindings&gt;
        &lt;multi:MultiBindings&gt;
            &lt;multi:MultiBinding TargetProperty=&quot;FontWeight&quot; TargetNullValue=&quot;Normal&quot; Converter=...&gt;
                &lt;multi:MultiBinding.Bindings&gt;
                    &lt;multi:BindingCollection&gt;
                        ...
                    &lt;/multi:BindingCollection&gt;
                &lt;/multi:MultiBinding.Bindings&gt;
            &lt;/multi:MultiBinding&gt;
        &lt;/multi:MultiBindings&gt;
    &lt;/multi:BindingUtil.MultiBindings&gt;
&lt;/TextBlock&gt;</pre>
<p>
  <br />Now my Debug Output window isn’t filled with needless binding errors!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/GZWjDlAUlrqxFLszLM2LcgEuNno/0/da"><img src="http://feedads.g.doubleclick.net/~a/GZWjDlAUlrqxFLszLM2LcgEuNno/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GZWjDlAUlrqxFLszLM2LcgEuNno/1/da"><img src="http://feedads.g.doubleclick.net/~a/GZWjDlAUlrqxFLszLM2LcgEuNno/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=1lxdq77U15Y:jHSpcxnFlgs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=1lxdq77U15Y:jHSpcxnFlgs:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=1lxdq77U15Y:jHSpcxnFlgs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=1lxdq77U15Y:jHSpcxnFlgs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=1lxdq77U15Y:jHSpcxnFlgs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=1lxdq77U15Y:jHSpcxnFlgs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=1lxdq77U15Y:jHSpcxnFlgs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=1lxdq77U15Y:jHSpcxnFlgs:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/1lxdq77U15Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/09/15/silverlight-4-multi-binding-converter-enhancement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/09/15/silverlight-4-multi-binding-converter-enhancement/</feedburner:origLink></item>
		<item>
		<title>Silverlight 4 Drop-Down Problems in Popup</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/jROqioRXPPE/</link>
		<comments>http://blogs.visoftinc.com/2011/09/12/silverlight-4-drop-down-problems-in-popup/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 22:50:48 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Silverlight]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=251</guid>
		<description><![CDATA[Are you running Silverlight and using a Popup and a “drop-down” control like a ComboBox (or DatePicker, TimePicker, etc) as a child? You may be seeing some odd behavior when you expand the ComboBox. The “drop-down bit” ends up positioned from the left of your screen, not where it is supposed to be positioned.&#160; Hmmm. [...]]]></description>
			<content:encoded><![CDATA[<p>Are you running Silverlight and using a Popup and a “drop-down” control like a ComboBox (or DatePicker, TimePicker, etc) as a child? You may be seeing some odd behavior when you expand the ComboBox. The “drop-down bit” ends up positioned from the left of your screen, not where it is supposed to be positioned.&#160; Hmmm.</p>
<p>Turns out the solution is easy, but not easy to find. I’m hoping this post will help someone else out and prevent others from beating their heads against a wall.&#160; Ready?</p>
<blockquote><p><strong>Turn off the DropShadowEffect on the Popup.</strong></p>
</blockquote>
<p>This solution is thanks to <a href="http://forums.silverlight.net/members/Rjacobs.aspx">Rjacobs</a>’s <a href="http://forums.silverlight.net/post/500968.aspx" target="_blank">reply on the Silverlight forums</a>. Also, vote for the issue on the <a href="http://connectppe.microsoft.com/VisualStudio/feedback/details/577252/the-position-of-combobox-dropdown-is-incorrect-when-set-it-as-a-child-of-popup-with-dropshadowefffect" target="_blank">Microsoft Connect site</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/0USr8Zbw0HzW7Reu8Vc3c4ABono/0/da"><img src="http://feedads.g.doubleclick.net/~a/0USr8Zbw0HzW7Reu8Vc3c4ABono/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0USr8Zbw0HzW7Reu8Vc3c4ABono/1/da"><img src="http://feedads.g.doubleclick.net/~a/0USr8Zbw0HzW7Reu8Vc3c4ABono/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=jROqioRXPPE:0moBTfh1PoA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=jROqioRXPPE:0moBTfh1PoA:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=jROqioRXPPE:0moBTfh1PoA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=jROqioRXPPE:0moBTfh1PoA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=jROqioRXPPE:0moBTfh1PoA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=jROqioRXPPE:0moBTfh1PoA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=jROqioRXPPE:0moBTfh1PoA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=jROqioRXPPE:0moBTfh1PoA:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/jROqioRXPPE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/09/12/silverlight-4-drop-down-problems-in-popup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/09/12/silverlight-4-drop-down-problems-in-popup/</feedburner:origLink></item>
		<item>
		<title>Introducing a Ruby Wrapper for Google Books API</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/79H8KTGu2kg/</link>
		<comments>http://blogs.visoftinc.com/2011/08/10/introducing-a-ruby-wrapper-for-google-books-api/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 11:06:00 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[google_books]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=245</guid>
		<description><![CDATA[Books.  Personally, I own a ton of them.  Add in my wife’s collection, and phew.  A few years ago, I decided to get my collection under control.  I have bookcases upon bookcases all over the place and I would lose track of my books.  I wanted to catalog my collection, so I built a site [...]]]></description>
			<content:encoded><![CDATA[<p>Books.  Personally, I own a ton of them.  Add in my wife’s collection, and phew.  A few years ago, I decided to get my collection under control.  I have bookcases upon bookcases all over the place and I would lose track of my books.  I wanted to catalog my collection, so I built a site to do just that.</p>
<p>The time has come to rebuild the project.  It’s pretty old, is missing a lot of features, has spun off into another site as well, and, and, and…  That’s for another post.  Anyway, back to the matter at hand.</p>
<p>For the past couple of years, I used to get my book information from <a href="https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html" target="_blank">Amazon’s Product Advertising API</a> for Affiliates. Well, times change, and <a href="http://techcrunch.com/2011/06/10/amazon-shuts-down-associates-affiliate-program-in-connecticut-over-online-sales-tax/" target="_blank">thanks to the State of Connecticut</a>, I’m no longer an Amazon affiliate.  I told you that story to tell you this one…</p>
<p><span id="more-245"></span></p>
<h2>New Options</h2>
<p>Whilst Amazon hasn’t kicked me out yet, since I was redesigning my sites (Rails 3.1 Engines FTW), I decided to look for other APIs.  My search led me to the <a href="http://code.google.com/apis/books/" target="_blank">Google Books API</a>.  I really liked it.  So, off I went to look for a Ruby wrapper around the API.  I found <a href="http://hakanensari.com/" target="_blank">Hakan Ensari’s</a> <a href="http://rubygems.org/gems/google-book" target="_blank">google-book</a> gem (<a href="https://github.com/papercavalier/google-book" target="_blank">source hosted</a> on <a href="http://github.com/" target="_blank">GitHub</a>, of course).  Cool, but after reading the <a href="https://github.com/papercavalier/google-book#readme" target="_blank">README</a>, I realized his wrapper worked against the <a href="http://code.google.com/apis/books/docs/gdata/developers_guide_protocol.html" target="_blank">Google Book Search Data API</a>. This turns out to be a deprecated API “<strong>Important:</strong> The Google GData Books API is deprecated as of May 26, 2011 and will be fully retired on December 1, 2011. Therefore, we encourage you to move to the new <a href="http://code.google.com/apis/books/docs/v1/getting_started.html">Books API</a>.”  Hmm, so what’s a guy to do?</p>
<h2>Introducing google_books</h2>
<p>I initially started with a fork of the google-book project on GitHub, but came to the conclusion that a whole lot had changed in the new API.  I eventually decided to create a new gem called <a href="http://rubygems.org/gems/google_books" target="_blank">google_books</a>.  The project is greatly inspired by Hakan’s gem.  The google_books gem has similar syntax to Hakan’s, and in places I followed his lead.</p>
<p>The gem is really straight-forward to use.  It is in its infancy, but I will be adding to project as I work on rebuilding my sites.  Check out the README for usage and examples.  There are also a <a href="https://github.com/visoft/google_books/tree/master/examples" target="_blank">few examples</a> in the project itself that you can play with.  Let me know what you think.  Fork the project; add cool stuff.  <a href="http://en.wikipedia.org/wiki/Open_source" target="_blank">Open source</a> projects are so rewarding, especially in the Ruby community.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/jevBU7ujNym_RibnMQP2OXuH8uA/0/da"><img src="http://feedads.g.doubleclick.net/~a/jevBU7ujNym_RibnMQP2OXuH8uA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jevBU7ujNym_RibnMQP2OXuH8uA/1/da"><img src="http://feedads.g.doubleclick.net/~a/jevBU7ujNym_RibnMQP2OXuH8uA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=79H8KTGu2kg:j0C1e-7Un9U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=79H8KTGu2kg:j0C1e-7Un9U:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=79H8KTGu2kg:j0C1e-7Un9U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=79H8KTGu2kg:j0C1e-7Un9U:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=79H8KTGu2kg:j0C1e-7Un9U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=79H8KTGu2kg:j0C1e-7Un9U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=79H8KTGu2kg:j0C1e-7Un9U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=79H8KTGu2kg:j0C1e-7Un9U:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/79H8KTGu2kg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/08/10/introducing-a-ruby-wrapper-for-google-books-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/08/10/introducing-a-ruby-wrapper-for-google-books-api/</feedburner:origLink></item>
		<item>
		<title>Entity Framework – Removing Foreign Keys from the Entity Model</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/_UIWFxNiT8Y/</link>
		<comments>http://blogs.visoftinc.com/2011/03/18/entity-framework-removing-foreign-keys-from-the-entity-model/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 17:00:30 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Microsoft SQL]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=238</guid>
		<description><![CDATA[Entity Framework 4.0 has brought some great new features to Entity Framework (although I am SO looking forward to EF 4.1.  Hooray for a code-only option).  One of the new features of EF 4 is the ability to include foreign key columns in your model.  This option will include the foreign key as a property [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.visoftinc.com/wp-content/uploads/2011/03/DatabaseDesign.png"><img style="background-image: none; margin: 10px 0px 10px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="DatabaseDesign" src="http://blogs.visoftinc.com/wp-content/uploads/2011/03/DatabaseDesign_thumb.png" border="0" alt="DatabaseDesign" width="304" height="203" align="right" /></a>Entity Framework 4.0 has brought some great new features to Entity Framework (although I am SO looking forward to <a href="http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-release-candidate-available.aspx" target="_blank">EF 4.1</a>.  Hooray for a code-only option).  One of the new features of EF 4 is the ability to <a href="http://blogs.msdn.com/b/msdnforum/archive/2010/05/07/foreign-key-association-in-entity-framework-4.aspx" target="_blank">include foreign key columns in your model</a>.  This option will include the foreign key as a property within your entity in addition to the <a href="http://msdn.microsoft.com/en-us/library/bb738520.aspx" target="_blank">Navigation Property</a>.  The advantage to doing this is that you can now perform linkage between entities with only needing to fill the foreign key property instead of filling the navigation property.  It works pretty well, unless you want to have something like a zero or 1 association (0..1).  Attempting to change the multiplicity in the designer for the association yields the following error:</p>
<blockquote><p>Error 113: Multiplicity is not valid in Role in relationship X. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be *.</p></blockquote>
<p>Blah.  The solution I found to fix it was to remove the foreign key association on the 0..1 entity.  Now how do we go about doing this?</p>
<p>This post assumes that you added entities with the foreign key columns included in your model and now you need to make changes to your associations.</p>
<p><span id="more-238"></span></p>
<h2>The Easy Way: Remove and Update From Database</h2>
<p>Let’s start with the easy way, which may not work in all situations.  The idea here is to remove the entity that should be the 0..1 entity and UNCHECK the “Include foreign key columns in the model” option when adding the table back.  Here’s the steps:</p>
<ol>
<li>Remove the entity that shouldn’t have the foreign keys defined on it (your 0..1 entity).</li>
<li>Right-click and choose “Update Model from Database.”</li>
<li>On the Add tab, select the table for the entity that you removed.  UNCHECK the “Include foreign key columns in the model” option and click finish.</li>
<li>Back in your model, find the association that you want to change from * to 0..1 in your model.  Change the End2 Multiplicity in the Properties window to 0..1 (Zero or One of X).</li>
<li>Change the navigation property on the parent entity to be singular (it’s most likely plural when you regenerated the table).</li>
</ol>
<p>That should be it.  Pretty easy, but if you’ve done a lot of customization to your entities, then this may not be the best option for you.  You can always dig into the XML of the EDMX by right-clicking the EDMX file and choosing “Open with” and then picking the XML (Text) Editor.</p>
<h2>The Hard Way: EDMX XML Fun</h2>
<p>If you don’t want to delete your entity and re-add it from the database, there is another, more complicated option.  You can always dig into the EDMX’s XML and make the changes yourself.  Word of warning, be sure this is the only change you are making when you do this (no other pending changes).  Make sure everything is checked in before modifying your model.  If something goes wrong here, the best option is to undo your pending changes and start over.  You can really hose your model, so make sure you have a safety net.</p>
<ol>
<li>In the conceptual model, remove the FK property, typically something like ChildId or whatever.</li>
<li>Still in the conceptual model, change the navigation property to be singular.</li>
<li>Once again in the conceptual model, remove the <strong>ReferentialConstraint</strong> for you Association.  Say you Association Name is something like FK_Child_Parent, just dump the <strong>ReferentialConstraint</strong> in there.  Note you can also set the multiplicity here if you need to; you would set the correct multiplicity on the end point.  Your options are *, 1, or 0..1.</li>
<li>Now move down to the C-S Mapping Content (the mappings), and remove the <strong>ScalarProperty</strong> that corresponds to the foreign key you are removing.</li>
<li>Finally, since you removed the <strong>ReferentialConstraint</strong>, you need to add an <strong><a href="http://msdn.microsoft.com/en-us/library/bb399535.aspx" target="_blank">AssociationSetMapping</a></strong> instead.  You can just append this to the end of the <strong>EntityContainerMapping</strong> section of the XML.  Below, you can find a snippet of the <strong>AssociationSetMapping. </strong>Be sure to replace the attributes within the <strong>AssociationSetMapping</strong> that are all in caps.</li>
</ol>
<h3>The AssociationSetMapping Code</h3>
<p>Let’s start with the AssociationSetMapping XML (from Step 5 above).  Don’t worry, I’ll explain it afterwards.  Again, make sure you have your model safely checked in before you start modifying the XML, that way you can always rollback in case things go wrong.</p>
<pre class="brush: xml;">...
&lt;edmx:Mappings&gt;
  &lt;Mapping Space="C-S" ...&gt;
    &lt;EntityContainerMapping ...&gt;
      ...
      &lt;AssociationSetMapping Name="FK_CHILD_PARENT" TypeName="MY_MODEL.FK_CHILD_PARENT" StoreEntitySet="CHILD_ENTITTY_TABLE"&gt;
        &lt;EndProperty Name="PARENT_ENTITY"&gt;
          &lt;ScalarProperty Name="THE_PARENT_KEY_PROPERTY_ENTITY" ColumnName="THE_CHILD_FOREIGN_KEY_PROPERTY_DB" /&gt;
        &lt;/EndProperty&gt;
        &lt;EndProperty Name="CHILD_ENTITY"&gt;
          &lt;ScalarProperty Name="THE_CHILD_KEY_PROPERTY_ENTITY" ColumnName="THE_CHILD_PRIMARY_KEY_DB" /&gt;
        &lt;/EndProperty&gt;
        &lt;Condition ColumnName="THE_CHILD_FOREIGN_KEY_PROPERTY_DB" IsNull="false" /&gt;
      &lt;/AssociationSetMapping&gt;
    &lt;/EntityContainerMapping&gt;
  &lt;/Mapping&gt;
&lt;/edmx:Mappings&gt;
...</pre>
<p>As promised, this needs a bit of explaining.  The best explanation of the AssociationSetMapping comes from the <a href="http://msdn.microsoft.com/en-us/library/bb399535.aspx" target="_blank">MSDN documentation</a>.  Next, the <a href="http://msdn.microsoft.com/en-us/library/bb399578.aspx" target="_blank">EndProperty</a> is fairly straight-forward, it is just the entity name of the endpoint.  You’ll have two, one for the parent entity and one for the child entity.  More information again, <a href="http://msdn.microsoft.com/en-us/library/bb399578.aspx" target="_blank">available on MSDN</a>.  Inside the EndProperty, you need to have a <a href="http://msdn.microsoft.com/en-us/library/bb399167.aspx" target="_blank">ScalarProperty</a>, which maps the conceptual model property (Name) to the name of the table column (ColumnName).  Lastly, the <a href="http://msdn.microsoft.com/en-us/library/cc716732.aspx" target="_blank">Condition</a> is an optional element that is a condition for the mapping.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Q8aNKn1AvrweGRmAd5zvlnSVejY/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q8aNKn1AvrweGRmAd5zvlnSVejY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q8aNKn1AvrweGRmAd5zvlnSVejY/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q8aNKn1AvrweGRmAd5zvlnSVejY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=_UIWFxNiT8Y:7oY_RxLH9U0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=_UIWFxNiT8Y:7oY_RxLH9U0:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=_UIWFxNiT8Y:7oY_RxLH9U0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=_UIWFxNiT8Y:7oY_RxLH9U0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=_UIWFxNiT8Y:7oY_RxLH9U0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=_UIWFxNiT8Y:7oY_RxLH9U0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=_UIWFxNiT8Y:7oY_RxLH9U0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=_UIWFxNiT8Y:7oY_RxLH9U0:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/_UIWFxNiT8Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/03/18/entity-framework-removing-foreign-keys-from-the-entity-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/03/18/entity-framework-removing-foreign-keys-from-the-entity-model/</feedburner:origLink></item>
		<item>
		<title>Ruby OData Update v0.0.8</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/y1e5aSxseOM/</link>
		<comments>http://blogs.visoftinc.com/2011/03/14/ruby-odata-update-v008/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 14:57:26 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby_odata]]></category>
		<category><![CDATA[WCF Data Services]]></category>
		<category><![CDATA[OData]]></category>
		<category><![CDATA[WCF]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=164</guid>
		<description><![CDATA[It has been WAY too long since an update of ruby_odata was released.  I’m happy to announce that version 0.0.8 was released today.  The biggest change, thanks to J.D. Mullin, is support for Basic HTTP Authentication.  It’s an awesome enhancement and very easy to use.  All you need to do is pass in the username [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.odata.org"><img style="margin: 10px 0px 10px 20px; display: inline; float: right;" title="OData_logo_MS_small" src="http://blogs.visoftinc.com/wp-content/uploads/2011/03/OData_logo_MS_small.png" alt="OData_logo_MS_small" width="300" height="37" align="right" /></a>It has been WAY too long since an update of <a href="http://github.com/visoft/ruby_odata" target="_blank">ruby_odata</a> was released.  I’m happy to announce that version 0.0.8 was released today.  The biggest change, thanks to <a href="http://jdmullin.blogspot.com/" target="_blank">J.D. Mullin</a>, is support for Basic HTTP Authentication.  It’s an awesome enhancement and very easy to use.  All you need to do is pass in the username and password as constructor arguments when instantiating a service like so:</p>
<pre class="brush: ruby;">require 'lib/ruby_odata'
svc = OData::Service.new "http://127.0.0.1:8888/SampleService/Entities.svc", { :username =&gt; "bob", :password=&gt; "12345" }</pre>
<p>In addition to the big change by <a href="http://twitter.com/#!/jdmullin" target="_blank">@jdmullin</a>, the following changes are apart of the new version:</p>
<ul>
<li>Support for <a href="http://www.odata.org/developers/protocols/atom-format#PrimitiveTypes" target="_blank">nullable primitive types</a> being returned from an <a href="http://www.odata.org/" target="_blank">OData</a> service.</li>
<li>A change in ActiveSupport 3.0.x broke additions in ruby_odata when you associate a previously saved entity.  This has been corrected, and ActiveSupport 2.3.x (tested 2.3.11) and 3.0.x (tested 3.0.5) are now supported. </li>
<li>Ruby 1.9.2 is now supported.</li>
</ul>
<p>Other “backend” type enhancements were added:</p>
<ul>
<li>Removed Jeweler for releasing gems</li>
<li>Moved to bundler</li>
<li>Updated README to reflect new changes</li>
<li>Updated DB management so that testers aren’t required to move files around</li>
<li>Fixed gemspec to list the development gems</li>
<li>Developers can just do a “bundle install” to get all the required gems</li>
</ul>
<p>One interesting thing that I found while testing is that Ruby 1.9.2 is much faster when running <a href="http://cukes.info" target="_blank">Cucumber</a> tests on Windows.  I was using Ruby 1.8.7-p330 vs 1.9.2-p180 on Windows (<a href="http://rubyinstaller.org/" target="_blank">RubyInstaller</a> rocks!).  Here’s a snapshot:</p>
<p><a href="http://blogs.visoftinc.com/wp-content/uploads/2011/03/CucumberRubyVersionComparison.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="CucumberRubyVersionComparison" src="http://blogs.visoftinc.com/wp-content/uploads/2011/03/CucumberRubyVersionComparison_thumb.png" border="0" alt="CucumberRubyVersionComparison" width="524" height="204" /></a></p>
<p>Note there is a bit of a problem using Ruby 1.9.2 w/ Cucumber on Windows.  The problem is that when using bundler or “gem install,” the <a href="http://rubygems.org/gems/json" target="_blank">json gem</a> gets installed as the x86-mingw32 version.  Running cucumber on Windows with Ruby 1.9.2 (using the incorrectly compiled json gem) yields a msvcrt-ruby18.dll error.  The way I fixed the error was to install the <a href="https://github.com/oneclick/rubyinstaller/wiki/Development-Kit" target="_blank">RubyInstaller DevKit</a>, and then reinstall the gem “correctly” using:</p>
<pre class="brush: bash;">gem uninstall json
gem install json --platform=ruby -v 1.4.6</pre>
<p>What we are doing is uninstalling the incorrect copy of the json gem and then installing v1.4.6 of json using the &#8211;platform=ruby flag which will involve the DevKit to compile the gem for us.  Note that the json gem version required by <a href="http://rubygems.org/gems/cucumber" target="_blank">Cucumber 0.10.0</a> is ~&gt; 1.4.6, and there is a new version out, so the -v 1.4.6 forces the correct one.  Found the <a href="http://stackoverflow.com/questions/2167992/problem-with-ruby-on-rails-on-windowsmsvcrt-ruby18-dll-error-newbie-questions/4777585#4777585" target="_blank">solution on StackOverflow</a>,  but it seems that there should be a better way to solve this, perhaps with <a href="http://gembundler.com/man/bundle-config.1.html" target="_blank">bundle-config</a>?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/72grxYYRhK7cIlZEsz9LFrMbpoI/0/da"><img src="http://feedads.g.doubleclick.net/~a/72grxYYRhK7cIlZEsz9LFrMbpoI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/72grxYYRhK7cIlZEsz9LFrMbpoI/1/da"><img src="http://feedads.g.doubleclick.net/~a/72grxYYRhK7cIlZEsz9LFrMbpoI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=y1e5aSxseOM:S2khKZedYlU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=y1e5aSxseOM:S2khKZedYlU:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=y1e5aSxseOM:S2khKZedYlU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=y1e5aSxseOM:S2khKZedYlU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=y1e5aSxseOM:S2khKZedYlU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=y1e5aSxseOM:S2khKZedYlU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=y1e5aSxseOM:S2khKZedYlU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=y1e5aSxseOM:S2khKZedYlU:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/y1e5aSxseOM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2011/03/14/ruby-odata-update-v008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2011/03/14/ruby-odata-update-v008/</feedburner:origLink></item>
		<item>
		<title>Data Access and Silverlight 4</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/F22YHZjLQw4/</link>
		<comments>http://blogs.visoftinc.com/2010/12/20/data-access-and-silverlight-4/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 01:05:50 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[WCF Data Services]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[OData]]></category>
		<guid isPermaLink="false">http://blogs.visoftinc.com/?p=156</guid>
		<description><![CDATA[You’ve decided to create a new business application (meaning some n-tier application) using Silverlight as the frontend.&#160; Is Silverlight the best choice?&#160; That’s a debate for another post…&#160; Anyway, now it comes to deciding on a data access strategy, which one do you choose?&#160; Well this is one of those things where there is no [...]]]></description>
			<content:encoded><![CDATA[<p>You’ve decided to create a new business application (meaning some n-tier application) using Silverlight as the frontend.&#160; Is <a href="http://encosia.com/2009/09/14/is-silverlight-the-new-webforms/" target="_blank">Silverlight the best choice</a>?&#160; That’s a debate for another post…&#160; Anyway, now it comes to deciding on a data access strategy, which one do you choose?&#160; Well this is one of those things where there is no clear winner.&#160; To make a choice, <a href="http://wildermuth.com/" target="_blank">Shawn Wildermuth</a> has a great post on the “<a href="http://wildermuth.com/2010/07/08/State_of_Data_Access_in_Silverlight_4" target="_blank">State of Data Access in Silverlight 4</a>.”&#160; Looking at his awesome chart comparing plain WCF, <a href="http://msdn.microsoft.com/en-us/library/cc668792(VS.100).aspx" target="_blank">WCF Data Services</a>, and WCF RIA Services, you’ll see that some of the things on the “Cons” side for all of the approaches could be a deal breaker.&#160; So which one should you choose?&#160; Let me take you through a deliberation that I was involved in recently when forced to make this decision.&#160; There is no right answer here (as with most interesting topics), but I would be interested in your feelings on the topic.&#160; Let’s get started…</p>
<h2>Initial Breakdown</h2>
<p>Given the three strategies that Shawn had identified, we had pretty much focused on just WCF Data Services and WCF RIA Services.&#160; Plain old WCF services are useful for a lot of things, but they aren’t very flexible on their own.&#160; Things like client-side shaping, sorting, filtering or paging are rough, plus I don’t see the value in writing boilerplate service code for CRUD operations.&#160; I suppose you could use something like a T4 template for that, but for “standard” web services the thing I really don’t like is SOAP.&#160; I won’t wax poetic about how REST makes so much more sense than SOAP, but if you are interested, you should check out <a href="http://www.amazon.com/gp/product/0596519206?ie=UTF8&amp;tag=visincblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0596519206">RESTful .NET: Build and Consume RESTful Web Services with .NET 3.5</a> by Jon Flanders, it’s a fantastic book.&#160; Sure, you could have a standard WCF Service using REST instead of SOAP, but I don’t believe that you can generate a proxy against a WCF REST service (I don’t mind WebClient/HttpWebRequest code).&#160; That isn’t a deal breaker, but it is when writing a lot of code against a lot of objects.&#160;&#160; We decided that standard WCF just wasn’t the easiest option for the lion’s share of the work.</p>
<p>So that leaves us with WCF Data Services or WCF RIA Services.&#160; For a previous project we had discounted using WCF RIA Services for the majority of the data access (though, we did use it for user roles and such).&#160; Trying to go into a new project with an open mind, we thought we should dig a little deeper into RIA, after all, it “seems” to be the approach that you should use for a business application as you’ll see.</p>
<p><span id="more-156"></span><br />
<h2>WCF RIA Services Overview</h2>
<p>So you’re building a “Business Application,” right?&#160; Well I guess a good place to start would be <strong>File &gt;&gt; New Project &gt;&gt; Silverlight Business Application</strong>, right?&#160; Well this <a href="http://msdn.microsoft.com/en-us/library/ee707360(v=VS.91).aspx" target="_blank">assumes some things</a>, like that you want to use things like Silverlight Navigation (yes, please), controls for user login and registration (partially ok, but we’re using Windows Authentication and don’t need registration code), and it assumes that you want to use RIA Services (maybe, but you wouldn’t be reading this post if this was clear-cut answer).&#160; I like the <a href="http://msdn.microsoft.com/en-us/library/ee707344(v=VS.91).aspx" target="_blank">concept of RIA Services</a> very much, but the implementation has some fundamental flaws.&#160; Let’s start with a couple of pros that RIA provides where I see real value:</p>
<blockquote><h3>Validation</h3>
<p>Who likes validation code?&#160; Hmmm, no hands raised?&#160; RIA’s <a href="http://www.nikhilk.net/RIA-Services-Validation.aspx" target="_blank">validation seems fantastic</a> (at least on paper; I haven’t tried all of them in practice).&#160; Having validation code that is shared between the client and server is cool and it’s a nice addition to Silverlight.&#160; This is really the single compelling reason behind using RIA Services for me.</p>
<h3>Sharing Code</h3>
<p>Sometimes there is a disconnect between your entity model and the code you want to expose to the client.&#160; For example, let’s say you have a Person object that has a First and Last Name.&#160; Well, you want to expose a property called DisplayName to the client, which joins the First and Last Name.&#160; With RIA, the DisplayName property can be added on the server and Silverlight will see it.&#160; With something like WCF Data Services, you would need to augment the Person class on the Silverlight side, where the server knows nothing about this property (Is that a big deal in this example?&#160; Not really).</p>
</blockquote>
<p><a href="http://wildermuth.com/2010/07/08/State_of_Data_Access_in_Silverlight_4" target="_blank">Shawn’s post</a> lists more than discussed here, but those two really stand out as useful to me.&#160; I want to embrace WCF RIA Services, but a few of the cons really rub me the wrong way.</p>
<blockquote><h3>Model and Service Disconnect</h3>
<p>Referring to <a href="http://wildermuth.com/2010/07/08/State_of_Data_Access_in_Silverlight_4" target="_blank">Shawn’s post</a>, the very first con is “Entity Changes Don’t Cascade to Contract.”&#160;&#160; What does this mean?&#160; Let’s say you are incrementally building an app for managing products.&#160; You start with a very simple model with only one entity exposed, “Product.”&#160; You add the Products to your model, and you expose this over RIA Services using the wizard (listed as a pro on <a href="http://wildermuth.com/2010/07/08/State_of_Data_Access_in_Silverlight_4" target="_blank">Shawn’s post</a>, but wizards aren’t always a blessing as you’ll see).&#160; Anyway, so far so good.&#160; You continue your development, and you find out you need to add a “Category” entity to your model.&#160; Assuming you’re using Entity Framework, you update your model from the database (good tooling), and then you try to expose the entity over your RIA Service.&#160; Ummm…&#160; You try clicking and right-clicking all over looking for something like “Update RIA Service from Model” only to find that it <a href="http://www.sadtrombone.com/" target="_blank">doesn’t exist</a>.</p>
<p>Having a disconnect between the model and the service is a giant red flag for errors on a team.&#160; Your model can end up looking totally different than the objects you are passing over the wire, resulting in all sorts of fun errors.&#160; There are workarounds for the issue, for example <a href="http://www.wcfriaservices.net/Blog/post/How-to-setup-your-DomainService-using-partial-classes-for-easy-maintenance.aspx" target="_blank">using a partial service class for each entity</a>, or <a href="http://blog.davidyack.com/journal/2009/5/20/update-net-ria-services-domain-service-from-model.html" target="_blank">manually copying and pasting code from a temporary service into your actual service</a>.&#160; You can get over the con of not having tooling, but neither option is really great (IMHO).</p>
<h3>No Eager Loading Support</h3>
<p>I was most shocked to find this out, since the proxies for WCF Data Services and WCF RIA Services look similar.&#160; With RIA, when you are in Silverlight (say a ViewModel or Repository) you cannot dictate what data you want.&#160; Let’s say you have a Person object, and each Person has 1 to many Address objects.&#160; On the client, you want to get and display a property found on the Address object (like City or something).&#160; Well, the client can’t eager load the Person’s Addresses.&#160; With WCF Data Services, you can add an .Expand(“Address”) to your query that you send in order to eagerly load the Address for a Person.&#160; This doesn’t exist with RIA though.&#160; The workaround is to perform an .Include(“Address”) in your service method that gets the list of People.&#160; However, this really isn’t a workaround.&#160; As a consumer of a service (Silverlight or otherwise), I want to be able to dictate what I need, not have the server force the “worst case scenario” down to me.&#160; Of course you could have two methods, like GetPeople() and GetPeopleWithAddresses(), etc., but yuck.</p>
<h3>Generated Code</h3>
<p>This isn’t listed in Shawn’s list, but I’ve bumped into issues with the “Generated Code” folder in my Silverlight projects.&#160; WCF RIA Services generates it’s client-side code when you build your solution.&#160; This is super fragile.&#160; What is wrong with Service References?&#160; I’d like to have the option to break my client when I feel like it (Update Service Reference), but I don’t get the choice with RIA.&#160; Build your solution, and boom all the changes are pulled down whether you are ready or not.</p>
</blockquote>
<h2>WCF Data Services Overview</h2>
<p>Full disclosure, I <strong>LOVE</strong> WCF Data Services.&#160; Does it have some shortcomings?&#160; Sure, but it’s quite amazing.&#160; I have been using WCF Data Services through all of it’s names (code-name Astoria, ADO.NET Data Services, and now WCF Data Services).&#160; I’ve used it before the output was known as <a href="http://www.odata.org/" target="_blank">OData</a>, etc.&#160; In short, I’m a huge fan of the strategy.&#160; My love of WCF Data Services comes from the fact that they are REST based and can be consumed by just about anything (shameless plug for <a href="http://github.com/visoft/ruby_odata" target="_blank">ruby_odata</a>; <a href="http://blogs.visoftinc.com/archive/2010/06/12/Introducing-a-Ruby-OData-Client-Library.aspx">more info here</a>).&#160; I also like the simplicity of exposing your data model over HTTP.&#160; IQueryable&lt;T&gt; collections, that I can shape on the client and I don’t have to code specific methods for, makes all the sense in the world to me.&#160; As you know I’ve <a href="http://bit.ly/bfEkgT" target="_blank">fallen in love with Ruby on Rails</a>, but WCF Data Services is THE thing that I miss when writing a Rails app.&#160; All I’m saying is that my views may be a little skewed.</p>
<p>Having used WCF Data Services for so long, I’m pretty familiar with the good and the bad.&#160; The only two things that are lacking are the two “pros” found in the WCF RIA Services discussion found above.&#160; Really though, WCF Data Services serve all spaces and isn’t specific to “Silverlight” or RIA Applications.&#160; You can do validations with WCF Data Services just fine (e.g. <a href="http://msdn.microsoft.com/en-us/library/dd744842.aspx" target="_blank">QueryInterceptors and ChangeInterceptors</a>), but these are limited to the server.&#160; It makes perfect sense though.&#160; How could the WCF Data Services team integrate client and server validation into one when the range of clients is so broad?&#160; The wide reach of WCF Data Services is what makes them so useful.</p>
<h3>Conclusions</h3>
<p>After deliberating for hours, we decided to stick with WCF Data Services for the lion’s share of our development.&#160; This decision was made simply because none of the WCF Data Services cons were deal-breakers for us, while the cons with WCF RIA Services were harder to swallow.&#160; Again, that doesn’t mean we aren’t going to use pieces here and there (like RIA for roles and such), but we felt we needed a “default direction.”&#160; What are your feelings on this?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/v1uMAuEw8adoLCnDSZBDME1QCY8/0/da"><img src="http://feedads.g.doubleclick.net/~a/v1uMAuEw8adoLCnDSZBDME1QCY8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/v1uMAuEw8adoLCnDSZBDME1QCY8/1/da"><img src="http://feedads.g.doubleclick.net/~a/v1uMAuEw8adoLCnDSZBDME1QCY8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=F22YHZjLQw4:5T6XgS-8kGY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=F22YHZjLQw4:5T6XgS-8kGY:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=F22YHZjLQw4:5T6XgS-8kGY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=F22YHZjLQw4:5T6XgS-8kGY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=F22YHZjLQw4:5T6XgS-8kGY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=F22YHZjLQw4:5T6XgS-8kGY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=F22YHZjLQw4:5T6XgS-8kGY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=F22YHZjLQw4:5T6XgS-8kGY:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/F22YHZjLQw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2010/12/20/data-access-and-silverlight-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2010/12/20/data-access-and-silverlight-4/</feedburner:origLink></item>
		<item>
		<title>Ruby OData Update v0.0.7</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/aeN_jdi8Vss/</link>
		<comments>http://blogs.visoftinc.com/2010/07/06/ruby-odata-update-v007/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 00:48:49 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[OData]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby_odata]]></category>
		<category><![CDATA[WCF]]></category>
		<guid isPermaLink="false">/archive/2010/07/06/ruby-odata-update-v007.aspx</guid>
		<description><![CDATA[I  just wanted to give an update on the ruby_odata progress.  If you don’t know about ruby_odata or want a refresher, I blogged about it a few weeks ago.  Anyway, I just released a new version of the gem, v0.0.7.  With this new version, you can now perform batch saves (multiple adds, deletes, and updates) [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 10px 0px 10px 10px; display: inline; border-width: 0px;" title="OData_logo_MS_small" src="http://blogs.visoftinc.com/wp-content/uploads/OData_logo_MS_small_1.png" border="0" alt="OData_logo_MS_small" width="300" height="36" align="right" /> I  just wanted to give an update on the <a href="http://github.com/visoft/ruby_odata" target="_blank">ruby_odata</a> progress.  If you don’t know about ruby_odata or want a refresher, <a href="http://blogs.visoftinc.com/archive/2010/06/12/Introducing-a-Ruby-OData-Client-Library.aspx">I blogged about it a few weeks ago</a>.  Anyway, I just released a new version of the gem, v0.0.7.  With this new version, you can now perform batch saves (multiple adds, deletes, and updates) and types are being supported.  The library is getting more mature with each revision.  Below is the state of the current gem:</p>
<ul>
<li>&lt;Collection&gt; dynamic methods are available after you instantiate the service.  You can chain query operations like <strong>order_by</strong>, <strong>filter</strong>, <strong>expand</strong>, etc. on to the dynamic methods.<br />
 </li>
<li>For querying, <a href="http://www.odata.org/developers/protocols/uri-conventions#OrderBySystemQueryOption" target="_blank">$orderby</a>, <a href="http://www.odata.org/developers/protocols/uri-conventions#TopSystemQueryOption" target="_blank">$top</a>, <a href="http://www.odata.org/developers/protocols/uri-conventions#SkipSystemQueryOption" target="_blank">$skip</a>, <a href="http://www.odata.org/developers/protocols/uri-conventions#FilterSystemQueryOption" target="_blank">$filter</a>, and <a href="http://www.odata.org/developers/protocols/uri-conventions#ExpandSystemQueryOption" target="_blank">$expand</a> are supported.  These are represented by the methods <strong>order_by</strong>, <strong>top</strong>, <strong>skip</strong>, <strong>filter</strong>, and <strong>expand </strong>(respectively) on the OData::QueryBuilder class (which is returned from the dynamic collection methods), for example: <span style="font-family: Courier New;">svc.Products.top(10)</span>.<br />
 </li>
<li>The ability to add entities.  <strong>AddTo&lt;Collection&gt;</strong> dynamic methods are available after you instantiate the service, allowing you to pass new entities to the methods.<br />
 </li>
<li>The ability to update entities though the <strong>update_object</strong> method on the OData::Service.<br />
 </li>
<li>The ability to delete entities though the <strong>delete_object</strong> method on the OData::Service.<br />
 </li>
<li>The ability to batch saves, which allows you to pass multiple objects to be added, updated, or deleted and have them persisted as a batch when you call the <strong>save_changes</strong> method on the OData::Service.  Note that with batch saves, the changes either complete or fail as a batch.<br />
 </li>
<li>Explicit data type support for the following: (Everything outside of this list currently is represented as a string.)
<ul>
<li>Edm.Int16</li>
<li>Edm.Int32</li>
<li>Edm.Int64</li>
<li>Edm.Decimal</li>
<li>Edm.DateTime – Note that DateTime is a bit odd.  There’s no time zone data passed from <a href="http://www.odata.org/" target="_blank">OData</a> services (at least not with <a href="http://msdn.microsoft.com/en-us/library/cc668792(VS.100).aspx" target="_blank">WCF Data Services</a>), so it is assumed that the time zone is UTC for all DateTime types.<br />
 </li>
</ul>
</li>
<li>Support for Complex Types – From OData.org: “<strong><strong>Complex</strong> <strong>Types</strong></strong> are structured <strong>types</strong> also consisting of a list of properties but with no key, and thus can only exist as a property of a containing entity or as a temporary value.”  You’ll typically see these to logically group properties together.  For example, with the Netflix service, they expose a BoxArt complex type on a Title.  The BoxArt type consists of 3 properties, SmallUrl, MediumUrl, LargeUrl.  This makes accessing these clearer and cleaner, for example <span style="font-family: Courier New;">movie.BoxArt.MediumUrl</span>.<br />
 </li>
<li>Works with Ruby 1.8.7 and Ruby 1.9.1.  It also works with ActiveSupport 3.0.0.beta4.  These were tested on Windows due to using WCF Data Services for the test suite, although, if something Ruby works in Windows there is a good chance everything should be fine on Mac or Linux as well.  I could always change the test URLs to point at a remote machine to do my testing on a Mac, but I wish there was an OData producer like WCF Data Services that would work with <a href="http://rails.rubyonrails.org/classes/ActiveRecord/Base.html" target="_blank">ActiveRecord</a> (or similar).</li>
</ul>

<p><a href="http://feedads.g.doubleclick.net/~a/uhRv3ab7p2vu1DN5tqy8ltutfyQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/uhRv3ab7p2vu1DN5tqy8ltutfyQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uhRv3ab7p2vu1DN5tqy8ltutfyQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/uhRv3ab7p2vu1DN5tqy8ltutfyQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=aeN_jdi8Vss:hRpk5dXleJo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=aeN_jdi8Vss:hRpk5dXleJo:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=aeN_jdi8Vss:hRpk5dXleJo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=aeN_jdi8Vss:hRpk5dXleJo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=aeN_jdi8Vss:hRpk5dXleJo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=aeN_jdi8Vss:hRpk5dXleJo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=aeN_jdi8Vss:hRpk5dXleJo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=aeN_jdi8Vss:hRpk5dXleJo:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/aeN_jdi8Vss" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2010/07/06/ruby-odata-update-v007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2010/07/06/ruby-odata-update-v007/</feedburner:origLink></item>
		<item>
		<title>Introducing a Ruby OData Client Library</title>
		<link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/dIwAlCTv2JU/</link>
		<comments>http://blogs.visoftinc.com/2010/06/12/introducing-a-ruby-odata-client-library/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 04:37:28 +0000</pubDate>
		<dc:creator>Damien White</dc:creator>
				<category><![CDATA[OData]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby_odata]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[WCF Data Services]]></category>
		<category><![CDATA[Web Services]]></category>
		<guid isPermaLink="false">/archive/2010/06/12/Introducing-a-Ruby-OData-Client-Library.aspx</guid>
		<description><![CDATA[Ever since the ADO.NET team started development on Astoria (pre-release), I have loved the concept.&#160; Since its release (it was called ADO.NET Data Services and is now WCF Data Services), I’ve used it a ton (you may remember the example from this post).&#160; Back at MIX10, Microsoft announced a commitment to the Open Data Protocol [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.odata.org/"><img style="border-right-width: 0px; margin: 20px 10px 20px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="OData_logo_MS_small" border="0" alt="OData_logo_MS_small" align="right" src="http://blogs.visoftinc.com/wp-content/uploads/OData_logo_MS_small.png" width="240" height="29" /></a> Ever since the ADO.NET team started development on Astoria (pre-release), I have loved the concept.&#160; Since its release (it was called ADO.NET Data Services and is now WCF Data Services), I’ve used it a ton (you may remember the example from <a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx">this post</a>).&#160; Back at MIX10, Microsoft announced a commitment to the <a href="http://www.odata.org/" target="_blank">Open Data Protocol</a> (<a href="http://www.odata.org/" target="_blank">OData</a>).&#160; <a href="http://msdn.microsoft.com/en-us/library/cc668792(VS.100).aspx" target="_blank">WCF Data Services</a> enables you to create services that use OData to expose and consume data, both with .NET 4 and .NET 3.5 SP1.&#160; OData services are very powerful and there are quite a few <a href="http://www.odata.org/producers" target="_blank">live producers</a> such as <a href="http://odata.netflix.com/Catalog/" target="_blank">Netflix</a> and <a href="http://www.nerddinner.com/Services/OData.svc/" target="_blank">Nerd Dinner</a>.</p>
<p>OData is so powerful because it’s REST based and you can access the services from just about everywhere, including just a simple URL.&#160; For example, using the Netflix OData service to access the best movie ever made by title: <a href="http://odata.netflix.com/Catalog/Titles?$filter=Name eq 'Office Space'">http://odata.netflix.com/Catalog/Titles?$filter=Name eq &#8216;Office Space&#8217;</a>.&#160; Pretty simple.&#160; Of course accessing things solely based on URLs in code isn’t the best, and hence the reason for my post.</p>
<h2>Client Libraries</h2>
<p>When using OData, it’s convenient to utilize an SDK to access the services.&#160; For example, in <a href="http://msdn.microsoft.com/en-us/library/cc838234(VS.96).aspx" target="_blank">Silverlight</a> you can access <a href="http://msdn.microsoft.com/en-us/library/ff650916(v=VS.96).aspx" target="_blank">OData services using LINQ</a>.&#160; There’s also a fantastic <a href="http://www.asp.net/ajaxLibrary/odata.ashx" target="_blank">AJAX Library</a> (which I used in a <a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx" target="_blank">previous post</a>).&#160; There are SDKs for <a href="http://odataphp.codeplex.com/" target="_blank">PHP</a>, <a href="http://odataobjc.codeplex.com/" target="_blank">Objective-C</a>, and many others, but there was one missing that I wanted to use… Ruby.&#160; I am assuming this comes as no surprise given my new found <a href="http://blogs.visoftinc.com/category/Ruby.aspx">love for Ruby</a>.</p>
<p><span id="more-71"></span><br />
<h2>Introducing ruby_odata</h2>
<p>I’ve been messing around with Ruby enough to start working on my first Ruby open-source project.&#160; It’s always good to contribute to the open-source community.&#160; While I’m not a seasoned Ruby developer, I figure this is a good project to start on.&#160; Now I can code stuff in Ruby and consume WCF services I have written in the past and will continue to write in the future (that is until there is “OData on <a href="http://rubyonrails.org/" target="_blank">Rails</a>,” perhaps an idea for a new project?).</p>
<p>The source code, like all good Ruby code, is <a href="http://github.com/visoft/ruby_odata" target="_blank">hosted on GitHub</a>.&#160; The <a href="http://github.com/visoft/ruby_odata/blob/master/README.rdoc" target="_blank">README</a> will give you a good idea of how to use the library.&#160; Currently (as of 06/12/2010) there are limitations, such as not being able to batch changes (like multiple Adds), but no worries, I’m working on adding them (actually, I cut three releases today, adding extra querying abilities).&#160; That said, it is functional enough to use for most operations right now.&#160; Once it’s been better tested in the real world and I’ve been able to incorporate most if not all of the OData functionality, I will be versioning more responsibly.&#160; Right now, because I’m adding functionality quickly and I want others to be able to use it, you’ll be seeing lots of updates so the version number will be a bit jumpy for a while.</p>
<h2>The Genesis of ruby_odata</h2>
<p>I started writing ruby_odata in order to interface with my database via services so I could do testing in Ruby and create objects from within the tests that I could use in my ASP.NET MVC application.&#160; I wrote about BDD testing in <a href="http://blogs.visoftinc.com/archive/2010/06/10/Behavior-Driven-Development-(BDD)-with-Cucumber-and-ASP.NET-MVC.aspx">an earlier post</a> where I fixed the speed of running the tests using Cucumber with <a href="http://github.com/tenderlove/mechanize" target="_blank">Mechanize</a>.&#160; Another area missing in .NET is the ability to automatically generate objects to test against like you can with <a href="http://github.com/ianwhite/pickle" target="_blank">Ian White’s Pickle</a>.&#160;&#160; <a href="http://github.com/ianwhite/pickle" target="_blank">Pickle</a> interacts nicely with factories and your database to create objects for tests.&#160; For example, a step like: <span style="font-family: courier new">Given a user exists with name: &quot;Damien&quot; </span>will automatically create a new user in the test database.&#160; This works dandy in the Ruby world (with <a href="http://rails.rubyonrails.org/classes/ActiveRecord/Base.html" target="_blank">ActiveRecord</a> for example), but against something like Entity Framework, not so much.&#160; With <a href="http://github.com/visoft/ruby_odata" target="_blank">ruby_odata</a> however, this is something that could work in a similar way. (Yet another idea for a project, a Pickle adapter that utilizes ruby_odata.&#160; Man, so many ideas, so little time.)</p>
<h2>Usage Overview</h2>
<p>The library is pretty straightforward to use.&#160; At the heart is the <strong>OData::Service</strong>.&#160; This is the root object that drives all of your operations against the services.&#160;&#160; Once you instantiate the <strong>OData::Service</strong>, dynamic methods based on the OData service’s collections are available to call.&#160; For example, using the <a href="http://odata.netflix.com/Catalog/" target="_blank">Netflix OData service</a>, we can see there is a collection called “Titles.”&#160; Within ruby_odata, the <strong>OData::Service </strong>will respond to a “Titles” method:</p>
<pre class="brush: ruby;">svc = OData::Service.new &quot;http://odata.netflix.com/Catalog/&quot;
puts &quot;Responds to Titles? #{svc.respond_to? :Titles}&quot; # =&gt; Responds to Titles? true</pre>
<p>
  <br />So, just by looking at the collections on the <a href="http://odata.netflix.com/Catalog/" target="_blank">main service page</a>, or <a href="http://odata.netflix.com/Catalog/$metadata" target="_blank">metadata page</a>, you can see what you can query.&#160; Here’s an example of querying for a movie (like we did earlier with a straight up URL):</p>
<p></p>
<pre class="brush: ruby;">svc.Titles.filter(&quot;Name eq 'Office Space'&quot;)
movie = svc.execute
# Now we can access properties of the Title (defined in the service metadata)
puts &quot;Average Rating: #{movie.AverageRating}&quot;
puts &quot;Release Year: #{movie.ReleaseYear}&quot;
puts &quot;URL: #{movie.Url}&quot;
# =&gt; Average Rating: 4.2
# =&gt; Release Year: 1999
# =&gt; URL: http://www.netflix.com/Movie/Office_Space/20358351</pre>
<p>Pretty cool, huh?</p>
<h2>The Basics</h2>
<p>There is a simple pattern for using the library.&#160; For queries, you call a collection on the service (like you saw with <strong>Titles</strong> in the Netflix example above), and that returns an <strong>OData::QueryBuilder</strong> object to you in which you can fluently add options like <strong>filter</strong> or <strong>expand</strong>.&#160; If you use multiple calls to filter, it will perform an “AND” query against the service, and multiple expand calls will yield multiple items being expanded.&#160; You can also mix the calls, like <strong>.filter(…).expand(…)</strong>.&#160; Once you are done building a query, you call the <strong>execute</strong> method on the service.&#160; The result of the execute is either a single entity or a collection of the entities based on your query.</p>
<p>In order to add, update, or delete, you need to call the appropriate method on the <strong>OData::Service</strong>.&#160; To add, you would use the dynamic method <strong>AddTo&lt;Collection Name&gt;</strong>, where the &lt;Collection Name&gt; is the name of the collection on the service (as defined by the metadata).&#160; To update, you would use <strong>update_object,</strong> passing in the updated version of the object.&#160; Finally, to delete, you would use <strong>delete_object</strong>, passing the object to delete.&#160; Once you do one of these operations, you need to persist the change using the <strong>save_changes</strong> method on the <strong>OData::Service</strong>.&#160; Currently, you need to call save_changes after each operation in order to persist the data.&#160; In the future you will be able to batch operations instead of persisting them one at a time.</p>
<h2>More Examples</h2>
<p>For more examples, download the <a href="http://github.com/visoft/ruby_odata" target="_blank">source code</a> from GitHub and setup the testing environment (instructions for setting up the test environment are located in the <a href="http://github.com/visoft/ruby_odata/blob/master/README.rdoc" target="_blank">README</a>).&#160; When you setup the test environment, you can follow along with the samples as shown in the <a href="http://github.com/visoft/ruby_odata/blob/master/README.rdoc" target="_blank">README</a>.&#160; There are examples for all the CRUD operations.</p>
<h2>Conclusion</h2>
<p>There you have it, an OData library for Ruby.&#160; I am very excited by the potential of <a href="http://www.odata.org/" target="_blank">OData</a>, and having the ability to consume the services easily within Ruby is extremely useful.&#160; I hope you find the library helpful.&#160; The current version is a bit of a work in progress since everything isn’t fully supported yet, but I will continue to work on the project.&#160; You can get involved by checking out the resources for the project:</p>
<ul>
<li>Source Code (hosted on GitHub): <a title="http://github.com/visoft/ruby_odata" href="http://github.com/visoft/ruby_odata">http://github.com/visoft/ruby_odata</a> </li>
<li>Documentation (hosted on rdoc.info): <a title="http://rdoc.info/projects/visoft/ruby_odata" href="http://rdoc.info/projects/visoft/ruby_odata">http://rdoc.info/projects/visoft/ruby_odata</a> </li>
<li>Issue tracking (hosted on GitHub): <a title="https://github.com/visoft/ruby_odata/issues" href="https://github.com/visoft/ruby_odata/issues">https://github.com/visoft/ruby_odata/issues</a></li>
<li>Wiki (hosted on GitHub): <a title="http://wiki.github.com/visoft/ruby_odata/" href="http://wiki.github.com/visoft/ruby_odata/">http://wiki.github.com/visoft/ruby_odata/</a> </li>
</ul>
<p>If you just want to start using it without the source code, you can install ruby_odata as a <a href="http://rubygems.org/gems/ruby_odata" target="_blank">gem from RubyGems.org</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/t4O7oGrIC4cYywUIIWe_d32Prpg/0/da"><img src="http://feedads.g.doubleclick.net/~a/t4O7oGrIC4cYywUIIWe_d32Prpg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/t4O7oGrIC4cYywUIIWe_d32Prpg/1/da"><img src="http://feedads.g.doubleclick.net/~a/t4O7oGrIC4cYywUIIWe_d32Prpg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=dIwAlCTv2JU:Giw8WyqgrME:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=dIwAlCTv2JU:Giw8WyqgrME:YGfevXCVqpo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=dIwAlCTv2JU:Giw8WyqgrME:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=dIwAlCTv2JU:Giw8WyqgrME:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=dIwAlCTv2JU:Giw8WyqgrME:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=dIwAlCTv2JU:Giw8WyqgrME:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=dIwAlCTv2JU:Giw8WyqgrME:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=dIwAlCTv2JU:Giw8WyqgrME:F7zBnMyn0Lo" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/dIwAlCTv2JU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.visoftinc.com/2010/06/12/introducing-a-ruby-odata-client-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.visoftinc.com/2010/06/12/introducing-a-ruby-odata-client-library/</feedburner:origLink></item>
	</channel>
</rss>

