KWWidgets/Projects/UIDesigner/Application/PreviousWork/NetBeansStudyResults

From KitwarePublic
Jump to: navigation, search

NetBeans(¹)

NetBeans 5.0 IDE
NetBeans IDE 5.0 includes comprehensive support for developing IDE plug-in modules and rich client applications based on the NetBeans platform. It also includes the intuitive GUI builder Matisse, redesigned CVS support, support for Sun Application Server 8.2, Weblogic9 and JBoss 4, and many editor enhancements including new refactorings. NetBeans IDE 5.0 is a robust, open source Java IDE that has everything software developers need to develop cross-platform desktop, web and mobile applications straight out of the box. It was released on January 31, 2006.

When you download the NetBeans IDE, you get a modular, standards-based development environment with all the key functionality in one download, rather than a series of additional plug-ins. You can write, compile, debug and deploy Java programs for the Solaris, Windows, Linux and Macintosh platforms.


Quote taken from the Netbeans IDE portal page.

The version used for this study is version 5.0.


Important Note

Taking into account that NetBeans is an extremely robust IDE, describing every single of its features is way beyond the scope of this study. The next sections will maintain its focus on what is relevant to UI designing.
As previous sections of the comparison study describe in detail the aspects of Glade, Qt Designer and Visual Studio, and since most of those aspects are similar to NetBeans', this part of the study will mainly focus on what is innovative in its designing approaches and not so much on how they layout their interface.

List of widgets

    Just like Qt Designer and Visual Studio, NetBeans displays its widgets inside a single window, the 'Palette' window. Widgets are classed into separated categories, which can be hidden, just like Qt Designer and Visual Studio.
    Tool-tips are assigned to the widgets, though their text is limited to display the name of the class and package they belong to.
    One thing that has changed from version 4.1 is that the layout containers are no longer listed in the 'Palette' window. To assign a layout you will have to select a panel/framed-panel,right-click on it and select the 'Set Layout' entry from a pop-up context menu.
    One cool feature is the 'Palette Manager', accessible via the 'Tools->Palette Manager' menu entry. This manager lets you choose which widgets to display into the 'Palette' window, there is the possibility to add widget from JAR files and create new categories. This feature should be considered as a goodie for our application.

NetBeans 'Palette' window and 'Palette Manager'. To the left the 'Palette' window which englobes and categorizes available widgets. To the center the pop-up contextual menu used to define layouts on panels. To the right the 'Palette Manager' which lets you manage which widgets to display into the 'Palette' window and the categories for these widgets.


Disposition of tools in the environment and the environment itself

    The IDE presents itself as a MDI environment and there does not seem to be the possibility to work in a multiple-detached-top-level-windows environment.
    The IDE has much more or less the same look as Visual Studio. Windows can be 'dockable' or 'tabbed' documents. There is no direct way to define this, like in Visual Studio, but by dragging the caption bar of windows while certain areas will be highlighted, so you can define whether a certain window will be 'docked' or 'tabbed'.

The 'Palette' window while being dragged around the IDE. Notice the orange square indicating a potential 'docking' position
The 'Palette' window after being dragged and 'docked'


    The user has the possibility to create/design applications using the 'New Project' dialog box, or by using the 'Template Manager'. To know more about creating templates in NetBeans take a look here.

To the left the 'New Project' wizard/dialog box. To the right the 'Template Manager' showing a vast range of templates of all kinds


    You can work on several projects at the same time, but like Visual Studio you design just one single form at a time. This should be avoided: our application should offer the possibility to work/display on several forms at the same time.

    The "working canvas" is located in the center of the IDE, just like in Visual Studio. The form is represented by a gray square, without a caption bar. To add widget to the form you have several choices: 1.) left-click on the widget in the 'Palette' window, then you left-click on the form; 2.)left-click on the 'Palette' window and drag the widget into the form; 3.) right-click on the form --or the 'Inspector' window -- and choose the 'Add from palette' menu entry from the pop-up context menu. In all cases a preview of the selected widget will follow the mouse pointer, just like in Qt Designer, and vertical/horizontal slashed lines will show alignments to already added widgets just like in Visual Studio 2005.

To the left the pop-up contextual menu used as an alternative to add widget to the forms. To the right showing how vertical and horizontal slashed lines indicate an alignment to other widgets


    There is support for selection of multiple widgets, copy, paste, delete, drag-and-drop, undo, redo and keyboard short-cuts (+menu entries) to perform all of these actions, just like in Visual Studio and Qt Designer. These are big WANTED features for our application.

    Just like in Qt Designer and Visual Studio, you cannot select and copy specific attributes from one widget to another, but when you copy/cut and paste one widget into the same or another form all its attributes are left intact. One big improvement is the fact that event call-backs for every defined event call-back of the original widget are generated. This feature could be considered as a goodie for our application.

    For the IDE there are two "edit modes" 'Source' and 'Design'. While working in the 'Design' mode you have three modes 'Selection Mode', 'Connection Mode' and 'Preview Design'. While on the 'Selection Mode' you select and interact with the widgets. While on 'Connection Mode' you define events and target operations/call-backs via a wizard which presents dialog boxes with categorized list of event and actions/call-backs. The 'Preview Design' lets you preview the form without having to compile the application.

