Tuesday, May 20, 2008

How do you *know* it's a witch?

Wow.. The ALT.NET blogs have been downright hostile to the Entity Framework. Admittedly, I'm a total noob in this arena. I've done some work with IoC containers, but I haven't done much with the various and sundry ORM frameworks. I played around with Hibernate quite awhile ago and was very impressed (yes, I've written Java; no, it's not contagious), but NHibernate was in very early beta at the time.

Anyway. I think it's a bit premature to call for the pitchforks and torches with respect to the Entity Framework. From what I've read, the EF appears to force you to weld your code to it, which is annoying. But remember, this is 1.0 product and Microsoft has never, ever released a decent 1.0. I think it might be best to sit out this first version, but I wouldn't be surprised to see some interesting things coming from the mothership in the coming years.

What kinds of things? I'm glad you asked! The Entity Framework requires numerous XML files to work. Those XML files integrate seamlessly into C# and VB projects. In fact, Microsoft has a quite bit of history blending XML with their projects. So much so, that VB9 allows you to write XML directly in your code. C# doesn't have that feature (yet), but it does have LINQ. While LINQ isn't XML, it is a language in its own right. Then we have WPF, which comes in both XML and API flavors. Windows Workflow - same story. All of these things lead me to one conclusion:

Visual Studio will become a polyglot programming environment. I believe Microsoft is thinking beyond source code (the horror!) to an environment that allows us to write some code and literally draw other bits of code. Right now, it looks pretty ugly, but it should get better. The biggest flaw in my crystal ball is the fact that you can't mix .NET languages in a single project right now. Maybe multi-language source files are something we can expect in CLR 3.0? Imagine drawing data entities, writing utility classes in C#, contracts in IronRuby and orchestrating the whole thing with F#!

What a long, strange trip it will be.

No comments: