Hanselminutes Podcast 262 - The Rise of the Micro-ORM with Sam Saffron and Rob Conery
Scott's at Mix this week and he sits down with Sam Saffron and Rob Conery to talk about their Micro-ORMs. What have they done in less than 400 lines of code, that the rest of the planet needs a dozen assemblies for? Should you abandon your ORM and start writing inline SQL? All this and more.
Here's a few examples to look at while you listen to the show:
Dapper
var guid = Guid.NewGuid();
var dog = connection.ExecuteMapperQuery<Dog>("select Age = @Age, Id = @Id", new { Age = (int?)null, Id = guid });
Massive
var tbl = new Products();
var products = tbl.All(where: "CategoryID = @0 AND UnitPrice > @1", orderBy: "ProductName", limit: 20, args: 5,20);
Download: MP3 Full Show
Links:
NOTE: If you want to download our complete archives as a feed - that's all 262 shows, subscribe to the Complete MP3 Feed here.
Also, please do take a moment and review the show on iTunes.
Subscribe: or or Zune
Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.
Telerik is our sponsor for this show.
Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface and developer tools, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET AJAX,MVC,Silverlight, Windows Forms and WPF. Enjoy developer tools like .NET Reporting,ORM,Automated Testing Tools, Agile Project Management Tools, and Content Management Solution. And now you can increase your productivity with JustCode, Telerik’s new productivity tool for code analysis and refactoring. Visitwww.telerik.com.
As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)
Enjoy. Who knows what'll happen in the next show?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
I Like your show and the rise of the MicroORMs:).
It is a refreshing counterpath to the hyped "enterprise" way of doing data. A clever friend of mine has as reaction of and burst of nHibernate frustration developed MicroDAL. I recommend checking it out on CodePlex http://microdal.codeplex.com.
Code on!
/Per
Cheers,
Johan
Is this the right syntax: args: 5,20
Or did you mean: args: new object[] { 5, 20 }
I can't see how the former syntax would be declared in order to work like that. Could you elaborate?
ORM should never be used except for prototyping. Or if you just don't care about performance or data design at all.
That is a rather strong statement, would you say that if you are not writing your own IL all C# code sucks?
Abstractions leak performance, it is inevitable. Sometimes the leak is not noticeable and the benefit far outweighs the cost.
I agree that often ORMs generate ungodly SQL, however ... in many cases they generate fine SQL and you win on the productivity front.
My advice would be: "understand your tools and their performance characteristics"
In a nutshell --> PHENOMENAL product. Looking to test out Massive as well when I get time but I'm sold!
Comments are closed.