Sunday, December 16, 2007

J2EE Vs .NET : Are major development shops moving to .NET?

OK, I am not starting yet another war between .NET vs J2EE. I need your input.

I was introduced to CTO of a major company last week. He was inquiring about what I do. I told him I am a Software Engineer, and do a lot of development on Java/J2EE. Next thing I hear from him is "Meera, all the major development shops I know, and also my company are moving to .NET. You should also do so soon.".

I told him I wasn't aware of any such drastic changes in my company, nor had seen any such changes in the communities I visit. He kept arguing the same. As far as I am concerned I can never argue.

The reason he gave were as follows:

1. Java/J2EE developers are very expensive.
2. Hard to find the right person.
3. Development using Java/J2EE isn't trivial.
4. .NET on the other hand is very simple.

I did a lot of research on Sunday. Wasted almost an entire day trying to see if I can find anything at all to convince him. Nope, all the data and statistics I found were way old( almost from 2002).

I strongly believe that if your development shop is already committed to Java & J2EE, continue using that. On the other hand, if you are already using Microsoft technologies, than continue using that.

The next thing I had in my mind was to blog this and see what you all had to say.

Is your development shop switching to .NET? Have you heard from your friends that they are switching to .NET? I need your input. Please leave your comments and any references you have.

42 comments:

  1. I do not know what you mean by "major shops," but the Tiobe index suggests that Java has grown, albeit slightly, over the past 12 months.

    December 2007 language rankings

    As always with these rankings, take them with a grain of salt. Both VB and C# posted larger gains by percentage during that same period, though that may be because they had smaller shares to begin with.

    At any rate, Java is still #1 on th e list, and in wide usage overall. Does that mean you should use it? Maybe, maybe not -- I think your overall approach is quite rational.

    ReplyDelete
  2. I really appreciate your input. With all the vendor support Java & J2EE have, it should be and of course is #1.

    Thanks for pointing me to the ranking as well.

    ReplyDelete
  3. Good J2EE developers are expensive because enterprise applications are difficult to build correctly. You need to understand distributed, scalable, multi-threaded, asynchronous applications. Additionally, much of the work that I have done involved EAI at some level.

    Many .NET developers, who are likely VB converts, are not equipped, either from experience or education, to build these kinds of applications. Of course they are cheaper.

    I think that you'll find that .NET developers who are skilled enough to build the kinds of applications that many J2EE developers are building, cost as much as the J2EE developers.

    The guy who designs a house costs more than the the guy who nails up the drywall.

    ReplyDelete
  4. Very well said. I agree with you completely.

    ReplyDelete
  5. I work at a consulting company that does about half Java and half .Net development for major investment banks in New York.

    I speak with the .Net guys and the recruiters all the time about this topic:

    1. Good .Net developers are just as expensive to for high end guys, if not more expensive.

    2. Good .Net developers with the exact skills you need are harder to find than Java developers at the upper tier, since .Net is newer

    3. Having good development practices using .Net is more difficult. Microsoft has The One Way, which doesn't always fit. Google for Alt.Net which is a group trying to add in alternatives in the .Net world

    4. .Net is difficult to do well, and Microsoft keeps on switching directions on their technologies. A former colleague says that: "This is precisely why we build our own .NET frameworks in my investment bank... Goldman, Wachovia and Morgan Stanley have done the same."

    There always has been and always will be a lot of FUD from Microsoft...

    But with that said, there are a lot of investment banks that started using .Net for GUI development and extended that usage to the back end.

    ReplyDelete
  6. Wow, you are very brave to start such a religious topic. The stereotypical answer is from people who quote Tiobe and says Java is the most used language. However, just because most people drive a Toyota doesn't necessarily make it the best car.

    My experiences is that .NET (C# specifically) in general really is simpler, easier to get problems solved in - which is what the majority corporate IT department would be interested in.

    Having said that, if you do not mind dealing with a gazillion choices of frameworks and libraries and can apply what's taught in the GoF book, you can do almost anything in Java.

    .NET had the advantage of being able to take the best from Java and add some productivity stuff (i.e. properties, events, versionability, components etc.). So as a conclusion I would say .NET is better than Java simple because Java requires more dedication, skill and knowledge.

    ReplyDelete
  7. I think the bottom line is that Microsoft's tools and development platforms have been getting very good over the years. Although I cut my professional development chops on Unix, I'll have to recommend .NET over J2EE.

    ReplyDelete
  8. It all depends.

    If your shop works with all MS products, then moving to .Net with be a benefit since MS is integrating the CLR into them.

    Also, .Net is included with Windows, so there is no need to buy a Java server (sure there are free ones out there).

    Now if the argument is moving to .Net for strictly web development, well then why not move to ColdFusion and get the best of both worlds. Adobe CF sits on top of Java and can call both Java and .Net code from within. So all the code you wrote in Java will work find, plus all the code you're developing in .Net will work.

    If you don't want a Java engine powering your site, you can go with New Atlanta's Blue Dragon which is a CF sitting on top of the .Net runtime. BD also works with both Java and .Net.

    I think people try to justify their decision by saying everyone is doing it, when everyone is not.

    ReplyDelete
  9. I work for a Java shop, that runs apps on ASP model. There is no way existing apps here would be rewritten to .net. We have few legacy MS apps (VB6, Classic ASP), there is no plan to upgrade them to .net either.

    ReplyDelete
  10. @Casper
    The question was not, as you seem to infer, "is C# better than Java," but rather "Are major development shops moving to .NET?" The Tiobe index is just one stat that suggests this is not in fact the case.

    That said, I will be the first to agree that C# offers some advantages over Java, and that there is a wide range of projects for which I would reach for .NET first. There are also a range of projects where I would choose Java first, and still others where I might lean towards Rails.

    It is a toolkit, not a religion. Look at the types of work you have, and the types of work you want to do. Look closely at the languages and libraries, and pick the one most appropriate to your task and your available talent base. Do not be afraid to shake things up should either condition change.

    ReplyDelete
  11. I have heard, and even seen large companies moving toward .Net, but at the same time, I get a lot of recruiters calling me for Java, not so much for .Net.

    I just have a hard time understanding where management is coming from. Why .Net? Why are they so willing to tie their businesses to a product produced by a single company.

    I don't believe that the cost of a developer is that much of a concern, you can find .Net and Java developers for the same cost, the Java developer will have a better skill set than the .Net developer dollar for dollar. And like one poster said, Use ColdFusion, or I will add Domino, these platforms will out produce Java or .Net anytime and they are cheaper, but you will quickly hear, the proprietary software rant when you mention any platform outside of Microsoft, 20 years ago this was IBM, everyone used IBM, but with the introduction of the PC, Microsoft stole the thunder from IBM.

    I think that the cat is out of the bag, Open source, including Java is changing the industry, developers are investing their time and money into platforms that they can advance their careers in.

    Most I know are advocates of Linux and would use it for their Desktop if management would allow it, Firefox over Explorer, Eclipse or NetBeans over VB or .Net.

    In the long run, Open Source software makes companies more competitive in whatever industry they are in, the reduced cost of Software directly effects the bottom line. Companies lease the cheap cars for the executives, they price shop for equipment, hire straight out of college, because entry level employees are less expensive. IBM has 40% of their workforce working off site, why? because the save over $150 million a year in real estate cost.

    So why in the world would they prefer to license Microsoft Office, SQLServer, Vista, .Net, etc, year after year when their are free alternatives. You can be assured, When Brand X overhead cost are greater than Brand Y, due to infrastructure software cost because Brand Y uses free alternatives, Brand X will have to change or lose market share.

    Just my two cents

    ReplyDelete
  12. Java (EE and others) has a clear advantage over .Net in open source support which is more developer oriented and less vendor driven. Only when Microsoft truly 'embraces ands extends' OSS, will .Net be able to compete with Java.

    I feel sorry for .Net developers who are somewhat stuck in a straitjacket. Albeit its a nice jacket ;)

    ReplyDelete
  13. hi meera,

    Currently working for a Fortune 500 company's IT dept, I see both a mixture of .NET and java. They have a lot of Java and some GUI .net apps.

    I also hear about VB and ASP.NET apps.

    Given the fact that Linux/Solaris/*BSD is free, IDEs are free, java is free and several Appservers(PLUS libraries) are free, Java should be the overwhelming choice. BUT(there is always a but), with the innumerable choices available, moving from one project to another project is still NOT as seamless as .NET where one company sets a big agenda on what tools/libraries/frameworks get used.

    So, sure, Java can do with a little less fragmentation and .NET can do with less dictatorship if each of them need to compete better.

    At the same time, people are looking at PHP, python and Rails(Ruby) as competent choices for various development efforts. Just like now there are many competent open source databases behind very popular web 2.0 applications, these languages also are behind many applications.

    I, daresay that in 5 years that atleast 50% of all NEW software will be developed using opensource languages and DBs(and that includes Java!)

    just my 2 cents

    BR,
    ~A

    ReplyDelete
  14. Actually we also came up against the same problem. You can find a lot of .Net coders but very few of them are quality people. I mean someone who understands scalability, clustered environments, multi-threading etc. The other problem we faced in the past is one that of MS lock-in. For example, we came to a situation where the only viable way to implement the solution was to actually re-write the Struts Action class. It would never have been possible in .Net, and client just don't want to hear never.
    I think for lighter projects, .Net is fine. Like our company runs the corporate wikis etc. on IIS servers but all business projects are in JEE>

    ReplyDelete
  15. Dear Meera,

    You probably met one of those CTOs who had drinked a lot of MS cool aid.

    I live in EMEA and have NEVER seen single prominent Development Shops moving to .NET, ever (ok I've seen some 5-10 person development shops specializing in .NET - but we are talking about something "major"). The reason IMO is simple - choice. .NET is evrything but choice. Only one target environment - Windows. Sorry, but nowadays Windows is seldom selected as mission critical systems. I used to work for Banking industry in my region - none of those Banks used .NET for more than toy projects. Have ever anyone seen Core Banking Engine running Windows, not saying .NET? So nowadays if You are Development shop and if You focus exclusively on .NET You are narrowing Your business. Simply.

    Some comments about above comments:

    1. J2EE needs application server. Not really - EJB needs application server (Container) J2EE is just set of standards - container agnostic. Nowadays we have plenty of choices when it comes to j2ee architecture - with prominent Spring in the first place.

    2. .NET do not need application server. Plain wrong. When we compare .NET to J2EE we should take into account things like: transaction management(JTA, XA), Messaging (JMS), Database management (JDBC), Security Management (JAAS, BMS), Business Components layer (EJB), Clustering etc. To achieve the same in .NET You must have at least Windows Server 2003. As simple as this. As of .NET - W2003 acts as a Application Server. Except some things are not standardized same way as in Java - like security model (anyone ever used security context propagation with .NET?). In Java I don't need to spend single penny to have powerful enterprise system - except hardware. There are plenty quality Application Servers for free - like SUN Java System Application Server.

    3. .NET is easier to use and much well integrated than Java. Wrong. It's really well integrated with MS products. And have decent integration if it comes to third parties. In this case Java has MUCH better choices. Take into account Oracle, IBM, SAP and all those big players. ALL of them, ALL are hardcore Java supporters. None of them giving support, besides basics, comparable to Java, for their .NET components.

    4. MS is gaining acceptance. IMO this is the opposite. After initial momentum people realized that, contrary to initial MS claims, that .NET is exclusively tied to MS platform and solutions. With some smart traps for other technologies. Sure You can uses other technologies from within the .NET platform. But if You need to do something really hard, unusual or non-standard (and working for serious company You will reach this point relatively fast) - You will hear answer from Microsoft architects - reimplement this with [SQL Server, MSMQ, BizTalk, PUT YOUR FAVOURITE MS TECHNOLOGY HERE]... Remember - Microsoft's statement is to sell Windows - not to support other technologies - MS proved it multiple times. As I said - initially .NET is appealing but someday it will hit You back with really big sh*t. And it will hit You in the least expected moment. Assure You.

    ReplyDelete
  16. I really appreciate each and every one of your responses.

    As far as the last comment is concerned, if the CTO was drunk, I don't think so. He was I guess in the limits of MD state Law. :)

    Believe me, I am going to send him this link.

    It sure will be an eye opener to him.

    ReplyDelete
  17. Hi Meera

    I think it's really boiled down to the following:
    1. Does your application require to run on multi platforms (Windows, Solaris, Linux, Unix, and etc).

    2. Total cost of ownership. In the short term, .NET might present a better choice as it might have shorter development life cycle, and average .NET developer might be cheaper, but in a longer term we have to concerns about other issues, like performance, scalability, migration cost, maintenance cost and most importantly security.

    Cheers

    ReplyDelete
  18. Open Source = advantage Java EE

    And IMHO if the Spring Framework had not come along, Java would have lost to .NET by now.

    ReplyDelete
  19. Here we use mono mainly for web development. The development can be done with 0 cost tools (linux/mono/monodevelop all free and open source ). IT is as well as portable to windows or mac just like java case.

    Mono is also quite up to date and stable compared to latest .NET 3.5

    ReplyDelete
  20. This debate seems to have lasted for long. I think: just use the right technology to do the right thing. Everything should start from business, but not technology. With the business requirement fixed, we choose which technology is better.

    ReplyDelete
  21. I should say .Net have no issue on performance and scalability. My performance test shown ASP.NET have much better performance over Java Servlet/JSP (no database related test on same hardware, windows 2003 + apache tomcat with native runtime lib vs ASP.NET)

    ASP.NET have more advanced OO concept than any current Java web technology. Tapestry and JSF have something similar however they are just started, not as mature as ASP. NET

    ASP.NET MVC just released CTP, it's will make ASP.NET much much more advanced.

    I used PHP since 1998, J2EE since 2000 and Ruby On Rails since 2005, I just turned to ASP.NET in 2007, now I think ASP.NET is the best of those all in many cases.

    ReplyDelete
  22. Few things to keep in considertion...

    1. .Net is good only for quick, dirty a type solution.
    2. Out of the box development is easy with .Net
    3. Is goo for small/medui, sized applications esp desktop based which .
    4. Since all of this is easy, leaning curve is easy for new developers, you dont have to be good S/W devloper to be new .Net Developer, this influences the market price
    (its same as window admin is dirt cheap compared to Unix admin, but if you have unix/linux you need only one admin not dozen of windows admin and reboots)

    J2EE has a different market and appeal and its getting matured in out of the box developmnet and toolsets (30 + vendors behind it)
    Things move slowly but in a god direction

    ReplyDelete
  23. I think both technology has its place. We are building application based on .Net and Java. .Net will be used to build the presentation layer. .Net presentation layer will be calling a Web service which is built on J2EE platform.

    .Net is easier and more efficient in the presentation layer where as Java/J2EE is more reliable, secure,etc which is best suited for server side.

    Another point is deployment, .Net requires Windows whereas Java does not. So Java provides choices, Microsoft doesnt.

    ReplyDelete
  24. I'm using Java/JEE at the moment, and feeling strongly that that choice is right for me for now. I like very much the choices Java gives me for toolkits in the open-source arena (and I've had great success with getting modifications I needed when I asked for them, not something I can so easily do with .NET). As for performance, it often seems to be true, in my experience, that the biggest drag on an application is the network, both to the app server and between the app server and the database. So I don't worry too much about performance (though I don't write wasteful code, either).

    ReplyDelete
  25. Actually, for web development Wicket (a Java web framework) promotes better use of object-oriented programming skills than does ASP.NET.

    To make a technical analogy, Wicket is to ASP.NET what UNIX is to Windows. It is easier for beginners to learn to do the most common administration tasks in Windows than in Unix, and it is easier for beginners to do the most common tasks in web development with ASP.NET than with with Wicket. Advanced users have more power and can improvise more freely in Unix than in Windows, and advanced users have more power and can improvise more freely in Wicket than in ASP.NET.

    Of course, if Wicket were re-implemented in C#, then you'd have the best of both worlds.

    ReplyDelete
  26. besides Wicket, there is another framework named "ZK" which is similar and more mature than Wicket.

    But have you tried them? I tried them before, the performance is very poor, and I stay away from them.

    Tapestry, JSF are also toward this direction, that's to say ASP.NET is more advanced in concept and design.

    Many people don't like ASP.NET only becuase it's Microsoft product and never tried. (Actually I was one of them!) Try all of them, and then the fact and data will tell.

    If I can't use ASP.NET, I would rather stick on Ruby On Rails or PHP instead of Java stuff. Java is killing itself by introducing too much unnecessary complexity, and too many frameworks, tools, libs make the development harder not easier.

    ReplyDelete
  27. I had never heard about wicket. I will try them when I get an opportunity.

    As far as Ruby is concerned, I just don't like the syntax at all. I tried doing a review for one of the books, and had to finally apologize the publisher for not able to do so. Ruby isn't my favorite language.

    ReplyDelete
  28. My company does consultancy in both Java and .NET. We've not seen any substantial new projects in .NET for some time though whilst the JEE business is still ticking along nicely. Martin Fowler at thoughworks reports a similar trend
    " Perhaps more significant is the story within ThoughtWorks. When .NET appeared there was a lot of interest in the platform. Many people were pleased to see a strong competitor to the Java platform and were keen to get involved on .NET projects. Yet over the last year or so there's been a big turn away from .NET."
    http://martinfowler.com/bliki/RubyMicrosoft.html

    I will say I think .NET is perfectly fine. I moved from MS technologies to Java quite soon after it came out but I actually think its pretty good. I happen to find Java EE, particuarly in its later incarnations, rather more compelling but both are fine. It sounds like your CTO has made up his mind for one reason or another. I wouldn't worry about it personally though.

    ReplyDelete
  29. Thanks for the links. BTW, he isn't my CTO. I just met him once.

    ReplyDelete
  30. Assuming you're worrying about job trends I'd pick a job site and do some searches. All the searches I've done suggest that there are slightly more Java jobs than .NET jobs but not very many. There are more than 2500 people seeking Java skills within 100 miles of my house so I'm not too worried. I switched from .NET to Java in 2003 and haven't regretted it. I've not been out of work since either.

    ReplyDelete
  31. Nope, not at all. No worries at all. With the skills I have, I am sure the day I start Job hunting, I will get a good one.

    ReplyDelete
  32. I've never really seen .NET has much competition to Java for the simple reason that most Microsoft shops were using Visual Basic (if they were not software companies), or C++ against MFC. So when .NET came along they moved to that. Most Java shops are probably also Unix shops and are unlikely to move to Windows on the server-side just to support .NET. It would be very expensive for one thing and the benefits are, to say the least, highly questionable. I have seen one or two firms jump from Windows to Linux recently on the server-side (one UK retailer I do some consultancy for has just replaced 350 Windows servers with Linux ones and moved all their development from VB6 to Java) – but I'm not sure how much of a trend this is yet. To be honest either technology stack will probably keep you busy for some time to come. Things are a little less clear-cut on the client – quite a lot of firms may use .NET to build small bespoke desktop apps if anyone still does this.

    ReplyDelete
  33. Hey Meera,

    Your blog entry reminds me of a meeting between my boss and the brand spanking new hot-shot cio of a large organization. I just happened to be at the meeting as kind of a fly on the wall.

    This new CIO was very impressive--smart, savvy and up on latest technology, etc. The discussion between the higher-ups ranged across a number of topics, but what I especially reemember is what the CIO said when the topic of Unix was brought up.

    He said quite simply: "Unix is dead." That was in 1991.

    Today I make my living working on AIX boxes :)

    I too try to keep an eye out for trends--especially where development languages/environments go.

    Thanks again.

    ReplyDelete
  34. http://www.theserverside.com/blogs/thread.tss?thread_id=41538
    --------------------------
    Applications can be of 5 types. i) Desktop ii) client-server iii) web-tier iv) Enterprise-tier v) Mobile.

    Java shines in all these areas. The PHP/Ruby world has no Enterprise Container. Even DotNet does not have an Enterprise tier. They are still using COM+ which works only in Windows platform. Thus, there is no rival to J2EE in Enterprise tier. In mobile world too, J2ME is excellent. Platform independence is the most important thing in Enterprise world.
    I cannot equate asp.net with j2ee. J2EE is decidedly far better. It has been reported that Messaging service in J2EE is better than the corresponding service in DotNet.
    Mainframe-data access through JCA is reported to be better than the one provided in Microsoft Host-Integration server.

    SOA integrates J2EE services with Microsoft and PHP clients. The server SHOULD always be J2EE .I don't see why anyone would write a server in ASP.net or PHP and consume it in Java client.
    For easy integration of web-tier and EJB tier, there is nothing better than Struts/jsf/Stateless/hibernate or CMP or BMP.
    This is the BEST architecture.
    RSR

    ReplyDelete
  35. I believe that .Net is easier to learn. It is cheaper when you start throwing in the costs of configuration issues and time wasted. The reason why CTO's are switching because I can build an app 10X faster than Java, I can get a prototype up in less than a day of several screens. The debugger is close to being the best on the market if not the best. The IDE has some quirks but once you start developing and using it, it is so much better than the fragmented Java market. And don't tell me it is cheaper because it is not. Every place I've worked at lately only has Windows servers and PC's. No more Unix boxes, no more Unix System Administrators. When you factor in ALL the cost of doing a development project the Visual Studio product comes out way ahead. It is a breeze to hook up to a database. I can't believe that I've converted but I was tired of beating my head against the wall with all the different frameworks. They keep coming up with things like Spring, Hibernate, Maven, you name it. I can't keep up with it and it isn't fun anymore trying to. It actually is fun programming in C# and Visual Studio because you see results quickly!
    I replaced 4 people that took two years to design very little. It took me six weeks with my first try using Visual Studio to redo the whole project and transfer the database to SQL Server. Talk about money saved! Maybe Java is fun if you are building processes that don't require displays or man machine interfaces but I can't believe how difficult it is to build a simple display with Java. Eclipse is a tool we are using to build plugin's which seem to the big thing right now. Whoop Te Do, now what. I have a frame up, how do I add widgets that make this display useful? I've looked around and don't see much. I sure as heck don't want to build listboxes, buttons, etc by hand. Like I said when you factor in the cost of Weblogic which they are talking about, and all the configuration issues trying to get this stuff to work together, the Visual Studio 2008 professional product is a no brainer!

    ReplyDelete
  36. It is 2010 and I think she is right. Looking at the job market I see alot more of job posting for .net developers than for Java. I've worked with .net and both the framework and visual studio are alot easier to work with. Now that Oracle has bought Sun I'm really hoping that it will continue to push the platform forward.

    ReplyDelete
  37. The company I work for (fortune 500) also decided to migrate a bunch of homegrown products to Java from Microsoft technology. Earlier it was 80%-MS, 20%-open source/Java, its the opposite now. The reasons for this migration were very similar to what I read in this blog above, secure/scalable/market-trend/etc etc. Also the clients that we deal with are big shops of open systems. Also the general trend I have seen is that clients complain about performance and dont like Windows (MS technoloties) on their servers.

    ReplyDelete
  38. Oracle will give the Java Platform a much needed enterprise centric direction to java. And the reason for this is simple, when a non technical manager considers a developing platform, they will probably choose one that is supported by companies, not communities. Open source is very utopic but it is almost synonymous to lack of support. Java needs to get back in track to what businesses need, after all they are the ones that pay the java developers.

    ReplyDelete
  39. I wish Oracle and Google would play nice with each other when it comes to Java. Google has basically made Java cool again, examples would be GWT and Android. They should put their fighting behind them and concentrate on pushing java to new heights.

    ReplyDelete
  40. Java EE rockssss try JRockit

    ReplyDelete
  41. Our multi-billion company started to shift towards .Net replacing Java

    ReplyDelete