Welcome!

Java Authors: Michael Sheehan, Maureen O'Gara, Jonny Defh, Suresh Krishna Madhuvarsu, RealWire News Distribution

Related Topics: Java, PHP, Ruby

Java: Article

NetBeans: It's Not Just for Java Anymore

Using dynamic languages

Java developers have had a nice ride the last few years. With ferocious competition in the Java tools space, the tools they use have been getting better and better. Where one tool innovates, such as with quick fixes, competitors quickly duplicate and expand on that innovation. This has led to a fertile field of tools for Java developers to choose from. Developers using other languages have not been so lucky, but this is changing.

NetBeans 6.0 involved a complete rewrite of the Java code editor to use the parser that belongs to javac, the Java language compiler that comes with the JDK, to add missing editor features in a way that would be sustainable and solid for the foreseeable future. As a result, its code editor is now very competitive in features and performance to other IDEs. NetBeans 6.1 adds support for additional dynamic languages.

Develop Using Dynamic Languages in NetBeans
NetBeans 6.0 introduced full-blown support for the Ruby language – the first in an ongoing list of dynamic languages the NetBeans IDE will support. The innovations and benefits of that ferocious competition in the Java space are now finding their way to developers who might not even know or care to know Java. You can download the NetBeans 6.0 IDE with just Ruby support but no Java editing support if that’s what you want – and the Ruby-only download of the NetBeans IDE weighs in at a tiny 22MB, including the JRuby runtime and Rails framework.

Supporting dynamic languages in a development tool is notoriously hard because they’re, well, dynamic. A Ruby object can say, “Hmm, I think now I want to be subclass of String,” and with one line of code, do that at runtime. Analyzing code flow to the degree that one can figure out that something became a String subclass on-the-fly and determine where code completion should and shouldn’t offer completions for the String is nearly impossible.

Fortunately, most programmers who use dynamic languages program as if they were writing in a strongly typed language. An editor can infer quite a bit of context with some margin of error. Objects make programming easier for the human mind to grapple with, since human beings are used to thinking of things as, well, things. Objects make programming more accessible by leveraging existing human mental constructs. They are an affordance for the human mind, and the fact that it is likely they will be used means a code editor can take advantage of that affordance as well.

More Stories By Tim Boudreau

Tim Boudreau is a senior staff engineer at Sun Microsystems. He has been working on the NetBeans project for nine years and is co-author of "NetBeans: The Definitive Guide" from O'Reilly and Associates, and "Rich Client Programming" from Addison Wesley.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Christopher Judd 06/27/08 11:03:36 AM EDT

Nice article. But I am surprised you did not mention the upcoming Groovy support when you mentioned the upcoming PHP support.