Geeks With Blogs

Shelfari: Book reviews on your book blog

.net alternatives by Michel Grootjans
Since the beginning of July, I've been working on a java project. The language is very close to C#, although it has some minor irritating differences, like the lack good generic support, extension methods and closures. The big difference however is not in the language, the tools, the libraries or the utilities. One of the big differences I've seen is the community.

I've been on many projects that have worked exclusively with Microsoft tools, libraries and (god forbid) examples. When the subject is raised of alternatives like an open source ORM or IoC container the response is predictable. It's a raised eyebrow stating clearly that non-MS solutions couldn't possibly be better than libraries like the EF, EntLib and such. Oh, and were you suggesting using anything else than stored procedures for data access?

Your idea won't scale...
Your idea won't perform...
Your idea won't be secure...
Your idea will be buggy...
Have you thought about the maintenance ...

Let's look over the wall now, shall we? If you announce proudly that you're going to work on a java project with hibernate and spring, you get a blank look from your fellow devs. "Duh! Of course! What else?". This best of breed approach took some years to mature but is way ahead of the default .net crowd.

The movement, the NHibernate mafia and all those alternative folks who don't adhere to the true MSDN way of doing software development are actually very close to this. The difference is that we are there by choice and by experience. The java guys are there, almost by default. This means that the mainstream java dev knows and understands things like IoC, AoP, ORM. He might have forgotten (or doesn't know) why these practices were introduced, but he's been using them daily for some years. Just like we forgot about writing our own compilers and practicing bit shifts to divide by 2.

I think it is our responsibility to enlighten our colleagues, one at a time, for the rest of our professional lives. To try and bridge that gap between and the mainstream .net development. And ultimately, as a community, help Microsoft on the course it is taking to embrace open source.

Quoting a fellow colleague I value greatly: How on earth did it ever get this far in our industry for this mindset to be considered alternative?

Posted on Monday, August 31, 2009 6:32 PM .net , java | Back to top

Comments on this post: java vs .net: the community

# re: java vs .net: the community
Requesting Gravatar...
I hear you.

I'm not a java developer, but fellow java developers got me curious about 'spring' and 'nhibernate' and I was so glad, as it opened up a new world for me. The world of 'datasets' just wasn't cutting it any longer. We went from asp spaghetti code to 'code behind' spaghetti code :)

Did Sun promote their own data access strategies and attempt to create their own competing 'orm' (ie. EF, L2S) or 'ioc container' (unity) ? Did Sun create SunTests (ie. MSUnit) instead of using JUnit ?

MS competes with it's own community. MS didn't take testing seriously until they saw how popular nunit was becoming in the oss communities. MS didn't take orm's serious until they saw how many developers were embracing oss like nhibernate. They created mvc when Monorail was starting to become more popular. Instead of SVN , now we get to deal with TFS - see the community isn't embracing 'CodePlex', they are moving code to google and now git.

The only oss project I've seen them openly bring in to their projects is jQuery, even then they are off creating their own ajax libraries, etc... Their templates look like jTemplate.

They don't build tools that run anywhere. (ie. there is no VS for the Mac, for Linux). They don't have an Eclipse.

Right now, as I said, they compete against their own community rather than embrace it and promote it. If MS was promoting NHibernate or Windsor rather than off creating their own EF - ie. imagine if they built a nice toolset to help generate NHibernate mappings, etc... vs. creating their own ?

I think things are changing because the quality is lacking in many areas. Let's face it, they have alot of 1.0 tools that just have too many gaps, and the oss tools are more mature and have a bigger following.

I have seen parts of MS make tremendous progress. mvc was a good step up - although I must say, I could see how leary some of those guys were in really pushing it, almost like afraid to upset the webform apple cart!

I think when MS stops competing against oss and starts embracing the community is when we see progress. They should be happy that people have formed their communities and built great .net oss projects to push their .net platform.

If they spent as much effort in developing a platform to run anywhere as they did on reinventing existing oss projects, who knows where we'd be ?

I'd like to get on a non-MS project after all these years working with .net - mostly as I embrace the oss projects our community creates, and many of those ideas are coming from outside of the .net world. Many of these tools come from java... from ruby on rails, etc...
Left by Steve on Sep 01, 2009 3:55 AM

# re: java vs .net: the community
Requesting Gravatar...

ORM vs Datasets is a bit of a red herring, isn't it? Those aren't really the alternatives.

Instead of using an ORM like NHibernate or EF, a common practice is to use data readers to populate objects, which is a highly performant solution compared to ORMs. If you don't hate Stored Procs, you can squeeze even more performance out of this design.

I am really glad that communities are out there, just as I'm glad Rush Limbaugh is out there to provide alternative view points. But sometimes we don't investigate all the solutions we are provided with inside the Microsoft ecosystem and, perhaps, too readily accept the criticism of others without seeing all the goodness we already have.

There's definitely a reverse inspiration going on from the java community back to .NET with EF, Unity and other tools. The most interesting thing about this is that we finally get to do apples-to-apples comparisons between boxed.NET solutions and the alternative solutions. One would hope that this goes the other way, also, and that improvements in EF 4 will help make NHibernate better.

Left by James Ashley on Sep 01, 2009 5:42 PM

# re: java vs .net: the community
Requesting Gravatar...

The issue I have with your approach is that you focus on performance from the get-go. The first thing I focus on in a project is delivering business value. Time to market is key here, not performance. Performance is something you concentrate on when your performance MEASUREMENTS show you a problem.

When balancing the discussion about ORM, like always, the pareto principle applies here too. NHibernate will take you only 80% of the way (most of the time it's 95%).

It's the default approach that is problematic. I prefer using a 'no friction' ORM up front, getting all the benefits of it, then leveraging the power of data readers and SPROCS when (and only when) there is a MEASURABLE performance gain in doing so.
Left by Michel Grootjans on Sep 01, 2009 6:14 PM

# re: java vs .net: the community
Requesting Gravatar...
when you lower the bar for entry you lower the bar for quality as well...
Left by Ollie Riches on Sep 01, 2009 10:19 PM

# re: java vs .net: the community
Requesting Gravatar...

I'm not really sure what you mean there.

Do you mean that the defaults MS provides is aimed at beginners? Or are you referring to our industry in general, where a beginner that has taken a 5 day training is supposed to know how to program?
Left by Michel Grootjans on Sep 01, 2009 11:33 PM

# re: java vs .net: the community
Requesting Gravatar...
MS just thinks that me, you and other users of their products are retarded. Compare with "The Sun", a British tabloid newspaper. They look almost same!

This strategy seems to work, with 60bn revenue and 17bn net income they have 25% profit, more that any other large corporation in the world (probably apart from organized crime).
Left by Mikhail on Sep 02, 2009 12:59 AM

# re: java vs .net: the community
Requesting Gravatar...
"just as I'm glad Rush Limbaugh is out there to provide alternative view points."
Wow I totally disagree with you there. Why should anyone be happy to listen to the maniacal ravings of an overt racist and patisian idiot? :-)
As for the rest of your comments I think you're right about performance of those solutions but there is much more productivity with some of the orm tools when your in a crunch mode to deliver.
Left by Terry on Sep 02, 2009 1:29 PM

# re: java vs .net: the community
Requesting Gravatar...
Interesting to see my impression of the MS monoculture more or less validated from the inside. I have worked both in the MS only world - but not for quite a while (although I am now employed to move a company from a dependence on MS to Java and OSS).

Once I was introduced to the open world of Java I never looked back, but that doesn't mean I am not open to learning from the MS world - just that I don't want to give up the openness and freedom of Java and OSS.

I have interviewed a few times at MS too, and those interviews gave me the impression that, at least in those divisions, the devs inside MS seem to be somewhat ignorant of how the rest of the world works, including how other languages and frameworks do things. They seem uninterested too.

So this blog post doesn't surprise me at all.

I am sure some people inside MS see the bigger picture, if for no other reason than they eventually adopt some of the good ideas from the outside. Plus I have been to a few SIGs/etc. as MS and they seem to get it in those meetings too, but overall I have always had the impression that MS was not open to non-MS alternatives. So I will stick with Java (maybe Scala in the future) and OSS alternatives.

It is interesting to note that at least twice in my career some decision was made on high to drink the MS koolaid and dump the Java/OSS devs who were thought to not be open to the change just because they questioned it. Lesson learned - don't question decisions made by people who don't know what they are doing - just move on.
Left by DeveloperDude on Sep 02, 2009 6:47 PM

# re: java vs .net: the community
Requesting Gravatar...
Interesting...I'm consulting on a project right now with a .NET backend (using NHibernate and Spring.NET). My background's in ColdFusion, Java, and RIA clients (Adobe Flex), and it's been really neat to see the .NET team I'm working with be able to hook right up to Flex.

