jueves 6 de diciembre de 2007

Why Open Source just success in projects

We are polishing our application. Just finishing the lastest touches before we proudly put it in production. It's been over five months of development and we are pretty happy to conclude this phase. It's time now to, akin to the Agile retrospective, sit down and examine the time we have spent. We have suffered (and solved) lots of problems in the way but I would like to talk today about those related with OSS, how did we solve them and what we learned.

First of all, let's review the list of OSS libraries and tools we use:
  • The Spring framework: The main tool. IoC, AOP, MVC, TX, ORM...invaluable. It improves the quality of the solution just by itself.
  • Hibernate: As our JPA provider. We also use the extensions it provides (HQL, annotations, cache)
  • DWR: AJAX made easy, really.
  • dojo: As the widget library. The only comparable JS library in our minds would be Ext JS but in the end we had to choose one. jQuery has haunted us during development. I wish we could have managed to add it as well.
  • Netbeans / Glassfish: Best environment for Java5
  • Honorable mentions: Apache (Ant and Jakarta), JasperReports, Alfresco (we couldn't include it in the end), CruiseControl and Trac
Astonishing, the list of commercial software is pretty narrow: JAVA (should I mention it here by now?), Weblogic and Oracle.

We have tried (and accomplished) to work with the latest and greatest release of each tool. This has lead to just one problem, dojo. When we started coding the available release was 0.42. Sometime during development version 1.0 was announced and API incompatibilities were revealed. In the time, we decided to stick with 0.4x but when 1.0 was launched the number of improvements was so huge that we changed our minds and proceeded to migrate everything. Unfortunately, this meant changing nearly every JSP in the application. The lesson we learned was to wrap widgets inside tag files so further migrations just revolve changing a central repository (but please, really, do not give us more API incompatible releases!).

Working with the latest available technology means finding bugs and situations no one has faced before. We have reported bugs to Spring, Hibernate and DWR. Our experience in this cases has been disparate:
  • The Spring team takes notice and works to solve the issue lightning fast (see SPR-3821, SPR-3530 for example). Sometimes they won't consider a proposal but at least they read them all and comment on them if further explanations are needed(see SPR-3644).
  • Things in DWR are solved using the users mailing list (though there's a JIRA installation as well). The community support is your friend here. Joe Walker (or other commiters) cannot work in a bug immediately (it's understandable) and there's no organization like SpringSource backing the project. Your contributions are welcome and if you find a bug you are encouraged to work to resolve it and return the patch to the community.
  • Hibernate is another beast entirely. You can submit a bug and hope it gets noticed. The project is very mature and rules are enforced. Here, having access to the source code is a bless. Usually your best bet is to debug your problem and patch it, recompile and test. Once you have a working solution file the bug along with the code (preferably with a regression test) and give them time to test it and include it in trunk.
  • Finally, Netbeans. Again we filed some bugs here :) (see issue 91803 for example). It took some time to get fixed but it was promptly assigned so you know someone was in charge of solving it. I was pretty happy in the end
As you see many different types of situations, all of them valid. In comparison, I will mention that we have filed a bug in WLS10 and another in Oracle11. I work for a pretty big company in Spain (more than 20,000 people) with corporate agreements with both BEA and Oracle. You would expect some kind of positive response from them. Take a chair while waiting...And that is if you are lucky (sigh) The worst of it is..there's nothing you can do!