Using Eclipse for Web Development

As I alluded to on Twitter, Eclipse is a horrific scattered mess of projects masquerading as an IDE.  I only hear wonderful things about it, mostly from ColdFusion developers, but god help the person that assumes it will be a quick and easy installation.

First you need to choose the package you want.  I'm going to be writing PHP, ColdFusion, JavaScript, CSS, HTML files, and committing them to Subversion repositories.

Installation

Now, which package should I download?

The size differences alone give me pause, and the descriptions don't help at all.  Why is Eclipse Classic – which includes Java Development Tools – twice the size of Eclipse IDE for Java Developers?  Since I'm not writing anything in Java I'm going to choose Eclipse Classic.

Individual Package

I want syntax highlighting and code completion for PHP, ColdFusion, JavaScript, CSS and HTML.  I also want integrated SVN access.  This should be easy enough, let's get started.

ColdFusion

ColdFusion is easy, thanks to CFEclipse.  Well, almost. From the download page:

Important note regarding Eclipse 3.4 (Ganymede): Currently CFEclipse does not work well with Ganymede. We recommend you continue using Eclipse 3.3 (Europa) for a stable user experience.

I'm going to choose to ignore that, I don't like to run old software.  Add http://www.cfeclipse.org/update to the Software Update locations, select your packages (not CFUnit), click Install and restart Eclipse.

PHP

PHP is not so easy.  There are three options; PDT, PHPEclipse and Zend Studio for Eclipse.  Zend is of the main contributors to PDT, and even offers a handy comparison between Zend Studio and PDT.  Oh, Zend Studio (for Windows) is 317MB whereas PDT is 7.8MB. Or maybe it's 122.5MB.

We're starting to see where in my opinion, Eclipse falls apart.  PDT All-In-One includes Eclipse 3.3 and the dependencies.  The latest version of Eclipse is 3.4.1.  Oh and Zend Studio for Eclipse?  It's not for Eclipse, it's a custom Eclipse bundle. Zend Studio on Eclipse would be more accurate.

Let's take a look at the PDT install documentation. Obviously we want to install from an update site, an automated installation has to be easier than downloading a zip file.

From Update Site

  • Get Eclipse:
  • Start the Install Manager. You will require three update sites to perform an install of PDT 2.0.

Help > Software Updates… > Available Software > Manage Sites…
Add… > add the DLTK 1.0 interim site: download.eclipse.org/technology/dltk/updates-dev/1.0/
Add… > add the PDT 2.0 interim site: download.eclipse.org/tools/pdt/updates/interim/
Enable the Ganymede Update site (if not already enabled): download.eclipse.org/releases/ganymede/
Expand the DLTK site and select the Dynamic Languages Toolkit – Core Frameworks or Dynamic Languages Toolkit – Core Frameworks SDK Feature
Select the PDT or PDT SDK Feature
Install…

Wait, why do I need the Ganymede JEE Bundle? What's wrong with the Eclipse Classic bundle we downloaded before?  According to the Eclipse site the JEEE bundle is "Tools for Java developers creating JEE and Web applications". I'm developing in PHP, not Java.  Since the answer isn't on the PDT or Eclipse sites I'm going to take a pass and install PHPEclipse.  Add http://update.phpeclipse.net/update/stable/1.2.x to your Software Update sites, and I installed PHPEclipse and Xdebug.

Duplicate Sources

Duplicate Sources

You'll notice that when you add http://update.phpeclipse.net/update/stable/1.2.x to your Software Update list that you end up with two entries. That's because there's a HTTP 302 (temporary) redirect there, and for some reason Eclipse adds an entry for both URLs.  That's not at all confusing.

That's odd, there's an obtuse error message about unmet dependencies for CFUnit when we try and install PHPEclipse and Xdebug. Because they're obviously related. Uninstall CFUnit and it'll work.

CFUnit dependencies for PHPEclipse

CFUnit dependencies for PHPEclipse

Subversion

I'm going to use Subclipse here for no other reason than a few people said it's what they use.  I have no idea what the differences are (if any) between Subclipse and Subversive.  Subversive says it "aims to provide SVN integration for Eclipse" and that in November 2007 it was started Incubation as a Technology Project.  To me, none of that implies anything good.  To install Subclipse add http://subclipse.tigris.org/update_1.4.x as a Site, install the Subclipse (required) package and restart. This sure is easy!

CSS, HTML, JavaScript

Does Eclipse include support for this out of the box? Maybe. Does Eclipse make it clear if they do? Of course not.  And the answer is no, support for this is not included.

It appears that the Web Tools Platform (WTP) Project will provide support for this.  WTP "includes source and graphical editors for a variety of languages, wizards and built-in applications to simplify development, and tools and APIs to support deploying, running, and testing apps."  There isn't much detail about what is included in a variety of languages.  Eclipse projects seem to be big on only providing a summary of what's included in a package. And if you think it's important to have more details, well then fuck you, go read the changelog.

Let's download WTP.

WTP - Stable Builds

WTP - Stable Builds

What the hell is this? Oh, whew, there's a legend.

WTP - Legend

WTP - Legend

OK, that's not comforting. Why would I want to download a stable build of anything that has 40 Access Rule Violations, 816 compilation warnings and 968 Access Rule Warnings?  Here's the quintessential example of a project that's run by developers. Just because that information is available, DOESN'T MEAN YOU SHOULD DISPLAY IT. Odds are since this is a stable build that those warnings and errors aren't a big deal.  If that's the case, don't show them right on the main page.

Let's skip the zip file anyways, and use the Update Manager.

This update site provides the features of the Eclipse Web Tools Platform (WTP).

If you are just getting started with Eclipse or Eclipse Web Tools, you may want to first install from the Ganymede update site, as it would have everything you need to get started.

This Web Tools Platform update site does assume you have all the pre-reqs installed.

Beyond the basic Web Tools Platform, this site offers the SDK version of Web Tools and also the XSL Incubating Component.

To use this update site in your existing installation of Eclipse, add the following URL as a remote update site in your update manager, if it does not already have it.

http://download.eclipse.org/webtools/updates/

Vague, obtuse documentation? I'm sensing a trend.

If you are just getting started with Eclipse or Eclipse Web Tools, you may want to first install from the Ganymede update site, as it would have everything you need to get started.

Install what from the Ganymede update site? Eclipse Web Tools, abbreviated as WTP? Or Ganymede? Don't forget, Ganymede is the latest release of Eclipse, 3.4.x.  What does "it" have to get me started?

This Web Tools Platform update site does assume you have all the pre-reqs installed.

You know what they say when you assume. Maybe I've got the pre-reqs installed, where can I find a list? Seriously, I'd love to know.

OK, let's pretend that we have the mythical pre-requisites installed, and add http://download.eclipse.org/webtools/updates/ to our Software Update sites.

Here is the list of available software before adding the WTP source:

Sources - Before Adding WTP Site

Sources - Before Adding WTP Site

Here is the list of available software after adding the WTP source:

Sources - After Adding WTP Site

Sources - After Adding WTP Site

Can you spot the diffence? Me either. If I drill down to Ganymede > Web and Java EE Development section I see something called Web Developer Tools, but the version number doesn't match anything on the Web Tools Platform (WTP) download page.  I've got an idea, let's take a look at the XML used by the pseudo-repository.

OK, there's a description: "The update site contains the features of the of Eclipse Web Tools Project (WTP)". Good, that helps. Huh, I can see that the Web Developer Tools package in the Software Update utility has a meaningful version of 3.0.2.v200808250510-7A-8f8QqVJLTFUkFahb1QIq2z0t8, and inside the XML ther's something with a category name of Web Tools Platform (WTP) 3.0.2 that also has a version of 3.0.2.v200808250510-7A-8f8QqVJLTFUkFahb1QIq2z0t8!  Let's view the Properties for the Web Developer Tools package through the Software Update tool.  The description is "Web Developer Tools minimum installation".  So, what is it, Web Tools Platform, or Web Developer Tools?

It's listed in the WTP site.xml, so it must be WTP.  That's odd though, 3.0.3 is the latest release of WTP, and I've got Software Update configured to "Show only the latest versions of available software" so why don't I see version 3.0.3?

Oh wait, even though we've added a source, we still need to enable it.

Because obviously the act of proactively adding a source doesn't imply that I want to see any updates from said source.  From the Software Update tool click Mange Sites and check the box next to the webtools URL.

Enable WTP Site

