Reflections on NetBeans Beta 6 Geertjan Wielenga
It's been a few weeks since the release of NetBeans IDE 6.0 Beta 1. A rewritten Java editor, full-blown Ruby and Rails tooling, JSR 295 Swing Application Framework, all these and more are great, of course. But let's look at a few of the underhighlighted features, features that have not hit the headlines, undeservedly so, in my opinion. Perhaps these are not so much features as they are enablers, allowing the features to exist. The level at which these enablers play out is the NetBeans Platform, which underlies the NetBeans IDE, in combination with a series of the latest and greatest JSRs. As a result, the NetBeans IDE is a beneficiary of these features and JSRs, but is really just one of many. In a sense, one can argue that the NetBeans IDE is a test bed for the barriers that the NetBeans Platform and the JSRs have been pushing of late.
First of all, and most importantly, because of the introduction of JSR 199 (Java Compiler API) and JSR 269 (Pluggable Annotation Processing API) in Java SE 6, The NetBeans IDE is able to interact with the structural information that javac extracts from source code. On top of that, the fact that javac's implementation has been enhanced and tuned for interactive and embedded use has further empowered the IDE's ability to work with ranges of coherently related code. Together, these enhancements enable semantic highlighting, vastly improved code completion (how I used to hate code completion in NetBeans IDE!), and similar injections of specificity in how the editor operates.
JSR 295 (Beans Binding) and JSR 317 (Java Persistence API), JSR 296 (Swing Application Framework), and the "Matisse" GUI Builder are integrated together to result in a coherent set of tools for creating prototypes and small to medium sized Swing applications, complete with toolbar and menus, out of the box. From a learning perspective, this could not be more ideal. When I want to understand how these JSRs work in practice, I need do nothing more than run through the "Swing Desktop Application" template. This gives me a "Matisse" design form, which displays a table with live data. I can then explore the underlying code and, with Java book in hand, compare the generated code to the text in the book. I need not even create the Swing application's framework itself, since that is generated by the wizard for me. To top it all off, I have the "Matisse" GUI Builder tooling for all my design work.
For the really serious Swing development work, I have the NetBeans Platform too, incisively enhanced with the APIs I had always wanted. The "Auto Update Services API" lets me interact with the newly designed Plugin Manager or even create my own Plugin Manager from scratch. It also lets me programmatically install, uninstall, enable and disable plugins, i.e., from within my own plugin. The "Command Line Parsing API" allows me to read user input from the command line. The "UI Gestures API", which is used in NetBeans IDE whenever an error is thrown in the IDE itself. It brings up a dailog, inviting me to enter a brief description of the problem, which is then sent to a "gesture collector" for analysis and resolution. The "NBPreferences API", lets me store user preferences in the NetBeans user directory, instead of the JDK's default location.
Special mention needs to be made of a project referred to as "Schliemann". Even now, while still in development, at least a dozen implementations of the API on which its is based, the "Generic Languages Framework API", are extant. In the past one would have to implement a multiplicity of obscure NetBeans APIs to create an editor on the NetBeans Platform, but now the approach is purely declarative, using a regex-like syntax. The brilliance of this approach lies in its philosophy. The typical developer interested in creating an editor is very knowledgeable about their language, but not knowledgeable at all in relation to the NetBeans APIs. Schliemann provides the editor's complete framework. The programmer brings their own knowledge to the the table, all the tokens and the grammar, which, once declared are applied by the framework to the features. It is exciting to see that scripting languages, in particular, have already gained from this approach. Editors for D, MiniD, TorqueScript, Python, JavaScript, PHP, Erlang, Groovy, FreeMarker, among many others, are currently in development, based on the Schliemann framework.
On top of all these enablers, there is a range of tools I am quite excited about seeing in NetBeans IDE. For example, GlassFish v3 tooling is already available and is going to give Tomcat a real run for its money! In today's build, I noticed first-class support for MySQL and PostgreSQL. This has been a long time coming and is great to see for the first time. Personally, my interest lies in the underlying NetBeans Platform, however. Being the owner of one or two applications on the NetBeans Platform, I continue to be impressed how much I am able to focus on the domain knowledge of my application, while the NetBeans Team continues to extend its underlying infrastructure! Long may they continue to do so. :-)
Until next time,
Geertjan Wielenga
geertjan@dzone.com
|