Monday, October 20, 2008

Rebuild application on top of the NB Platform

My colleague and friend Dinesh had a problem which goes like this
Can I take my application xStudio and port it on top of the NBPlatform? What I am looking for is
this -
  1. My Code base should remain fairly intact.
  2. I want my own menus and toolbars and splash screens.
  3. What I need NB to take care of is Interaction between different views - Tree and table, Report generation based on selected node, row etc.
  4. What code I want to eliminate is mainly all the listeners we use to report user input among different widgets
  5. Maintain organisation 's UI standards.
Given this criteria - it took me 9 hours in total to figure it out. - 4 hours to read tutorials and try them out and 5 hours to complete the task.

Preparation -
Understand thoroughly the concepts explained in the NB Quick start guide. This tutorial completes problems 2&5 by just editing one XML file that too by using context menus alone.

Selection management tutorial completed the rest.

Steps followed -
  1. Replace NB actions with our actions - simple to do since both are javax.swing.Action.
  2. Replace JSplitpanes with NB topcomponents
  3. Replace Tree and table combo with the TreeTableView (slight refactoring in our datamodel accomplished this).

9 hours later application has been ported.

Sorry no screen shots are available due to organisation's legal restrictions.

To fully understand the NB architecture, one has to just start with the quick start and system file system tutorial and after that things are rather simple.

No comments: