Sunday, September 19, 2010

NetBeans IDE 6.8 review

I wrote the Linkflow software on the standard Sun/Oracle IDE NetBeans 6.8.  Although NetBeans is certainly powerful and can be very flexible, the process was at times frustrating.  By using NetBeans, I was automatically wed to the swing framework for developing the front end of the software. This was not really a bad thing, although making swing work is a detailed and time consuming process.

The IDE is set up to enable the developer to layout the controls on the page and not worry about coding all the placement.  I found this to work OK, but there was no way to layout complex page views without doing some of my own coding anyways.  The code generated by the IDE got gigantic, and there is no way to edit the code on your own without losing the WYSIWYG editing. I also experienced a few crashes along the way, enough so that I made sure to save before I hit the preview button.

Once setting up your page in the IDE, you were really locked into the Sun methodology of separating all strings, descriptors and tooltips from the actual GUI element.  In a few cases, label strings I defined went missing and just refused to be recovered. Other times, the code would keep forcing my controls to have a height of 0 pixels. This forced me to set a few label values and even menu titles in the GUI setup code, which I could see as a problem down the road.

I searched for solutions to the problems I had and hit a large snag. There really is no decent documentation on using NetBeans. Not anywhere. The Sun tutorials are sparse, and jump from Freshman to Master level in a single bound. The features change so often, there was even an upgrade to NetBeans 6.9 made available while I was working on linkFlow, and they were talking about how great the version 7.0 was going to be. I decided to pass on that until my 1.0 project was completed.

By the final re-write of the program, I ended up writing all the formatting by hand. I set up a method or two in the constructor of each GUI element that handled the construction of all the fields and buttons, etc, and all the event calls.  Another method initialized all the values in the fields and set default for buttons and spinners. This way, all strings are set up for internationalization in one method.  All the formatting is set up in static method calls to one class so it can be reversed to read right to left instead of left to right if this is needed as well.

Writing the program this way also got rid of all the resource files used by NetBeans to hold the descriptor data. So now, the class files and image resources can be ported over to Eclipse, where I plan on writing future versions of the software. After that, will use NetBeans only for simple applet projects.

No comments:

Post a Comment