Enable WTP Site

Check off a few of the WTP items and click Install. It doesn't seem to matter which you check, because Eclipse will decide what needs to be installed anyways. But hey, thanks for giving me the illusion of choice.

Once it's done you'll have to restart Eclipse. Or do you? Even the WTP folks don't know (scroll to the very bottom), and they wrote the software!

Apply or Restart

Apply or Restart

The End

This is as far as we're going to get today.  The installation is such an incredibly complicated mess that I don't have the energy to test it out.  Hell, I barely have the energy to proof read this post.

 

Tags: ,

28 Responses to “Using Eclipse for Web Development”

  1. brandon Says:

    I can't believe you took the time to try all that. After glancing at the instructions, I decided to use Coda + Cornerstone. I like Coda's syntax highlighting and built-in FTP. Cornerstone is the nicest UI for a SVN client I've used. So far, I've had great success with both (Borat reference intentional).

  2. Corey Says:

    I really want to become comfortable with Eclipse. I've been using UltraEdit for almost 9 years, and being locked to Windows when my primary laptop is a Macbook Pro is killing me. Also I watched Sean using Eclipse and it was a thing of beauty. Half of the issues I've laid out could be fixed with clear documentation and better design.

  3. Wayne Beaton Says:

    Have you looked at one of the distros? You can assemble all the pieces you need using Yoxos, for example.

    http://ondemand.yoxos.com/geteclipse/start

  4. Jim Priest Says:

    Another option (although a non-free one) is to use something like MyEclipse which does all this hard work for you… I've been using it at work and it works very well.

    I'd also second the recommendation for a tool like yoxos or Pulse.

  5. AppBeacon Says:

    Jim or Wayne,

    Maybe I'm just blind, but I couldn't find anything on Yoxos for PHP. Not in "Programming Languages". Not in "Web & Java EE Development".

    Any suggestions? I need CSS, HTML, SQL, Smarty, and PHP.

  6. BillSaysThis Says:

    I may be biased by working there but I think you should take a look at least at Aptana Studio and our plugins as a better starting point distro of Eclipse for your needs.

  7. AppBeacon Says:

    @BillSaysThis

    I did just that yesterday. Unfortunately, I just didn't like the experience. It opened very slowly on my MacBook Pro – 2 years old. But… all the developer apps do as well – especially Komodo Edit.

    My main issue with Aptana was opening files from Transmit. I could only open one at a time. Each time I opened another, Aptana appeared to launch again, but only the first file I opened was available to edit.

    Maybe I was simply doing something wrong or didn't have it configured correctly. However, I just don't have time to figure out software when I'm writing my own.

    Suggestions?

  8. BillSaysThis Says:

    Studio has FTP in the community edition and SFTP in the Pro edition–the download includes a 30 day trial of the Pro edition features–so you could just use Studio for transport of the files.

    Further, I have noticed that on OS X dropping a file from, say, Finder onto the Studio dock icon will look like its launching another instance of Studio while opening the dropped file in the already open instance, but I don't think the second instance actually opens.

    Also, we are moving Studio to Eclipse 3.4 for v1.3 and that should improve a number of the performance aspects. Even though 1.2 just released a few weeks back, 1.3 is not far off, though I'd rather not be more specific just yet.

  9. AppBeacon Says:

    @BillSaysThis : Thanks for the response. I'll wait and see what 3.4 looks like.

  10. Dilantha Says:

    Easy Eclipse http://www.easyeclipse.org/site/home/ has a bundle for PHP development

  11. Tim Hoelscher Says:

    This post made me laugh – it is so true. I actually like Eclipse now that I have it configured the way I like, but getting there was as rough and frustrating as you describe. I can't imagine how many potential users they are alienating with their absurd distribution and update structure. I had heard from a lot of people whose opinions I respected that Eclipse was a great environment, and that compelled me to spend hours getting it set up. I question how many people are willing to do that.

  12. LyhjeHylje Says:

    I was wrestling with exactly the same problem, thanks for pointing out the "enable updates" -part.

  13. Riley Says:

    Nice post, I'm glad to see other people think installing Eclipse for development is stupidly and unnecessarily difficult. It reminds me of every IBM product I worked with – like something designed by and for nerdy developers only, with lots of totally ridiculous steps that someone who knew what they were doing could turn into something sensible with a bit of effort put into polish.

  14. Joe Wright Says:

    I hugely enjoyed reading your post. It really is a crazy world in the Eclipse plugin ecosystem.

    Having tackled the same problem at work recently I stumbled across a project which adds a bit of polish to the install process: poweredbypulse.com

  15. Ann R. Says:

    Love the post. I am scouring the internet to see if Eclipse is worth the headache. Glad to see I'm not the only one feeling this. I'm still debating on whether I should proceed but alas I have the big payoff in mind. Please post an update of your progress with Eclipse (or the lack thereof). Would love to hear if it's everything it's cracked up to be.

  16. Craig Says:

    Wahoo. I just got done leaving a message over on Eclipse Community Forums / newcomer about THIS VERY SAME CONFUSION I'm having with the Eclipse IDE.

    thank you very much for this revealing expose.

    I'll be going back over this and the added comments to glean what direction to take.. sticking with Eclipse or finding an alternative. The consensus seems to be that there is a light at the end of the tunnel with Eclipse.. I'm willing to grope a little longer after reading these comments

  17. GreenMatt Says:

    I have had similar struggles a couple times before and have avoided Eclipse as a result. I'm going through it again, as I'm currently (and temporarily) working in an environment where I don't have other options. Also, I'm looking for new work and Java keeps coming up, so I'm trying to learn Eclipse for that.

  18. Chris Says:

    I had similar problems with Ganymede, having downloaded the basic Java SDK package, and then tried to add C++, PHP etc. Couldn't figure it out, and with nothing much to lose, downloaded the newest release, Galileo – no problems. It seems to have had a major sort out and the plugin configuration is much more intuitive. Given that it's over a year since your post, you have probably found that already!

  19. Boatzart Says:

    Yikes, I just downloaded eclipse on my mac to check it out for web developement. I spent 20 minutes futzing around with my Java settings trying to figure out why the application wouldn't run when I double clicked on it. Turns out eclipse/Eclipse.app/Contents/MacOS/eclipse didn't actually have execute permissions set. By developers, for developers.

  20. dcolumbus Says:

    ROFL! This is the best article I've read in a while… I couldn't agree more. And thanks for helping me out. Have you had any luck installing support for jQuery?

  21. web development Says:

    Thanks for the good and hardworking blog. I have noticed that on OS X dropping a file from, say, Finder onto the Studio dock icon will look like its launching another instance of Studio while opening the dropped file in the already open instance, but I don't think the second instance actually opens.

  22. Thai Says:

    OMG – i was thinking of total frustration right before I landed on this page….im still frustrated I can't get things to install right…but i got a nice laugh though…thanks…

  23. Ricardo Graça Says:

    I was interested in trying out eclipse, since it's a very popular IDE, but I got tired just reading your post. I guess I'll keep using more easy to use IDEs. I'm also glad to find that it's not just me that finds the whole eclipse website and program structure extremely confusing. What the hell are they thinking?

  24. Intelisystem Says:

    Hi,
    i found your blog through googling. your blog gives very good knowledge about importance of Eclipse for Web Development. This blog are very well for web developer.

    Thank you,

  25. Eclipse Numbnut Says:

    You're right Eclipse is for Numbnuts…. Those guys at Google and IBM really are stupid, using Eclipse to dominate the world….

  26. edelyn cabalhin Says:

    Nice for an open source application. I tried using it with linux server, it's quite impressive at least you will save of your time for it immediately provide you that necessary informatin you're looking for.

  27. kontur Says:

    Haha, great write up!
    From a designer's point of view the whole presentation Eclipse gives of itself is exactly as described – confusing, technical, overdetailed, obscure. This blog entry was #1 hit for "using eclipse for web development" – and I searched after having experience resembling yours in all too many ways.

  28. eclipse | Web Code Says:

    [...] debate about eclipse: http://coreygilmore.com/blog/2008/12/01/using-eclipse-for-web-development/ more debate [...]

Leave a Reply


© 2007-2013, Corey Gilmore | Posts RSS Feed | Comments RSS Feed | Contact

 

The views expressed on these pages are mine alone and not those of any past or present employer. All information presented on this site was obtained lawfully and not through disclosure under the terms of an NDA.

‹