This is my second .NET-backed Flex RIA - the first was a ".NET Monoculture" group that refused to deal in anything but SOAP Webservices and .NET data structures. It was a disaster.

If you're moving from C# to Java and you're looking for things like closures, I'd *highly* recommend taking a look at the Groovy's like Java, compiles to Java bytecode (so you can use Java classes, Spring, Hibernate, etc.) but it was designed this century.
Left by Joe Rinehart on Sep 02, 2009 7:27 PM

# The aguments behind MS dicisions are political not technical
Requesting Gravatar...
I always felt that the technologies promoted by Microsoft are not based on technical arguments but on their commercial plans. This should not be a surprise because MS is a business, but the developers should keep it in mind.
In Java things are not really in Sun's (Oracle) hands. They have a big influence but they also have to compete with open source or even commercial eg: Hibernate vs Eclipse vs Intellij. Also in J2EE Spring and JBoss are shaping the platform.
Microsoft does not want to promote hardware independency, platform abstraction etc. They want vendor lock-in. That's why ORM, IOC are not encouraged therefor the developers should write DB - dependent SQL.
Also have a look where the innovation is. The java ecosystem (not the Language itself) seems to be the place where most innovation happens.

Choose wisely and good luck!
Left by Adrian Neagomir on Sep 03, 2009 11:18 AM

# re: java vs .net: the community - Java is an OLD language - I hate it when Java heads talk about it as current century?
Requesting Gravatar...
Hey guys - (Java developers, that is). I'm not a Java developer, but I have developed applications running 50 million a month companies (Stocks, Electronic Medical Records, manufacturing, etc) in Delphi and C/C++, and .NET, and I hate to tell you: JAVA WAS INVENTED in 1994 (15 years ago) - that's LAST century technology. Delphi was developed in 1995, and had an IDE that was light years ahead of Java. It was (and still is) lightning fast, and the IDE is light years ahead of the Eclipse environment. That environment is not even as good as Delphi 4 (released in 2000?). Java is inherently slow, interpreted, complicated, conflicts with other JRE applications, and only works now after years of the java community tweaking it to make it perform somewhat acceptable (becuase it's free and supposedly cross-platform). I've seen Java projects go on for years (with layer upon layer of complicated services and additional hardware needed to support them), and the eventually fail or are too slow and the users are extremely dissatisfied and the software is evenutally re-written in something that's fast delivers what the business needs. I've seen the same applications developed in .NET and Delphi, delivered in 1/4 the time of Java, and with much lower hardware requirements. JAVA is OLD, so why don't you refer to it as an old, mature, well supported language - rather than "this century" when it's not. Bottom line is businesses want something that's fast, reliable, and un-complicated (so changes can be implemented quickly). Glorious layered service object designs that are complicated, slow and bomb have no value to a business or it's customers - only to the developer looking for unlimited job security.
Left by Big Dave on Nov 02, 2009 11:19 PM

# re: java vs .net: the community
Requesting Gravatar...
Inrecession time better to use cas .net developer well know SQL also the same is very poor in case of java developer.
Left by Mumbaikar! on Jun 01, 2010 12:22 PM

# re: java vs .net: the community
Requesting Gravatar...
.NET 4 (just standard stuff w/o any third party libraries or tools) runs SAP better than Java. .NET 4 is different than .NET !
Left by fred on Aug 08, 2010 1:57 AM

# re: java vs .net: the community
Requesting Gravatar...
.NET is moving fast forward, with the 3.5 and 4.0 releases, it has set itself as the industry standard.
Java was good, but Oracle and Sun are becoming lazier and lazier to update, innovate and release.

the way things are today .NET, and even with its many limitations and inconveniences is years ahead of Java.

besides, for c syntax junkies, maybe c# was a crippled tentative at first, but now it has become more fluid and performing than Java has ever been by expanding its capabilities and giving developers and architects better ways to do their jobs like LINQ etc...:

people confuse different products of the same company and label them with a general fail/win label, large companies have large departments which work almost independently, Microsoft has many failures, .NET is definitely not one of em.
Left by sontag on Aug 27, 2010 5:46 PM

# re: java vs .net: the community
Requesting Gravatar...
ddd dddd
Left by ننن on Mar 19, 2012 1:18 PM

Your comment:
 (will show your gravatar)

Copyright © Michel Grootjans | Powered by: