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.

Happy 10th Birthday Netbeans - My Genesis with NB

Today Netbeans reaches a decade milestone and wow what a progression.

I saw netbeans long back in the year 2000 (yep Y2K) when I first saw it on and the Sun application Forte for java (built on NB3) rechristened as Sun One studio. That is when I first moved away from batch files, editplus/text pad and DOS editor and Forte For Java was my first Java IDDE and there was no looking back.

That was NB3.0. Then couple of years later, Sun one studio became bloated which was not to my liking. Thats when I fully transitioned into a NB user starting with NB3.5 and there has been no looking back. In my organisation I am the only one who uses NB for development. I have given a couple of plugins, developed (not marketed) one NB based application and with NB6.5 beta the progression can only be forward.

What is the next best thing after NB - the netbeans community. 90% of the time I faced problems or issues, I find answers here within the community - be it code snippets, docs, tutorials or forum threads. The rest 10% I can figure it out based on related information. After all I should be doing something.

If there is anything I miss from the later releases (NB 5 I guess) of NB it is the MDI view. Why did you guys remove it. Bring it back, Bring it back.