top | item 4266653

Microsoft Open Sources their Entity Framework ORM

112 points| jmcqk6 | 13 years ago |hanselman.com | reply

81 comments

order
[+] cek|13 years ago|reply
This makes me even more bullish on Xamarin/Mono. As Miguel de Icaza of Xamarin tweeted this morning after this was announced: "Wow @scottgu announces that Microsoft open sourced the Entity Framework, Mono's Achilles heel"

I believe if you are building mobile clients and need to target more than one platform you should do your UI with the native APIs on each platform, but should use something like Mono to achieve as much code-reuse as possible for the lower layers of your app.

[+] untog|13 years ago|reply
It is crazy how C# is one of the few languages you can actually use to develop both iPhone and Android apps (as well as WP, obviously). It's a great language- I just wish that a license for MonoTouch didn't cost $400.

Also, does anyone know how to develop for MonoTouch using Visual Studio? I want to like SharpDevelop but I just can't... and of course, VS doesn't run on OSX.

(I haven't tried SharpDevelop in over a year- it might be dramatically better these days, but I don't think so)

[+] j_s|13 years ago|reply
The amazing thing to me is that they've been able to thrive simply by focusing on mobile... they dropped Moonlight on the floor even as MS-bound line-of-business devs everywhere found out that Silverlight is a dead end.

http://lists.ximian.com/pipermail/moonlight-list/2011-Decemb...

  > 
  > Some of the other work I believe is a gold mine of technology,
  > in particular our media pipeline, the rendering/layout code and
  > the animation framework. Perhaps someone would find a use for
  > that code in the future, we currently do not have plans to
  > continue developing Moonlight.  
  > 
  > - Miguel de Icaza
  >
[+] boyter|13 years ago|reply
Agreed. If we get first class support for MySQL with C# running on Mono I will run to C# for all my development work instantly.
[+] modarts|13 years ago|reply
Despite my usual complaints about Microsoft, I really appreciate the direction they've been heading with their adoption of open source for a growing number of their products.

ScottGu, Hanselman et al. really deserve a lot of credit for the big cultural changes they've caused to allow a lot of this.

[+] microtonal|13 years ago|reply
Indeed, it's also great to see that they are starting to use more widely accepted open source licenses, which as the Apache License (as was also the case with ASP.NET MVC).
[+] SideburnsOfDoom|13 years ago|reply
I think of it slightly differently - "I really appreciate the direction that Microsoft developer tools division has been heading with their adoption of open source for a growing number of their products.

They deserve big credit. But devs appreciate open source more than other consumers. it's hard to see how open source would work for, say, the parts of Microsoft that make Windows, Office or Xboxes.

