While NetBeans has always been the Java IDE, support for other languages has crept in over time. Today, NetBeans 7.3 was released, bringing with it a host of new support for CSS3, HTML5 and JavaScript. The core Java IDE, however, received only minor updates.
There was one Java-related update of note in NetBeans 7.3, however: Java EE users can now automatically generate a REST client, given some existing client source code to analyze.
This new feature is reminiscent of the days when service-oriented architectures roamed freely in the enterprise, and when WSDL wasn’t a bad word. John Brock, principal product manager at Oracle, said that this capability is aimed at giving Java EE developers a simple way to get started when building a Web-based front end for their existing Java EE applications.
“We saw that there were Java EE developers out there that…hadn’t quite had the time to understand JavaScript, let alone understand Backbone.js or AngularJS or these other JavaScript frameworks,” he said. “We saw that as a possible pain point. The developers said, ‘Give me some examples, give me a starting point,’ and in this case it’s not the same as the SOAP days, where you could grab service objects and do deep analysis to automatically build a client. In this case, [NetBeans’ client creation capability] requires a project or a REST service that you have written yourself and have the source code to, today.”
Thus, NetBeans 7.3 can output a Backbone.js-based UI for your Java EE service, provided you’ve already written a client for it to inspect.
JavaScript equipped
Brock said that the Web is where most clients are being built. As such, Java back ends often have to speak to JavaScript front ends, and use CSS3 and HTML5 for visualizations.
Brock said the NetBeans team had noticed that Java developers who had written client-side applications for their back-end systems were “having to understand how to make it pretty with HTML5 and CSS3 when they were done. What we wanted to be able to do within the IDE itself was allow developers to interact more intelligently and efficiently with HTML5 and CSS3.”
To that end, the team embedded a WebKit browser into the IDE, added a Chrome extension, and streamlined the process of debugging applications based on JavaScript.
“We rewrote the JavaScript editor from scratch, all based on Oracle’s Nashorn JavaScript runtime project,” said Brock. “In doing that, we were able to bring the editing experience of JavaScript up to the level of the Java support in NetBeans. That means code completion, inline documentation for methodologies, color syntaxing, and code folding are there.”
In addition, the tie-ins to Chrome and the built-in WebKit browser allow for a streamlined “prettying-up” process for the application. Editing CSS to move borders and objects around results in immediate updates within the browser. Editing and saving an HTML file will automatically refresh the browser window, giving developers immediate feedback on their choices.
Further, the included WebKit-based browser can be resized to the screen size of the developer’s choosing. Locking the browser to the screen size of an iPhone can quickly show you what aspects of a Web interface are too large to be usable on mobile.
This ties into the immediate feedback loop of the CSS3 and HTML5 editing capabilities in NetBeans 7.3, said Brock, as developers can quickly resize elements of a Web client, and resulting changes can be saved as media-query data, allowing new views to be quickly segmented off by device size. He said developers can quickly and automatically generate the code needed to present a Web page specifically sized for mobile and tablet devices.