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.

8 comments:

Petr Jiricka said...

Hello, sorry to hear you are leaving the NetBeans camp. NetBeans does have plugins for GWT, AppEngine and Android, though I do not know how they compare to the plugins for Eclipse. However, the latest release of the Scala plugin for NetBeans is excellent (I heard), so you may want to give it a try.
If your future projects involve GlassFish or WebLogic, please try out NetBeans again. GlassFish support in NetBeans is already very good and improving every day, the WebLogic integration will be much improved in the upcoming release. See also the list of new features that were already implemented for 6.10.

Anyway, I wish you luck with your future projects - whatever IDE you use for them.

Petr, NetBeans team.

pjulien said...

It does have a plugin but the plugin is always playing catchup. How can they do anything else? GWT is open source but the plugin is not. Furthermore, Google bought Instantiations, so we'll be getting a visual editor for GWT in their plugin soon enough, that's what really made the difference.

The AppEngine one is fine.

The Android one isn't. Can't even add jars to it.

The Scala plugin for Netbeans is coming along, but again, doesn't match what's available for Eclipse.

We have no plans to use WebLogic. We'll be moving to AppEngine, and for applications that people don't want AppEngine, we'll be using Geronimo most likely.

iscy said...

Very good article and comments. I find it kind of sad that you actually have to use an IDE because of the plugins that are available. It's pretty much the same as *having* to use Windows because some of your favourites, or just "too used to" programs won't run on either Linux, Mac or OS of your choice. I see the IDE for a programmer as the OS for a user. You want to use the one of your choice... the one you really liked for your personal sugar flavour. With Java, it was great, because now you can have one code base, have standard libs as jar and execute all of this on the OS of your choice... if that is, Windows, Linux, Mac and many others... even that BluRay player you use to entertain yourself when it's raining outside and you got nothing else to do. So it's very sweet for all users, but what about the devs? If the OS is for the user what the IDE is for the developer, you should be able to use the IDE you like, no? Answer is.. sure, but it's actually a bit harder than that. Create a real project in eclipse, or better.. take one that already exists, and try to code in Netbeans or any other IDE while maintaining the necessary for everyone running on Eclipse.. yeah, a bit tricky in some cases. IDEs are not used to understand the same paths for the libs... the warnings are set in some kind of UI that are different, and never easy to import/export. Many, many things are different, and yeah.. the worse? The plugins... They are sweet, but they are basically making you stay on one IDE because the other doesn't have some of the commands they could provide. I do find this very annoying... but what can we do? Am I really going to send a mail to Adobe in order to finally have Photoshop under Linux? Nah... not going to happen, so I stick with Gimp... even if it's not as good and doesn't offer the kitchen sink, I still prefer to be on Linux for some other tasks.

pelegri said...

Anything we can do to keep you as a GlassFish user? Is your question about the strategic place of GlassFish inside Oracle? Something else?

pjulien said...

Honestly, leaving Netbeans was very, very hard. I loved that product and the core experience. It just came down to the plugins.

For Glassfish, even with all the assurances made by Oracle, I still don't feel confident the product has much of a future.

When I hear Oracle say Glassfish will be their "quick development platform" and they only highlight its startup time as the key factor, to me, it makes me very uneasy because it makes me think Glassfish will always be an afterthought to WebLogic. It also makes me quite angry if I can be honest with you because I still think Glassfish is the best.

Even if Oracle bought WebLogic, Glassfish is still a superior product. Unfortunately, Oracle doesn't agree with me.

pelegri said...

Actually, GlassFish is in very good shape inside Oracle because it addresses a number of market and technology needs. If you have not seen it yet, check out the GlassFish roadmap presentation at http://glassfish.org/roadmap

Stay tuned for some additional roadmap details during JavaOne. Also, if you are attending J1, you may want to consider coming to our Community event [1] and grill us to your satisfaction.

- Eduardo

[1]http://wikis.sun.com/display/GlassFish/GlassFish+2010+Community+Event+and+Party

pjulien said...

Then for pity sake, change its stance on the marketing front.

When I hear it's the development server and the only highlight mentioned is its quick startup time, it freaks me out.

I wish I was going to JavaOne, just too busy. Would love to talk to the Netbeans and Glassfish guys.

pelegri said...

Big company, multiple interests, left-hand/right-hand, etc, etc.

But I agree with you, that part of the story is quite confusing. I'll point your blog post to the GlassFish Product Managers.

We will highlight any new announcements from J1 at The Aquarium [1] and other channels.

[1] http://blogs.sun.com/theaquarium