Saturday, August 21, 2010

The Challenge of Using Multiple Languages

After years of using Netbeans, I finally gave up. We have started using Eclipse. Why? In one word: plugins.

To be more exhaustive, I have not been very comfortable with the acquisition of Sun by Oracle, and that was even before they announced that awful lawsuit against Google. I would have been more comfortable with the acquisition if Oracle hadn't just closed on buying BEA one year before Sun.

Oracle's Java EE application server offering, OC4J, was, and is, simply awful. To their credit, Oracle didn't ignore the problem, so they went out and bought BEA for $1 billion dollars to acquire WebLogic. They also made it clear, that although they will support both application servers for now for their enterprise customers, WebLogic is their "strategic" server. Meaning that OC4J is on the endangered species list.

If it weren't for the BEA acquisition, Glassfish would have taken center stage in Oracle's portfolio. However, even if both servers share common components, e.g., both use the Metro web services' stack which is developed as part of the Glassfish group, Oracle didn't buy Sun for Glassfish, they bought it for Java. Makes sense considering they spent $1 billion to buy WebLogic.

Then we had the Netbeans vs Oracle's JDeveloper scenario. Unfortunately, if that was the only variable, Netbeans' victory is absolute. JDeveloper is not very good, and I'm being polite here. However, JDeveloper is not just an IDE, it's an IDE designed to get you to use as many Oracle middleware products as possible. The other variable is that Oracle, like everybody else, supports Eclipse. Meaning that Oracle is now spending money to support 3 IDEs, I suspect that will not last indefinitely.

All this to say, even if Glassfish is still the best and Oracle is continuing to invest in both Netbeans and Glassfish. We still decided to move ahead and proceed with our migration from these products. We also decided to take it by steps and steps and slowly. We have now successfully migrated to Eclipse but continue to use Glassfish.

So why Eclipse? Well, our primary toolkit is Google's web toolkit(GWT). We use GWT everywhere and profitably too. However, Google's IDE of choice is Eclipse and the plugin for GWT, and AppEngine too, made by and supported by Google is for Eclipse. So it was hard to always be behind on Netbeans when it came to GWT. Not only, but we are targeting AppEngine to replace Glassfish. If that wasn't enough, we also have a very real need to develop for Android and we love Scala. Again, all of these have world class plugins for Eclipse but not for Netbeans. So we just grew tired of being second class citizens all the time.

So how about Eclipse? I'll tell you one thing, I was nervous having had really awful experiences with it before. It has a very steep learning curve. However, once you wrangle it, it definitely pays off and with dividends too. It's definitely a match for Netbeans and more. I can't think of an IDE that has better refactoring and source navigation features. Heck, there's even a Silverlight plugin for Eclipse.

So now we have one IDE for pretty much all platforms and languages: Java SE, Java EE, Scala, Android, AppEngine and C++... or do we? Well it turns out it's not that simple.

Recently, on a project, I had to code in 4 different languages at the same time: C++, Objective C, Java and C#. Java on the server. C++ for some glue code. C# for a Microsoft Office extension and Objective C for an iPhone application... and I ended up using 4 development environments.

I had to use Visual Studio for the Office plugin. I used Eclipse for the Java server stuff. I used Netbeans for the C++ part and finally, I used Xcode for Objective C.

It turns out coding in multiple languages, even on the same day, isn't that hard, however, using multiple IDEs in the same day is a different story. You see, I always keep the default key bindings of an IDE so that I learn them as I go. It also means that if you're a veteran of a particular IDE, Netbeans in my case, it's very, very hard to switch and not continuously mess up which accelerator you're suppose to use.

So there you have it, the real challenge of using multiple languages: the IDE key bindings. So if you're going to be in this situation and you aren't dumb like me, I suggest you import key bindings in all the IDE's that you can.