If you have not done so, please examine Part 01 of this series of posts.
You have to give MSFT a lot of credit for knowing their business. The way they are handling ORM is a case in point. Still smarting from attempting to dictate ORM approached via ObjectSpaces (see below), the company is now taking a more empirical (read: Agile) approach to ORM.
LINQ: The ‘under’ ORM
Since the debut of LINQ and DLINQ, there is a lot of spirited debate, pro and con, all over the web, on the following:
- On whether LINQ and/or DLINQ is actually an ORM;
- On which features are essential parts of the “killer” ORM architecture;
- On which ORM approach makes the most sense, now (simple CRUD adapters, or much more);
- On which present-day .NET ORM tools are the best, now (Nhibernate, Gentle, etc) ;
- On whether the ORM problem can EVER be completely solved (ORM as “the Vietnam of Computer Science”);
- And so on
For sure, MSFT intentionally creates this debate.
For sure, MSFT is tracking ALL of this discussion and debate, and ultimately plans OWN this ORM parade, not simply get in front of it. And they are clearly out front with LINQ.
LINQ: The ORM API
LINQ in .NET 3.5 is a mere starting point for MSFT in the overall strategy to do the following:
- Establish and control the API layer for all .NET ORM products;
- Initiate the debate on what are the best and most desired features for industrial-strength ORM products;
- Enable ORM writers to implement these consensus best-approach features, via LINQ, the de facto API of .NET ORM;
- Slowly and surely assimilate those best ideas (built on LINQ) into the ultimate Visual Studio ORM tool. It appears first in VS Team System.
Via LINQ, in one shot, MSFT has opened the debate, enabled ORM writers, and created, and captured control of, the API layer for ORM in .NET.
Microsoft is prompting you to use your imagination with LINQ– the “under-ORM”.
LINQ, the first-class language feature, is but the first step in an adaptive (read: “Agile”) strategy with respect to ORM. The company is smart enough to know that interest in ORM and the global consensus with respect to the best approach is just developing now. By taking the API approach of creating LINQ, and baking it into the languages, Microsoft has done it again !
This analysis makes my point with respect to the creation of this API layer we call LINQ. The emphasis below is mine:
From: http://msdn2.microsoft.com/en-us/library/Aa479863.aspx
“While Project LINQ doesn’t purport to be the “final answer” to all of the world’s object-relational mismatch problems, it does represent a significant shift in direction to solving the problem; instead of taking an approach that centers around code generation, or automated mapping based around metadata and type inference, both of which are exercises in slaving the relational model to an object-oriented one, Project LINQ instead chooses to elevate relations and queries as a first-class concept within language semantics and library-based extensions.”
Do you see why?
What Microsoft is doing here is leveraging the wisdom of crowds. According to this theory, groups are very smart, provided certain conditions exist. Those conditions are:
Diversity of opinion:
Each person should have private information even if it’s just an eccentric interpretation of the known facts.
Independence:
People’s opinions aren’t determined by the opinions of those around them.
Decentralization:
People are able to specialize and draw on local knowledge.
Aggregation:
Some mechanism exists for turning private judgments into a collective decision.
Certainly the global develop community has many of these characteristics. As such, why not leverage this crowd?
Keep in mind, MSFT learned the hard way with ObjectSpaces, and got smarter about how to approach ORM as a result of this adventure. With ObjectSpaces, MSFT attempted to use a command-and-control approach to define the “right” way to do ORM.
It didn’t take.
Microsoft’s New Empirical Approach to ORM
The debate about whether LINQ represents a full-blown object relational mapper is a direct result of how MSFT is entering this market. With the debut of LINQ, MSFT is drawing attention to ORM as a solvable problem. MSFT is actively encouraging global developer-community debate here. The irony is that the developer crowd itself is building consensus now, and providing MSFT with the very best ideas on what to do next with respect to ORM via LINQ and DLINQ.
Those who think the current crop of ORM vendors have nothing to worry about are at best misguided. The genie is out of the bottle, and the debate is in full swing. Microsoft has captured the ORM API layer, kicked off the debate, and is in the absolute best position to leverage the inevitable ORM consensus.
For ORM vendors, the barn is burning !
Real ORM is needed by nearly every developer when any OOP app gets beyond trivial size. MSFT is not about to let some other organization get the high ground here. The stakes are too high; ORM is the sweet spot in the developer space, now.
With LINQ, Microsoft has executed masterfully and is in great position to make the most of the developing global consensus about the right ORM approach.
What to do NOW About ORM
All developers have to do now is get familiar with LINQ and DLINQ to stay ahead of the ORM curve. Developers must:
- Get familiar with ORM concepts and facilities;
- Carefully observe the ORM debate;
- Study LINQ. Learn about anonymous types, object initializers, extension methods, and lambda expressions. This article is a great place to start. (This link also appears below.)
- Watch Microsoft and Visual Studio Team System carefully for emerging ORM trends and tools. This is where MSFT intent is most visible.
Summary
Eventually, an ORM consensus is going to emerge here.
MSFT knows this and is hanging ‘debate’ out there– in the form of LINQ and DLINQ.
These items get the discussion going, and provide MSFT with the global consensus—the so-called ‘wisdom of crowds’.
This diverse, independent, decentralized, aggregated developer crowd is literally telling Microsoft exactly what ORM features matter.
You can expect them to deliver.
LINQ and DLINQ also provide the API-level platform for building a comprehensive ORM stack that addresses Pareto’s 80-20 rule neatly in the developer space.
You have to hand it to Microsoft—they know the developer like no one else.
Bravo to Microsoft. Good job !
LINKS:
Part 01 of this series:
http://www.newtechusa.com/agile/blog/?p=11
ORM Overview
http://www.theserverside.net/tt/articles/showarticle.tss?id=ORMGuide
LINQ Overview:
http://amroamroamro.wordpress.com/2007/06/26/understanding-linq-c-an-article-describing-the-new-language-features-of-linq/
Other notable links:
http://weblogs.asp.net/fbouma/archive/2005/09/19/425534.aspx
http://blog.hackedbrain.com/archive/2005/09/19/3182.aspx
http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx
http://www.theserverside.net/news/thread.tss?thread_id=44161
http://www.hibernate.org/343.html
…