Live data from Hacker News

Microsoft Open Sources their Entity Framework ORM

hanselman.com

41–50 of 83 posts

Re: Microsoft Open Sources their Entity Framework ORM

#41

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?

Not a Microsoft insider but from what I've heard it's mostly coming from ScottGu and the rest of the DevDiv folks.

Re: Microsoft Open Sources their Entity Framework ORM

#42
post #36
post #33

Earlier quoted context omitted.

That's selecting a single db row, feel free to extrapolate that out for multiple rows containing complex queries performed concurrently by multiple users. But I guess performance doesn't matter in places where EF is used.

But that's just it, you don't extrapolate benchmarks outside the context of the benchmark. Without testing it you don't know if selecting 2 rows an extra 1ms, 200ms or 0.001ms. Many ORM have high overhead per query but are optimized to handle large result set's so depending on usage loading 1,000 rows might be faster than it's competitors. PS: A lot of frameworks are actually setup to handle the least important case…

You realize the overhead is simply in row mapping right? Naturally this problem only exasperates with more rows.

Like most heavy ORMs it's not obvious what SQL a complex LINQ statement emits where it's common to fall into "pits of failure" where it converts to multiple sub selects or the worst case N+1 queries. I'm personally not a fan of Heavy ORM's their an abstraction over a simple DSL and EF remains unnecessarily bloated and complex.

BTW we do measure + profile, and EF is amongst the worst performing ORMs out there. Please provide benchmarks to the contrary?

Re: Microsoft Open Sources their Entity Framework ORM

#43
post #39

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?

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"…

There are plenty of startups that have been successful on the .NET stack. The one that pops to mind first is Stack Overflow. .NET & XNA are pretty popular in indie games due to exposure to the xbox. There are many examples, but they don't tend to over lap much with the crowd here at HN.

Re: Microsoft Open Sources their Entity Framework ORM

#44
post #40
post #39

Earlier quoted context omitted.

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"…

Note: only their Azure + DEV arm is OSS happy - which is a result from making money with it on Azure. Their Windows/WP/UI projects are violently closed source, almost all cross-platform Rich/UI initiatives have been killed since Sinofsky has taken back the helm. Personally they should do all C#/.NET devs a service and provide better integration/code-reuse with MonoDroid/MonoTouch, but as they don't see it in their be…

"mythz", Merto style apps can always be done in HTML5, CSS, http://msdn.microsoft.com/en-us/library/windows/apps/br21138... so I am not sure why you say that the cross platform rich initiatives have been killed.

More details: http://www.winsupersite.com/blog/supersite-blog-39/windows8/...

Re: Microsoft Open Sources their Entity Framework ORM

#45
post #42
post #36

Earlier quoted context omitted.

But that's just it, you don't extrapolate benchmarks outside the context of the benchmark. Without testing it you don't know if selecting 2 rows an extra 1ms, 200ms or 0.001ms. Many ORM have high overhead per query but are optimized to handle large result set's so depending on usage loading 1,000 rows might be faster than it's competitors. PS: A lot of frameworks are actually setup to handle the least important case…

You realize the overhead is simply in row mapping right? Naturally this problem only exasperates with more rows. Like most heavy ORMs it's not obvious what SQL a complex LINQ statement emits where it's common to fall into "pits of failure" where it converts to multiple sub selects or the worst case N+1 queries. I'm personally not a fan of Heavy ORM's their an abstraction over a simple DSL and EF remains unnecessarily…

As to personal benchmarks. The last set of tests I ran the direct ORM overhead consisted of between 0.2% and 2.3% of our page load times so we promptly focused on things that actually mattered (mostly JS). The ORM advantage is mostly in being able to get a demo to work quickly vs. spending less time optimizing complex queries, which means you only really spend time looking at the slowest stuff which can warp how you look at things.

PS: If you have demo's that EF adds linear overhead feel free to show it but I have pulled 1,000 rows in under 1 second so I suspect your have messed up your setup somewhere.

Re: Microsoft Open Sources their Entity Framework ORM

#46
post #44
post #40

Earlier quoted context omitted.

Note: only their Azure + DEV arm is OSS happy - which is a result from making money with it on Azure. Their Windows/WP/UI projects are violently closed source, almost all cross-platform Rich/UI initiatives have been killed since Sinofsky has taken back the helm. Personally they should do all C#/.NET devs a service and provide better integration/code-reuse with MonoDroid/MonoTouch, but as they don't see it in their be…

"mythz", Merto style apps can always be done in HTML5, CSS, http://msdn.microsoft.com/en-us/library/windows/apps/br21138... so I am not sure why you say that the cross platform rich initiatives have been killed. More details: http://www.winsupersite.com/blog/supersite-blog-39/windows8/...

"This couldn’t be further from the truth. The use of HTML5 + JavaScript in Windows 8 is about as proprietary as using XAML + .NET."

http://dougseven.com/2011/10/24/language-choice-in-windows-8...

Just because it uses JS doesn't mean its portable! It has proprietary APIS + hooks making it non portable.

Re: Microsoft Open Sources their Entity Framework ORM

#47

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).

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.

NHibernate does support LINQ

Re: Microsoft Open Sources their Entity Framework ORM

#48
post #45
post #42

Earlier quoted context omitted.

You realize the overhead is simply in row mapping right? Naturally this problem only exasperates with more rows. Like most heavy ORMs it's not obvious what SQL a complex LINQ statement emits where it's common to fall into "pits of failure" where it converts to multiple sub selects or the worst case N+1 queries. I'm personally not a fan of Heavy ORM's their an abstraction over a simple DSL and EF remains unnecessarily…

As to personal benchmarks. The last set of tests I ran the direct ORM overhead consisted of between 0.2% and 2.3% of our page load times so we promptly focused on things that actually mattered (mostly JS). The ORM advantage is mostly in being able to get a demo to work quickly vs. spending less time optimizing complex queries, which means you only really spend time looking at the slowest stuff which can warp how you…

Where are these benchmarks? Is this for a single call? How big are the rows? Have you compared it against anything else?

Re: Microsoft Open Sources their Entity Framework ORM

#49
post #30
post #4

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 m…

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 yea…

This will let you load MonoTouch projects is VS and compile but the compile is only for syntax checking, etc... You still have to do the actual binary build on a Mac. Still, with this you can use all the refactoring tools, plug-ins, Intellisense, etc... that VS has to offer.

https://github.com/follesoe/VSMonoTouch

Re: Microsoft Open Sources their Entity Framework ORM

#50
post #47

Earlier quoted context omitted.

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.

NHibernate does support LINQ

Yeah ... somewhat ;)

Basic queries do work, but not ready for production use.

Post reply on HN