Software Development

Develop JavaScript with the JSEclipse plug-in


JavaScript developers have been clamoring for development tools for years. Tools like Firebug and Venkman answer the call, but there are more options available.

Adobe Labs offers another option with the JSEclipse add-on for the Eclipse development platform. It provides a full-featured development environment for working with JavaScript. Here's an examination of JSEclipse, as well as the Eclipse platform.

Eclipse

In 1998, IBM began creating a development tools platform that eventually became known as Eclipse. The goal was the creation of a common platform for development products to avoid duplicating the most common elements of infrastructure. The first product release included a Java IDE, as well as the broader platform to go with it.

In 2001, it was made open source with the creation of the Eclipse consortium. It has evolved into the industry's major non-Microsoft software tool platform. It is a powerful tool for building Web and Java applications. It was built using Java, so that is its one main requirement. An added benefit is its availability on most operating systems.

JSEclipse

JSEclipse has been around for quite some time; it was originally developed by a company called Interakt, which was acquired by Adobe. Its support and development is now handled by Adobe Labs.

JSEclipse is an add-on for the Eclipse platform; it requires an Eclipse installation. It is installed via the software updates area of Eclipse. It is available as a free download once you register with the site. Once it has been installed, a JSEclipse menu is available within the Eclipse IDE when working with source code.

The focus of the JSEclipse tool is the creating and editing of JavaScript code. It includes the following features:

  • Code completion: The plug-in adds JavaScript contextual code completion and shortcuts within the Eclipse IDE. This is a great feature given the fact that no developer can memorize every property and method and all JavaScript objects.
  • Outline and navigation: JavaScript code and function declarations are easily traversed with project outlines.
  • Syntax highlighting: This feature provides a color coding scheme for various elements in JavaScript like comments, keywords, constants, and strings. You can also define custom color schemes.
  • Error reporting: You can easily locate code errors with the error reporting features of JSEclipse.
  • Templates: You can create and customize code templates to provide a starting point for current and future projects.
  • Library support: JSEclipse supports popular JavaScript libraries such as Dojo, Prototype, Spry, and YUI, so you can integrate them in your project and easily access and use their features.
  • Documentation: The JavaDoc documentation syntax is supported within your code comments.
  • Product support: Given that it is an Adobe product, JSEclipse is fully compatible with the Adobe Flex Builder 2 offering.

Impressions

As a longtime developer with such tools as NetBeans, Visual Studio, and Eclipse for Java development, I prefer the look and feel of a full-featured development environment that lets me easily work with project-oriented development. Also, a robust IDE provides context-sensitive help, as well as a full help system when your memory fails to recall the name of an object or its properties. The separate section at the bottom of the Eclipse interface provides real-time feedback on code problems, including the line number and an intuitive description of the project.

The installation of both Eclipse and JSEclipse are simple and straightforward. Downloads are available for most operating systems, which is another great feature since you are not restricted to the Windows platform. The EasyEclipse offering provides a good starting point for first-time users; it includes a variety of plug-ins to help you get up and running.

A drawback of the JSEclipse plug-in is the separation from the rest of a project I may be developing, as I work with .NET-based solutions and other Web technologies. I can take advantage of other plug-ins to use Eclipse for everything. One of the great features of the Eclipse platform is its extensibility via its plug-in support. In addition to JSEclipse, there is a variety of plug-ins available to accommodate most development languages and tasks. The following list provides a sampling of what is available:

  • Amateras Html Editor: While the current version of Eclipse provides XML support, this tool adds CSS and HTML, along with XML support to the IDE.
  • ASDT: Allows ActionScript developers to use Eclipse for the development projects.
  • EPIC: Brings Perl support to Eclipse.
  • PHPEclipse: Lets you develop PHP code within Eclipse.
  • Subclipse: Version control system for use with Eclipse.

As you can see, JSEclipse is not restricted to Java development. A more thorough list is available online via Eclipse Plugin Central.

Conclusion

The JSEclipse plug-in is a viable option for JavaScript developers who are familiar with Eclipse or have a desire to use the Eclipse platform. JSEclipse provides an environment for developing and debugging custom JavaScript code that may take advantage of freely available libraries. The context-sensitive and online help are two of the best features because you have everything you need at your fingertips (i.e., no running to the bookshelf or performing Google searches).

If you are content with your current Web development tools, then diving into a whole new environment with Eclipse may not be best for you.

Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Development Zone newsletter, delivered each Tuesday. Automatically subscribe today!

About

Tony Patton has worn many hats over his 15+ years in the IT industry while witnessing many technologies come and go. He currently focuses on .NET and Web Development while trying to grasp the many facets of supporting such technologies in a productio...

12 comments
ambientNRG
ambientNRG

What's the minimum install for *just* javascript development? There doesn't seem to be a 'bare' Eclipse distro. TIA

JMUnderwood11
JMUnderwood11

Is Eclipse with JSEclipse the best IDE for javascript? What's better, or what is your pref?

pletisan
pletisan

First, thanks for pointing me to JSEclipse, as I developusing JavaScript in Eclipse, but never heard about JSEclipse before :) For the PHPEclipse, I would point out the PDT project as another (great) alternative for PHP (http://www.eclipse.org/pdt/) development under Eclipse.

ultra_blue
ultra_blue

Does anybody know how it compares to Aptana?

Justin James
Justin James

... that makes me a touch jealous of the coders using Eclipse. It really does sound like a great environment. Visual Studio is a great IDE too, but there seems to be a lot less "community" around it. J.Ja

JMUnderwood11
JMUnderwood11

It's quite large. An then you have to download the JSEclipse plugin I just did this a few weeks ago. I found the installation and setup confusing -- and I'm an old IT guy that's setup hundreds of programs by now. I also did NOT find the U/I very intuitive. If you're not committed to Eclipse/JSEclipse, you may want to take a look at Aptana video tutorials first. HTH.

billbolte.com
billbolte.com

I've been using PDT for almost a year now and really like it. Haven't tried PHPEclipse to know how the 2 compare. Anyone use both?

Justin James
Justin James

... that I not the only person who had a hard time figuring out Eclipse! I tried it out when "Callisto" (3.2, I think) came out, and it took me a while to figure out that there was no setup.exe... and I too was never sure what I needed to add onto it to figure out how to use it! If I was new to development, and faced with either Eclipse or Visual Studio, I am pretty sure that I would be a somewhat decent VB.Net or C# developer by the time I got Eclipse installed and configured... J.Ja

ultra_blue
ultra_blue

Jim: But of course, the real thanks goes to the folks over at Aptana. http://www.aptana.com/ I think Aptana is in the best-of-breed class for Eclipse plugins in general. However, I haven't used too many of the web plugins (especially for js), so I'm somewhat biased. I think their integration of existing JS frameworks is pure genius. Blue

coopster7
coopster7

There is a bit of a learning curve but once you get accustomed to using the software and discovering the time-saving features you will wonder how you ever coded without this tool. I just installed Europa yesterday and imported my preferences from the old Callisto install. There are quite a few new sweet enhancements: http://download.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/whatsnew/eclipse-news-all.html I recommend a fresh new install though, I had a few bumps when attempting an upgrade.

JMUnderwood11
JMUnderwood11

So, Blue, did you find Aptana easy/intuitive to setup and use?

Editor's Picks