The tool-bar buttons used to switch between 'Source' and 'Design' edit mode, and to their right tool-bar buttons to change edit modes for designing: the 'Selection Mode', the 'Connection Mode' and the 'Preview Design' tool-bar buttons.
The wizard used for connecting events and actions/call-backs.


    There is a possibility to perform real-time previews by right-clicking on the form --or by clicking the 'Preview Design' button-- and selecting the 'Preview Design' menu entry from the pop-up contextual menu. Regarding this one realizes that NetBeans is not 100% WYSIWYG, for instance take this scenario as an example: you place a certain widget half-way inside the form and half-way outside the form, you also add plenty of 'white space' to the form. When you preview, your widgets are all packed together, the extra 'white space' is erased and the dimensions of the form will be adjusted to include the totality of the widget half-way outside the form.

To the left, a form with extra 'white space' and widgets half-way outside the form. To the right, the preview of the form presented to the left. Notice how 'white space' is chopped and how the form is "resized" to fit ALL widgets.


    To change the properties of widgets you have the 'Properties' window. It resembles the 'Properties' window of Visual Studio. If you right-clicking on this window, you get a pop-up context menu from where you can sort entries by categories or by names, you can hide/show the area where you get descriptions of the entries of this window and you can also restore entry values to their default value. You have three sets of entries: the 'Properties', the 'Event' and the 'Code' entries. These last ones let you define pre/post creation/init code, among other things. This feature is quite handy, and could be considered as a goodie for our application.

The three sets of entries you get in the 'Properties' window. To the left, the properties of the widgets while right-clicking on it to display the pop-up contex menu. To the center, the event call-backs of widgets. To the right, entries to define code generation for the widgets. Notice how certain entries have well descriptive tool-tips and others don't.


    To change the position/size of widgets you left-click on them. To change the layout of widgets you have to change the layout of the frame englobing the widgets in question. Layout management is quite different from Qt, gtk+, layout only works on frames, not independent groups of widgets. There is support to "internationalize" strings, more information about this can be [found here].

The menu entries used to internationalize strings in NetBeans.


    Resources like bitmaps can be "sourced" from an URL, from the file system, or from the application's classpath.

    The default name for variables follows the same pattern as Qt Designer and Visual Studio, including the prioritization of 'blanks' spots over new 'spots' --for example if you have 4 labels and you delete label2, the next added widget will be named 'label2' and not 'label5'--

    The 'Inspector' window displays the widgets' tree. One handy feature is the fact that a right-click on this window will show a pop-up context menu, the same one you get on the "canvas area", allowing you to perform the same operations as in the "canvas area". This is a nice feature to manipulate widgets like frames when they are difficult to select or when you want to add widgets in "inaccessible" spots. You can perform selection of multiple widgets, drag them to alter the order they appear in or drag them to attached them to other widgets/containers.

    Tool-tips are used to display info on certain elements of the IDE, not all elements have self-explanatory tool-tips, i.e. some are lacking from text, other just repeat the same text that labels a given element. The status bar is used to announce only "major" events in the IDE, but not so much for events happening while designing. Almost all documentation references are link to their web site. This kind of visual aids do not meet our applications needs, we want something more like the rock solid Qt Designer documentation.

    Code is generated automatically by the IDE as well as an XML description of the forms designed. Code and interface design are well separated.

Using the designer

    Time spent: around 25 minutes. Omiting the gtk+ theme, results are pretty much the same then the ones using Glade and Visual Studio.

Dummy Application designed using NetBeans 5.0


    Adding and manipulating widgets is quite simple, though certain subtilities restraint developement speed:

  • you cannot easily define menus the way you do with other designers, you need to add a menu bar, add menus to the menu bar, and add menu items to the menus. All this needs to be defined by right-clicking on the menu bar --or in the 'Inspector' window-- and selecting pertinent entries from the pop-up context menu. This is a teddious process as in order to change the text for menu items you need to use the 'Properties' window, not so much like easiness proposed by Qt Designer or Visual Studio.
  • certain widget are too difficult to reposition, like frames and separators. The only was seems to change position values using the 'Inspector' window.
  • there is not a default set of icons like the ones proposed by Glade.
  • certain properties for certain widgets are not easy to find, for example the etch of frames.

    On the other hand other things compensate the previous:

  • vertical/horizontal lines indicating alignment relative to other widgets
  • the pop-up context menu to conviniently perform many kind of actions
  • you can easily add entries to the menu bar using the pop-up context menu

Showing how the pop-up context menu is displayed over a menu bar widget


    Limitations concerning text size and others were not found. The only "limitation" encountered was the fact that certain widgets were hard to reposition.

    The XML description file can be edited by hand and reloaded, though invalid tags are not discarded as Glade and Qt Designer do, an error is generated. Tags without a closing tag produce fatal errors.

    This IDE relies on the Java VM to function.

    All in all designing interfaces with NetBeans is quite easy and with some new useful features, like the 'Inspector' window's and the pop-up context menu's facilities.





(¹)
This study was undertook by a software engineering student and not an expert in the Java/NetBeans field; even though rigorousness was a key element certain assertions might still be wrong.





KWWidgets: [Welcome | Site Map]