NetBeans 5's Matisse impressions
The impressions I got from NetBeans's Matisse are mainly by comparing the Matisse experience to the experience I get from Visual Studio 2005's user interface editor, and to the only Java user interface editor I so far considered as being the best, which is IntelliJ's GUI Designer.
Working with Matisse put a smile on my face; Finally, a user interface editor to match Visual Studio's GUI editor! A claim not easy to make by all means.
That said, I thought the same about IntelliJ's GUI Designer which was better until Visual Studio 2005 came out, so I just hope NetBeans' developer team can keep up the good work they're doing in innovating the GUI editor experience.
Some of Matisse's features really made me raise an eye brow thinking "How come no one did That before?". I hope Matisse's developers keep up the inspirational work, and use it further to enhance their Java code editor, still not reaching the bar IntelliJ set.
I babbled enough. Now for my likes and dislikes:
Dislikes
- XML representation of forms Frameworks today seem to dive into a new world of separating user interface layout from its logic. Instead of hard-coding your graphical user interface into the code, write only the logic code and describe all the events, layouts and control placements in an extensive XML file. Examples can be seen in XAML for the Windows Presentation Foundation and also IntelliJ's GUI Designer works like that.
- No Layout Designers Matisse uses its own layout designer, which allows it to place controls anywhere on the form, attaching them to other controls and to the borders of the form. However, if the user wants to use one of Java's Layouts, he cannot.
Likes
- Matisse's Layout Manager The layout manager Matisse uses, org.jdesktop.layout, is just great. It allows you to place a control anywhere: The control will be aligned with other controls by size and location. The location and sizes of controls will be eventually determined by the look and feel of the application when it's being run, and "snapping" of controls will take effect then.
- The Editor I think what makes the layout manager of Matisse better is the editor Matisse provide for it. Snapping to other controls, both to the location of the snapped control, horizontally or vertically, and to the size of the snapped control, so that both controls keep the same length or height. More importantly, its ease of use is amazing, making a complex design easier by allowing to view the controls as you move them, highlighting the target container of the dragged control, and showing suggestions for alignments to other controls as you drag the control over the form.
- Relation between controls is saved After a control has been placed, viewing its alignment is as easy as clicking it. Alignment lines will show up to tell you how the control is aligned, hinting at how it will be resized and relocated as the form is manipulated.
- Easy Designer The designer's user interface itself is very simple and easy to use, and yet very powerful. With just a few buttons it offers you the ability to align groups of controls to one another, to switch between code and design views, and to edit every property, event and code generation aspect of any control or form.
- Connections The Editor allows to define connections, which are simple event-to-property action connections. With a simple three step wizard you can set a control or JavaBean's property to change as the result of another control or JavaBean's event.
- Small footprint and high speed Even after adding several controls, panels, alignments and connections to the form, the footprint and speed of the editor showed no significant change.
- Controls' State State of controls can be set to be saved into files, using normal Java serialization.
- Form Preview Beside just watching the form in the designer, you can choose to view a preview of it. This is not a special thing in itself, except that it doesn't require you to compile the class file for it, as some editors would require.
- Generated Code The generated code seems to be cross-IDE, so that's a huge benefit when working with a team that uses different tools to write code. The first thing I love doing with generated code (or XML) of a form is to change it and see how the editor handles it. Visual Studio, for example, just stops displaying the form, or crashes completely at times. To my surprise, the bits of generated code used by the presentation are read only, meaning you can't change them using the NetBeans editor. This is a great feature, preventing mistakes and allowing the generated code to be separated from the form's logic, even if written in the same class file. Obviously it's not protected outside the IDE, so I changed it and it didn't even budge the editor. A quick look to the folder will show a .form file for the form, describing the components in it. The editor uses this file to regenerate the code every time it changes. Surely, the code wouldn't compile after I messed with it - But a quick change to a property regenerated it from scratch and all my hacks were gone. This is robustness I have yet to see in any GUI designer.
Comments (17)
initComponents, which does all the GUI initialisations as defined by the user, is called from the form's constructor. Hiding it would make the code a bit... Odd. More than that - The header of an event method is read-only, while the code inside is user-code. Hiding the method's header would be more than Odd, it would be unreadable. Thanks for commenting!