Reviews

Get Eclipsed.

Don’t you just love it when you look and look and look for the best solution to your problem, and when you finally find it, it’s totally free? The Eclipse development platform is the greatest IDE that I’ve run across in my career in web development, and that includes any highend solution, like GoLive or Dreamweaver (gah…someone give me some soap for my mouth…).

For a little over a year now, I’ve been using the Eclipse IDE for developing websites and online apps in PHP, XHTML, CSS, and Javascript. Eclipse is a very versatile, stable, and professional development platform, especially for those who hand code, though it has plenty to offer for WYSIWYG developers. Eclipse was originally designed, as I understand it, as a platform for Java development, testing, and packaging. It was developed by IBM and later released into Open Source. The Eclipse Foundation was formed in 2001 by several leaders of the software development industry, and became a non-profit organization in 2004. Eclipse has now evolved into an extremely open platform for development in almost any programming or scripting language in existence. (More history here.)

Eclipse has what I consider the best solutions for every one of my needs. Granted, I haven’t thoroughly tested every development application for every discipline I work in. I’m sure there are a lot of apps I didn’t try for developing CSS or Javascript. For PHP, however, I’ve ran the gauntlet. I tried Maguma, Komodo, Zend, NuSphere… you name it. If I didn’t try it, then the company doesn’t know how to optimize their site for Google. I looked pretty hard for XHTML development apps, too. The point here, though, is that Eclipse is the best IDE. That’s spelled Integrated Development Environment. I can do everything development-centric in one application, and Eclipse throws in a bunch of extras to top it all off.

Eclipse doesn’t do everything I need right out of the box, but there are all kinds of really great plugins, and all free for non-commercial users, and really cheap otherwise. The plugins are also really easy to download and install. Most of the time you don’t even have to leave the application; Eclipse finds the plugins itself and installs them automagically. All it needs is a URL, and a lot of times it already knows it.

PHPEclipse

PHPEclipse, as the name implies, is the plugin that facilitates PHP development. I’ve read that Zend is developing a PHP development solution for Eclipse, too. If it’s anything like their Studio, I’ve already made up my mind; and even if it’s not, it’s hard to see how they’re going to beat all the awesomeness that PHPEclipse provides.

Color Coding & Folding

Color coding and code folding are the basic starters; it folds classes, methods, function, and multi-line comments. I rarely use folding, but I do sometimes, and it’s nice to know it’s their. Heck, when first started out, I spent days looking for a solution that would fold code; it was my first and most important criteria. Then, when I finally found a solution that did code folding, and including all my other “lesser” needs, I never even used the folding. Just like a white boy…

Outline Panel

But I digress. Moving on to the more powerful features, PHPEclipse comes with an outline panel, which is extremely handy for navigating quickly around long classes and large documents full of methods. The outline panel lists all classes in a document, and includes their properties and methods, and it also lists floating functions. It allows you to sort the list alphabetically, which is really great because it makes items really easy to find in a long document.

Code Completion

PHPEclipse also sports comprehensive code completion. Again, this is a feature that I rarely use, and I’ve never been crazy about code completion in any development package. But a lot of people like it, and you can turn it off in the preferences if you don’t.

Function Definitions

This is the greatest time saving feature ever. How many times do you have to go to PHP’s site just because you can’t remember the required parameters, or their order, for a particular PHP function? For me, it’s all the time; or rather it used to be. PHPEclipse takes care of that with floating function definitions. If you float your mouse over a PHP function, a box will popup with a brief description of the function, and an explanation of its syntax, i.e. the parameters it requires and their order. This means that I rarely have to go to the PHP documentation anymore to remember what parameters I need to give a certain function; the information is right there at any given moment, whenever and wherever I need it. I barely have to move a muscle (now that’s my kind of technology).

What’s even cooler, the definitions are not limited to PHP’s predefined functions; they also include any custom function or method that you have created in your entire project, even if it’s in a different file. Say, for example, that I typed the following in one file in a project:

class ExampleClass {
    public function exampleFunction($param1,$param2,$param3) {
        //code here...
    }
}

Then I saved the file and closed it. Then I create a new document in the same project, maybe in the same folder, maybe in a different folder, and in that document I type:

$test = new ExampleClass;
$x = $test->exampleFunction();

…but I don’t type in the parameters for the method, because I can’t remember them. I could go find the file where the method was created, but with PHPEclipse I don’t have to. I just float my mouse over “$test->exampleFunction“, and a box pops up that tells me several things about that function, including the parameters that it needs and their order. Very clear, very easy to understand; a real time-saving feature.

Variable Instance Highlighting

