JDeveloper

From APIDesign

Revision as of 14:45, 13 June 2011 by JaroslavTulach (Talk | contribs)
Jump to: navigation, search

JDeveloper is the primary IDE to support Oracle non-open source technologies (like ADF). I really like JDeveloper's support for working with XML, it is far better than the NetBeans one.

Contents

Before Acquisition

When we learned that Sun would be acquired by Oracle in April 2009 we knew we want to change NetBeans to get ready to be acquired. We started to speculate what could make NetBeans attractive for Oracle. I really mean speculate as up until first quarter of 2010 (when the acquisition was approved by Europian Commission) there was no signals from Oracle to help us understand what way to improve NetBeans. Tough situation. Moreover complicated by the fact that people around were fired every few months and those who stayed had little trust in the future. Still I hoped we will get a chance to prove that NetBeans (and NetBeans Platform) can be useful.

Common Ground

It become clear that the crusial part is going to be our relationship with JDeveloper. No company can sponsor two projects doing almost the same thing in a different way for an unlimited amount of time. We needed to find a way to share. As it is always easier to share when there is a common ground, I started to talk more about OSGi and modularity in general:

I convinced my management and OSGi became main theme for NetBeans 6.9. The Netigso project was a proof of concept demonstrating the whole approach can work. Still there was a lot of things to improve to raise the whole OSGi support to production quality level. In spite of being depresed more and more every day, the NetBeans team worked really hard and I am thankful for that. As a result the NetBeans 6.9 offered OSGi support for every developer. The NetBeans Platform was now built not only on standard UI toolkit, but also de-facto standard module system. Everyone could benefit, but I admit my primary motivation was to met JDeveloper half-way.

Other Side of the Ocean

JDeveloper is rich platform. As rich as NetBeans Platform and in some sense even richer. I am always amazed when I look at JDeveloper code and find out that its purpose is to solve some general problems we had in NetBeans as well! Of course the solution is not the same, but clearly the original problem was very similar. Oh those Parallel Inventions, oh those little differencies!

Significantly changing the JDeveloper platform would have very disturbing Big Bang effect. Rather I wanted to offer small steps towards shared basics to begin some exchange. OSGi seemed like a good candidate. JDeveloper architecture follows concepts of JSR-198 and a trivial form of modularity was always there. I was hoping that adopting OSGi could be natural next step sometime in future.

You would not believe how surprised I was when I found out (during first Prague visit of Oracle guys in April 2010) that they had already rewritten JDeveloper to run on top of OSGi (thanks Stoyan!). I was surprised, but pleased, as this validated our decision to support OSGi in the 6.9 release! We almost reached the common ground without even starting to talk to each other.

Performance

We had the common ground I was hoping for (except that we primarily supported Felix and JDeveloper wanted Equinox). Moreover the primary JDeveloper motivation to use OSGi was speed and here I felt we have something more to offer: During work on NetBeans 6.1 we managed to improve startup by 40% using so called CacheForModularity. The only question was how to bring this cache to JDeveloper?

Netbinox already existed (but without using the caches), so it was just a matter of improving it and demonstrating the startup of JDeveloper can improve even more with Netbinox common ground. I worked on that whole summer. Code improvements were relatively easy, but the tough part was to modify the JDeveloper build system to accept NetBeans libraries (thanks Stefan for cross-ocean pair programming). In September we had the results:

JDeveloper running on Equinox (eager mode) Equinox (lazy mode) Netbinox (lazy mode)
Cold startup 1m 58s 1m 2s 37s
Warm caches 13s 9s 8s

The JDeveloper team did quite a good job speeding up JDeveloper by switching to OSGi and implementing so called lazy loading. However even then there was a room for improvement, just by switching to Netbinox, without changing a single line in JDeveloper bundles, cold startup was boosted by another 30%. Warm startup has not been improved, but that one was fast already.

We got an approval to use the technology. Then I spend next few months fixing testing infrastructure to pass nine thousand tests on top of Netbinox. It was not easy and various little differences stayed in a way (one of the most interesting was problem associated with ThreadContextClassLoader). In December 2010, we finally integrated the common ground and the whole product was released in June 2011.

Sharing

Clearly, the sharing of some code between JDeveloper and NetBeans helps the JDeveloper users to get better product. Such users will get support for their favorite technology the way they are used to, just sometimes it may be faster, and sometimes it may be nicer thanks to the NetBeans Platform.

Sharing also helps the NetBeans team to get into better mood. It always makes you happier to know that your work is used. If it is re-used by a strategic product of your own employer, it can make you even feel confident. In fact few team members who left during last two years are returning back, and that is a sign of regaining trust.

The sharing also helps NetBeans users. Thanks to all this effort they can use OSGi and have access to Netbinox. Unless we spoil something, the sharing will continue. Not only it will help NetBeans Platform to get better, but also ensures, it will be useful and needed.

Personal tools
buy