...as well as a long list of miscellaneous topics (from 'how to port' to 'how to distribute patches').
Then followed 2 days where we did a very intensive workshop. It all basically turned into a hands on porting session! We started out with the IMR's front end and ported it, step by step, to the NetBeans Platform. Of course, we didn't port all of it, since it is a very large and intricate application. Instead, we focused on some specific topics. The topics were proposed by the IMR team:
At the end of the first day, we had created an application containing a few custom modules (e.g., a viewer module and a module containing capabilities), together with a long list of module wrappers for all the JARs that IMR works with (e.g., iBatis, Log4J, Dom4J, and many [many!] others, including most/all of the JARs produced by the original application). The viewer module provided a window that contained an explorer view exposing a node built from files registered in the layer file. The files in the layer file represent folders in the original application, making the set of folders extensible in the future.
A connection was established to the actual database at IMR (well, copied to the local disk of the laptop we were all sharing, via overhead projector, driven by one of the students), with data displayed via a BeanNode in an OutlineView, with all properties shown in a Properties window:
(Permission to publish the above image was asked and received, of course.)
Toni introduced a lot of very interesting and flexible code. That code included the dynamic capabilities that I outlined yesterday in this blog, as well as a property-file based capability for opening a specific window for each node in the tree, despite all the files being of the same MIME type (more on that in one of my next blog entries).
At that point, we had covered many of the topics requested by the IMR team, all within the first day, and all driven by the students, with Toni and myself explaining the code and instructing the driving student how and where to code everything.
During the evening, after the course, Toni and I covered a bunch of other areas, from finetuning the OutlineView (e.g., removing the first column), to adding a progress bar, to adding SaveCookie support, to working on internationalization concerns (including internationalized helpsets). The next day, i.e., the 2nd day of the 2 day workshop, we started by explaining what we had done the previous evening together. Then we continued, with Toni introducing even more flexibility for reusing the same window to display different nodes. During that time, I focused on providing a JComboBox in the OutlineView, which was also one of the requirements. Here's a screenshot of my prototype, which is now in the IMR prototype:
The above is a step towards mirroring the functionality provided by OpenSwing, which is the framework that the IMR is now migrating away from, thanks to its lack of flexibility in the light of the many features provided by the NetBeans Platform. We also migrated from our BeanNode to an AbstractNode, giving much more control over the display. The BeanNode had served its prototyping purpose and the benefits of the AbstractNode were immediately apparent. We created a property sheet with one property, into which we plugged the inplace editor that provided the JComboBox.
The result at the end of the 2 days was very pleasing to everyone involved. The IMR now has a starting point for further development. Though they have only a small bit of code, many patterns have been covered in concrete code samples integrated into an application that the developers are able to relate to, since it all relates very closely to their original code.
It wasn't all hard work, of course, and one evening was spent with alcohol and conversation in some of the nice Bergen bars, which I might be visiting a lot in the coming weeks thanks to Iceland:
Toni and I are looking forward to doing more of these kinds of trainings, i.e., going beyond the training materials and straight into concrete porting scenarios. Since the NetBeans Platform is the only modular Swing application framework in the world, with Oracle database servers being ideal for the type of large data-centric applications relevant to the NetBeans Platform, the market for NetBeans Platform migration workshops, exactly as done here in Bergen, must be very large indeed... especially since the modern world of mobile and web development apparently cannot do without desktop alternatives. And don't take my word for it!
In the interim, at least, others interested in migration workshops to the NetBeans Platform should write to firstname.lastname@example.org, the mailing list for those wanting training/consultancy relating to the NetBeans Platform. Looking forward to porting your application with you!