| By Tim Boudreau | Article Rating: |
|
| June 23, 2008 12:00 PM EDT | Reads: |
7,931 |
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,931
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. |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?





