it's easy for devs to think of Dev tools as Microsoft as a whole, but they're not the biggest part of it, and are not the ones who bring in the most money (I found this link: http://www.tannerhelland.com/3958/microsoft-money-updated-20... ).

Like it or not, the MS Windows division can therefore boss the dev tools division around (and have in Windows 8, effectively dictating the direction of .Net and WPF).

[+] outside1234|13 years ago|reply
Its hard for me to say this in some ways, but of the bigcos, I'm most bullish on Microsoft. I might actually go stand in line (if there are any) for the Surface tablet and maybe even a Windows Phone 8 device.

They are (finally) making the right moves and doing it in a consistent and open way. Any Microsoft insiders know who is driving all this change? ScottGu? Steven Sinofsky?

[+] ams6110|13 years ago|reply
Seems more like a desperation move to me. Microsoft have almost no presence in popular web apps or mobile. Almost no startups or established services use the Microsoft stack. Maybe they think that by open sourcing they will get a look by devs/shops that would never have considered them before.

I still think it's a long shot. The best development platform for .NET is Visual Studio and Windows. And the "cool startups" all use Mac OS or Linux.

.NET has been sold as an enterprise platform since the beginning. That's what it's thought of by most people, and I don't really see this changing anything. Windows Phone is way late to the party and isn't going to do anything significant in the market. Microsoft will continue to be primarily a platform for building enterprise-type CRUD apps.

[+] mythz|13 years ago|reply
It looks like they've started their big Open initiative after they found a business case for it with Windows Azure where almost everything OSS'ed in recent times runs on it.

When you're a cloud provider it makes sense to appear "more open" and support as many technologies as possible == more customers - which is good from the broad developer community as we would have never have seen their node.js on Windows support otherwise.

[+] HarshaThota|13 years ago|reply
Not a Microsoft insider but from what I've heard it's mostly coming from ScottGu and the rest of the DevDiv folks.
[+] gringomorcego|13 years ago|reply
If anything I'd bet that the 'fiefdoms' have quit warring as much?
[+] flyinRyan|13 years ago|reply
Is Entity used a lot? We looked at using it but it seemed to be inferior to NHibernate (don't remember details, think there was a problem with type error detection and other stuff).
[+] gecko|13 years ago|reply
I don't like it, and we don't use it at Fog Creek, but, yes, it's VERY heavily used on piles of projects I know. It's not as efficient or flexible as NHibernate, but it's far easier and vastly better integrated into Visual Studio, making it a bit of a no-brainer for simple persistence needs.
[+] josephcooney|13 years ago|reply
EF is horrible. I've every version since V1. Every system I've worked on that used EF needed major code tuning under production work loads. Before compiled queries (4.1? 5?) supporting more than a handfull of users concurrently was hard. Plus it is just a leaky abstraction over SQL. Many hours spent running stuff through EF, looking at the reams of SQL produced, and trying to tweak the EF query to produce the desired SQL. NHibernate or Dapper or even plain ole' stored procs are preferable to me.
[+] whileonebegin|13 years ago|reply
I've used NHibernate, Linq2Sql, and Entity Framework in real projects. I like EF the best, particularly EF Code First. I'm not fond of NHibernate's configuration files and lack of linq support. EF Code First has its quirks too, but seems very lean.
[+] avgarrison|13 years ago|reply
I've used it on a few projects. I have never used NHibernate, so I can't really compare them, but I really like EF. I don't have a great deal of SQL experience, so I'm much better at writing queries with LINQ methods and prefer it over SQL. It's great having strongly typed entities and the intellisense is awesome, but that's probably true with any ORM.
[+] GFischer|13 years ago|reply
The company I work for uses it, I'm not thrilled - it's still rough around the edges and I'm used to writing my own SQL, but it gets the job done on the few projects I've used it (I only used V1 which was very bad).
[+] tarr11|13 years ago|reply
Interesting that they put this in a Git repo (instead of TFS), but only to then push it to CodePlex (instead of Github)
[+] px1999|13 years ago|reply
I don't have any proof to provide (and if I did, it would all be anecdotal) but I've heard rumours that Microsoft are planning on breathing life into codeplex and have an exciting/significant set of changes in the pipeline (which should improve on some of the things that make using DVCS painful).

Considering Team Foundation Service, project Kudu/Git deploy on Azure etc. it makes sense to think that Microsoft are making a play to seriously take on GitHub and Atlassian, so that they're the one provider that owns an entire software ecosystem, end to end.

Either way, I don't think that the EF team would have had a choice on where to host it...

[+] politician|13 years ago|reply
One vice at a time?
[+] mythz|13 years ago|reply
EF is another overly architected + bloated fx from Microsoft. It's over 12x slower than other Micro ORMs like Dapper + OrmLite - Benchmarks at: http://www.servicestack.net/benchmarks/#dapper

The benefit of Micro ORMs is that they bind to clean re-usable POCO's (which by nature can be re-used as DTO's, ViewModels, etc).

Most of them also add features as DRY extension methods over the underlying ADO.NET System.Data.* interfaces, so there's no magic behaviour or heavy abstractions happening underneath, letting you add new features orthogonally (by adding your own DRY Extension methods in your own project), and you always have direct access to ADO.NET IDbConnection so you're never restricted when you need it.

[+] Retric|13 years ago|reply
Ok, let's check this benchmark out, wait 500 iterations for a total of 651ms = ~1ms per iteration and no version numbers ahh never mind.
[+] whileonebegin|13 years ago|reply
Have you tried EF Code First? It lets you define classes, with no inherited base class, that can be used with the Entity Framework.
[+] klausjensen|13 years ago|reply
This is so awesome.

Partly as a developer who enjoys open source software, but also in part because decisions like this makes life much easier, when you suggest using open source in some a large corporations, where they have a very conservative approach to open source.

[+] NDizzle|13 years ago|reply
Yeah, what I really like is that MS just open sourced a thing that is used in places that tend to not use open source software.

Talk about getting a foot in the door.