Blog - Microsoft .NET, ASP.NET, AJAX and more

Introducing a Ruby OData Client Library

by Damien White 6/12/2010 9:37:28 PM

OData_logo_MS_small Ever since the ADO.NET team started development on Astoria (pre-release), I have loved the concept.  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).  Back at MIX10, Microsoft announced a commitment to the Open Data Protocol (OData).  WCF Data Services enables you to create services that use OData to expose and consume data, both with .NET 4 and .NET 3.5 SP1.  OData services are very powerful and there are quite a few live producers such as Netflix and Nerd Dinner.

OData is so powerful because it’s REST based and you can access the services from just about everywhere, including just a simple URL.  For example, using the Netflix OData service to access the best movie ever made by title: http://odata.netflix.com/Catalog/Titles?$filter=Name eq 'Office Space'.  Pretty simple.  Of course accessing things solely based on URLs in code isn’t the best, and hence the reason for my post.

Client Libraries

When using OData, it’s convenient to utilize an SDK to access the services.  For example, in Silverlight you can access OData services using LINQ.  There’s also a fantastic AJAX Library (which I used in a previous post).  There are SDKs for PHP, Objective-C, and many others, but there was one missing that I wanted to use… Ruby.  I am assuming this comes as no surprise given my new found love for Ruby.   More...

Shout it kick it on DotNetKicks.com Bookmark and Share

Behavior Driven Development (BDD) with Cucumber and ASP.NET MVC

by Damien White 6/10/2010 6:18:40 PM

cucumber_logo So as I’m sure you have guessed by my last bunch of posts, I’ve been hooked on Ruby and Rails development.  The more I use it, the more I love it.  I felt I was loving it a bit too much, so decided to divert my attention back to ASP.NET MVC for a while.  While developing with Rails, I was practicing BDD with Cucumber.   I felt that Cucumber scenarios (written Gherkin) were far more useful for the majority of my testing on a web application.  Sure unit tests are worthwhile for bits of code, but I’ve found that they don’t always make sense when testing a web application (like Steve Sanderson has mentioned).  Some may argue that these tests are brittle, but honestly, I feel it defines my application better and it definitely tests the actual interactions better.  I’m fully on board for unit tests for complex processes, but the majority of web work just isn’t that complex.

I’m not going to go fully into what BDD is here, but my goal was to use a similar process when developing ASP.NET MVC applications as I did in Rails.  With Rails, it’s simple, Rails, Cucumber, Pickle, ActiveRecord, Factory Girl, Webrat, etc. work perfectly together.   In the .NET world, there are options, but nothing that really fit together as nicely.  I started with just wanting to test my basic application (menus, breadcrumbs, etc) and didn’t venture into model work yet, so I figured it would be as simple and efficient as it is in Rails.  Not so much.  I tweeted about this exact thing a while ago.  More...

Shout it kick it on DotNetKicks.com Bookmark and Share