| By Tim Boudreau | Article Rating: |
|
| June 23, 2008 12:00 PM EDT | Reads: |
7,946 |
Ruby Support
Ruby support in NetBeans 6.0 includes all of the features Java developers have come to expect from an IDE, such as:
- Code completion
- Warnings and quick fixes
- Integrated pop-up documentation
- Support for building projects with Rake
NetBeans 6.0 bundles the JRuby runtime, an interpreter for the Ruby language written in Java (native Ruby can also be used). It also includes the popular Rails Web application framework. With a single download you get a complete, ready-to-run Ruby development environment – with no additional downloads or installations needed. Since JRuby is a Java implementation of a Ruby runtime, there are additional benefits. Java and Ruby code can call each other, making mixed-language projects viable in new and interesting ways. The Ruby language is concise and excellent for text processing; Java’s type-safety and the huge body of existing libraries and frameworks means these languages complement each other nicely. The marriage of Java and Ruby gives developers more freedom to choose the right tool for the job.
JavaScript Support in NetBeans 6.1
NetBeans 6.0 does a remarkable job of providing editor features for Ruby that Java developers have been enjoying for years. NetBeans 6.1 does the same things for JavaScript programming. In the case of JavaScript, it includes a number of popular libraries including Dojo, YUI, and JQuery – including integrated pop-up documentation for them (see Figure 1). In addition, type assertions (documentation hints about the types of parameters). Tools for in-browser debugging will be available in beta shortly after NetBeans 6.1 is released. The NetBeans IDE comes with its existing HTML, CSS, and XML editors, which provide code completion, pop-up documentation, etc.
Code completion for both Ruby and JavaScript in NetBeans 6.1 is more than just showing class members and available keywords; it’s actually sensitive to where the editor caret is. For example, as shown in Figure 2, if the caret is inside a regular expression, it will show regular expression code completion rather than the normal JavaScript or Ruby code completion.
Similarly, code completion works inside string literals – so if the editor determines that you are referring to an HTML document, it can provide appropriate completions (see Figure 3).
A lot of attention has been paid to editor hints – warnings and quick fixes – in the JavaScript editor in NetBeans 6.1. For example, the following is legitimate JavaScript code, but will break in Internet Explorer:
point = {
x : 1,
y : 1, //This is a trailing comma and will break in IE
}
The IDE will show a warning similar to Figure 4 and offer to fix the error automatically. You can customize the list of browsers you’re targeting, and this will adjust the list of warnings you get. This sort of functionality has been available in Java editors for some time – but bringing it to the JavaScript language is something new.
PHP Support
PHP is one of the most popular Web development frameworks on the planet. Work is going on to build PHP tooling into NetBeans, including debugging, and the same advanced editor features NetBeans 6.1 offers for the Java, JavaScript, and Ruby languages. It will be available as a beta when NetBeans 6.1 is released. It can be downloaded now in daily builds as a standalone PHP development tool.
Getting Started with NetBeans
There are a number of NetBeans configurations available for different needs. Go to http://www.netbeans.org and click the download link on the front page to download the IDE. You may need to get a milestone or development build for the new PHP support, which will be in beta when NetBeans 6.1 is released. Figure 5 shows the configurations available.
If you get one of the smaller bundles, you can always use Tools > Plugins to download and install additional tools and language editors later. The NetBeans Plugin Portal, http://plugins.netbeans.org/ also offers additional community-developed plug-ins for a wide range of technologies. Even if you are happily using another IDE, the NetBeans 6.1 release is worth a look.

Published June 23, 2008 Reads 7,946
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
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.
![]() |
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. |
||||
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- How PowerBuilder Got Its Groove Back
- The Cloud Has Cross-Border Ambitions
- Ulitzer Named "New Media" Partner of Greatly Anticipated iStrategy Event in Berlin
- Risks and Enterprise Mobility?
- Steps for Success in Enterprise Mobility?
- Are Mobile Luddites Resisting Mobility?
- Hot Event in Santa Clara Becomes Cool with the iPhone
- The Difference Between Web Hosting and Cloud Computing
- Sybase CTO to Speak at 4th International Cloud Computing Expo
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- Five Reasons to Choose a Private Cloud
- Seeding The Cloud: The Future of Data Management
- The Threat Behind the Firewall
- Economy Drives Adoption of Virtual Lab Technology
- Tips for Efficient PaaS Application Design
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- Where Are RIA Technologies Headed in 2008?
- PowerBuilder History - How Did It Evolve?
- The Top 250 Players in the Cloud Computing Ecosystem
- Custom Common Dialogs Using SetWindowsHookEx
- DDDW Tips and Tricks
- OLE - Extending the Capabilities of PowerBuilder
- DataWindow.NET How To: Data Entry Form
- Book Excerpt: Sybase Adaptive Server Anywhere
- Sybase ASE 12.5 Performance and Tuning
- Working with SOA & Web Services in PowerBuilder
- Office 2003 Toolbar: A New Look For Your Old PowerBuilder App
- Dynamically Creating DataWindow Objects



