Yet another really useful feature. If you have your cursor on a variable called $example, then all of the other places where $example is used in that method, function, or document, will be highlighted. This really helps to quickly understand the path that the code is taking, which is great especially when you’re debugging.

Bracket Matching

PHPEclipse helps you to keep track of nested functions, conditions, and loops, by showing you which opening and closing brackets go together. If your cursor is near an opening bracket, PHPEclipse will put a box around the corresponding closing bracket, and vice-versa. This has saved me many brain burns.

Syntax Checking

I would be remiss if I didn’t mention the great syntax checking of this plugin. It clearly points out any level of error, from a notice to a critical failure, both inline, and as a summary view on the right side of the document, which is like a map of your whole document that is viewable without scrolling, and from which you can jump to the various problem areas simply by clicking the warning icons. Very handy.

So, all-in-all, a very well-rounded plugin, and completely free.

Web Tools Platform

The Web Tools Platform is a plugin developed directly by the Eclipse Foundation. To use their own words, “WTP provides a generic, extensible and standards-based platform and set of tools for…Web-centric application development.” My primary use for this plugin is the great CSS editor, which has some of the same features as PHPEclipse, making it nice to work with both of them together. One of the most important features that the CSS editor includes is an outline view that will sort the style list alphabetically, grouping IDs, classes, and tags together. This makes stylesheet editing much quicker and easier, even months after the project is done when you might have to go back and make changes for your client.

And of course, it also has color coding.

I have to be honest hear and say that I used to use a separate plugin that was made exclusively for editing CSS. I liked it a little bit better because it had syntax checking, and the CSS editor included with the WTP doesn’t appear to. Unfortunately, the CSS editor I used to use hasn’t been updated since 2004, and now it’s no longer compatible with the latest release of Eclipse (3.2). I’m not too upset over it though; CSS is pretty simple as far as syntax goes, and of all the errors that I make with CSS, syntax is rarely among them.

JSEclipse

For javascript editing, I use a plugin called JSEClipse. JSEclipse includes code completion, which I personally find to be much handier in this situation, since there are many more functions that I’m unfamiliar with in javascript than in PHP.

JSEclipse is the only plugin that I use so far that isn’t free, at least not for me. If you’re a non-commercial user, i.e. you don’t develop for profit, then JSEclipse is free to you. Otherwise, you can get a single developer license for $29.

There’s also a decent alternative to JSEclipse. It comes with the Web Tools Platform described above. It’s completely free, and it also has code completion. The default color coding is not as good as JSEclipse, but I think it can be tweaked in the preferences.

Project Explorer

One thing that will throw you about Eclipse is that you can’t open a file unless it’s in an existing project. You can’t just go “File>Open” and look for the file. You have to create a project in your workspace, then create your folders and files in that project. If you want to open a file in Eclipse and it’s not in a project, you can open Windows Explorer, find the file, and then drag and drop the file directly onto the Eclipse window, into an open project, then you can open it. I think there is actually a plugin that will alter this behavior and let you open files that aren’t in a project, but I’ve never needed it. I like that Eclipse forces me to be organized. I keep my quick-do’s and odd-ball files out of Eclipse. If I need to open something quickly, and it doesn’t belong in a project, nor would it make sense to make a project for it, I just open that file in ConTEXT, which is a great little editor for small tasks. Eclipse is my mothership; it holds all my web development projects and keeps them in an organized list that is always before me as I work every day.

The Project Explorer is the outline view that shows you a list of all the projects in your workspace, as well as a collapsible document tree of any project that is open. It’s very useful, not just for browsing through projects, but also as a mini project management feature, so that you can have all of your projects in front of you as you work from day to day. More than once I’ve glanced over at that list as I’m working and realized that I probaby should be working on something else in that list.

Workspace

Lastly, there’s the Workspace, which I briefly referred to above. The workspace is basically an area in your operating system’s file structure that you have designated for Eclipse to keep projects in. You can have multiple workspaces, and you can even have multiple instances of Eclipse open, each using a different workspace. Each workspace will show a different set of projects in the projects explorer. I’ve only used one workspace ever, but I could certainly see a benefit, in some cases, of separating some projects into some major categories, and this would do the trick.

Wrap it up, already…

There is way more to Eclipse than what I’ve written here. I’ve read a lot of rants and discussion threads about development platforms for my disciplines, and rarely do I hear Eclipse mentioned. I’ve only ran into one other developer who uses PHPEclipse. I’ve always thought that was pretty crazy. Give it a try for yourself, and let me know if you come to the same conclusion that I have: Eclipse overshadows them all.

Discussion

No comments for “Get Eclipsed.”

Post a comment