Eclipse/CFEclipse: I just don't get the development style.

I've been a long-time user of Homesite/CF Studio. As much as some people may put it down as old or not the "in" thing, it's done a great job of getting me through my projects.

As time's rolled on though, I've come to realize some of it's shortcomings, especially in terms of team development, and with my development efforts focusing more and more on the client-side (ie: JavaScript, Ajax, Ext, jQuery, etc) I've really have wanted to embrace Eclipse and standardize on it for my main IDE. I've had it installed it on my PC for awhile and have included both CFEclipse and Aptana Studio Pro so the desire is definitely there. But I've hit a mental block that I've not been able to get past. I'm hoping someone can walk me through it so I can use the Eclipse platform and take it to the next level.

Basically, I just don't get the Eclipse development style. Any solo development I do is usually on a remote development machine and in CF Studio, I just setup an FTP entry and modify the files as necessary. Once my changes are done, I push them to production and that's that. When I've worked in a team environment, I've always used VSS for source control as Subversion just doesn't seem to be popular with the client's I've worked with. I think that's how most CF developers have worked at some point.

With Eclipse it seems that the norm is to have a project based on locally available files (ie: sitting on your dev PC's hard drive). This is where I get kind of stuck. If the files are sitting in a workspace on your dev PC, how do you go about testing your changes?

  • Does that mean you need to have CF running on your PC?
  • If so, what about if you're working on multiple apps? WinXP doesn't allow for multiple IPs in it so how do you configure your PC to test your apps locally?
  • What about any third party components that you're app might depend on (payment processors, image manipulation, etc)? Do I now have to install these locally as well?
  • What about sync'ing with a staging or prod server? How does that happen? Do I now need to FTP stuff from my local box?

Also, if I open a CFM file while in an Aptana perspective, how does that affect things such as tag insight or autocomplete or the perspective settings? (or does it not affect it for that matter).

Now, please understand that I'm not putting Eclipse down in anyway. I actually think it has some really exciting capabilities and Aptana Studio truly is the bees knees when it comes to JavaScript development. What's killing me is the development methodology. It's very different from what I've been accustomed to and I know that I need to grasp that to fully understand Eclipse's power. That's why I'm asking for help.

Mind you, I'm not trying to use Eclipse because its the cool thing to do. I see some very clear benefits to it and as a professional developer, I want the best tools possible (hence why I purchased Apatana Studio Pro). So if I could get links, comments, emails or whatever with some guidance and wisdom, I would be greatly appreciative.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Jim's Gravatar I'm not too sure what your dev/staging environment is like, but it sounds like a lot your problems are stemming from the fact that you're not linking to remote folders. Are you able to map network a network drive to you local box? If so, then just create a linked resource:

http://help.eclipse.org/stable/index.jsp?topic=/or...

hth,

j
# Posted By Jim | 2/28/08 3:33 PM
James's Gravatar I usually recommend having a local development site. For my dev environment, i have Apache running as the webserver for CF. I create Virtual directories in apache to link to my different project and just map the host name in my windows hosts file to always go to 127.0.0.1 so apache can determine which project to serve.

We use SVN and I'm not at all familiar with VSS. For us, when we complete a task locally, we just commit it to the SVN repository, and run an SVN update on the staging and/or production server as needed. That way we don't need FTP to push files to production.

As far as I know, tag insight doesn't work for CF files in Aptana. I don't have Aptana on my machine anymore, as I didn't use it that much anyway.

Anyway, that's my setup. It's not for everyone, but it might give you some ideas.
# Posted By James | 2/28/08 4:13 PM
Michael White's Gravatar I ain't no expert but here's how I do it. I have subversion intalled on my local computer along with eclipse 3.31. I use the subversive plugins which seem a little better than subclipse. I have my repositories on my local file system and I use the subversive plug-in to Check out my code into an eclipse project in a separate folder structure from my working folder. I just use mapped drives and use the OS file copy to copy my checked out code to my test environment which is a separate Windows 2003 web server running coldfusion 8. It seems to me that most developers seem to run a local web server/database/coldfusion instance but I use a separate server.
# Posted By Michael White | 2/28/08 4:14 PM
Scott Bennett's Gravatar In my opinion, remote development is the real week area with eclipse. At my day job, the development servers are on the LAN so I can map a drive and use Eclipse easily. But any consulting work I do is mostly via RDS and I then I can no longer use the cool "project" features that really make Eclipse great. The RDS plugin that Adobe provided was kind of strange to me and I like HomeSite+'s implementation of RDS much better. I found myself switching between the two when I needed to do certain things, and then got tired of that and just reverted to using all HomeSite+ again. If there was a way for me to map a project to a folder on an RDS server on the Eclipse Navigator tab, then I think I would really like it.
# Posted By Scott Bennett | 2/28/08 5:05 PM
Rey Bango's Gravatar @James: Thanks for the feedback. How do you handle 3rd party components that might need to be used for a project? Do you install those locally as well?

@Michael: Thanks. One thing that confused me was where you checked out the files to. Is your Eclipse project residing on your Win2k3 server or locally? When you check out a file, do you manually copy it to Win2k3 or does the subversive plug-in do that?

@Scott: Yeah. I'm with you on jumping back and forth. That's the pain I'm having. I don't want to jump back and forth. :P
# Posted By Rey Bango | 2/28/08 5:18 PM
Michael White's Gravatar After I have all my SVN repositories registered in the subversion plugin, I do a "Check Out As" from the repository and change the default location to a subfolder on my local computer c:\SVNWork, it creates the subfolder based on the project name I gave it and I can manage all of the subversion updates/commits, etc. from within eclipse. That works fine for a single-developer situation but for multi-developer, you'd probably put your repository on an apache webserver somewhere. Checking out the file makes a copy of all the repository files into your working directory. Then you have to manually copy the updated files up to the development environment (or ftp I suppose)
# Posted By Michael White | 2/28/08 5:54 PM
Nolan Erck's Gravatar http://www.southofshasta.com/blog/index.cfm/2008/1...

...there's a link to a post on my blog that talked briefly about some changes I made to my development environment, for similar reasons. Be sure to check the link to Boyzoid's site, as that covers things in more detail. But in short...

"Does that mean you need to have CF running on your PC?"

Yes, I am running ColdFusion Developer Edition and Apache on my local machine.

"If so, what about if you're working on multiple apps? WinXP doesn't allow for multiple IPs in it so how do you configure your PC to test your apps locally?"

Running Apache instead of IIS solved this problem for me. I didn't have any apps that HAD to run on IIS (though your mileage may vary).

"What about any third party components that you're app might depend on (payment processors, image manipulation, etc)? Do I now have to install these locally as well?"

...perhaps you could wrap these components in a Service layer? Instead of calling, say, the FedEx API directly, call your FedExService.cfc...and make this CFC "smart enough" to know "if i'm in production, actually call the FedEx stuff, but if I'm running on 127.0.0.1 (your dev box), then just return a valid, but FAKE value, so the rest of the code runs properly.

"What about sync'ing with a staging or prod server? How does that happen? Do I now need to FTP stuff from my local box?"

...ya got me there. I switched from SourceSafe to Subversion a few months ago; between that and Dreamweaver's built-in "FTP this Site to the Production Server" butt, I don't worry about syncing much any more. I get the latest update from SVN, and when my changes are ready (and tested), I click "publish" in Dreamweaver, and it goes up.

I am a former Homesite guy as well; a year-ish ago I had to start doing more work on multiple sites at once, and the UI in Dreamweaver 8 just made more sense for me, and made the "flip flopping" between sites much easier (at least for the way my brain works). I've tried Eclipse a handful of times, but I've yet to be completely "sold" on it.

Hopefully SOMEthing in that long ramble was helpful to you. :)

-Nolan
# Posted By Nolan Erck | 2/28/08 6:00 PM
Scott Bennett's Gravatar At my day job environment, I have a Win2K3 development server that in on the LAN. I mapped a network drive on my computer to the hard drive on the development server. My eclipse project files reside in the directories on the development servers drive, but the mapped drive on my PC allows eclipse to treat that folder like a local system drive so it works great with the eclipse project functionality, which all the coolest features of eclipse are dependent on.

I really like the eclipse development style of using projects instead of having to constantly drill down to my website root folders, and I love a lot of the features that rely on the project functionality. The current RDS plug in works, but it doesn't gel with the coding style that eclipse is geared for. Once I can map a projects directory to RDS locations and FTP locations as well as local directories, that is when I'll start using it full time for all my development.
# Posted By Scott Bennett | 2/28/08 6:24 PM
pan69's Gravatar You need to learn about the concept of 'Decentralized Development'. This means that every developer 'develops' on his/her own local (sandboxed) workstation. Yes, you run a local web-server (including your server scripting environment, PHP, CF etc.) all on your local machine. When your code works, you commit it back to the VC repository. Decentralized development might be a bit of a learning curve but its the only way to work on teams (also teams of one!) to manage your code, changes and deployment etc...

Just a quick introduction (with a pretty picture):

http://blog.daemon.com.au/go/blog-post/decentralis...
# Posted By pan69 | 2/28/08 6:56 PM
Mike Henke's Gravatar You could also develop locally with a project representing a copy of the remote web server files, then on save, have an ant ftp any changes to your proper remote web server location. Setup - Within a project's properties is one called builders, you would link the ant through it. Each project's ant would be slightly different for the ftp configuration.
# Posted By Mike Henke | 2/28/08 7:18 PM
Mike Henke's Gravatar same idea i mentioned before but use Aptana's FTP and Sync manage:r make change, save then ftp. the antbuild.xml would less a manual step. You have built in Eclipse local history also for any changes.
# Posted By Mike Henke | 2/28/08 7:26 PM
James's Gravatar @Rey We don't use too many 3rd party plugins in our dev shop...but the couple that we do use, we do something similar to what Nolan was saying, customize the code to determine if you're running on production or locally.

using SVN has made code releases and bug fixes to production incredibly easy. Each release we tag and then create 2 branches: Fixes branch and Dev branch. All bug fixes go into the Fixes branch (which is what production runs on), and new features for the next release goes into the Dev branch. When it comes time to release the Dev into production, we merge the Fixes branch into the Dev branch, tag the release, do a SVN Switch in production to production to get on the new branch, and repeat. We have TortoiseSVN installed on our Production servers, so releasing bug fixes is as simple as right clicking the folder and doing a SVN Update.

I'm a firm believer in Decentralized Development that pan69 described. We never edit anything on the production server anymore. it certainly helps when you're working in a multi-developer environment, but is a good practice to get into regardless.

I used to be a die-hard dreamweaver user. Now that I switched to CFEclipse a few years ago, I just can't go back. I sometimes have to do some things on my boss's computer (who uses DW) and i just find that i can't do things nearly as quickly. The one feature that CFEclipse has that makes my life incredibly easy is the Open Resource (ctrl-shift-R in my settings). Ctrl-Shift-R and start typing the file name, and it starts displaying a list of all files that match what you're typing.

Also, I love that CFEclipse is project-based, and that you can close a project you're not working on by right clicking on it and saying "Close Project." I usually have about 10-15 projects, but am only working on 2-3 at any given time. Keeps me organized ;-)

whew, ok. that might've been a little more information than you needed. :-D
# Posted By James | 2/28/08 8:41 PM
Ben D's Gravatar At work I have mapped folders to our development folders and use VSS. That works well enough but it is not without some drawbacks. I use Eclipse there. There is no issue with running Aptana at the same time, since your CFM files will trigger the CFEclipse perspective. The main drawback is getting the aptana goodness in your CFM files. But working with standalone JS and CSS files it is not a problem.

At home I'm set up differently. Its a single machine running vista (so the single website in IIS is not a problem). I use Subversion (and take it with someone who has worked with both - SVN kicks VSS butt) and I simulate remote development and qa machines by having multiple CF instances and IIS websites. I configure ANT to automatically copy my local Eclipse workspace CF files to the development server (COPY ant task), run my unit tests. I manually trigger another ANT task torollout to the (local) QA environment (another Ant Copy, which is more for extensive testing and testing the deployment method itself). Then for the deployment to production I again use ANT to deploy to the remote site using FTP.

I'm in the middle of full integrating SVN into my ANT tasks - Right now I use Subclipse for the Trunk (Development) but I'll automate the creation of the SVN release branches. In the interim I'm using ANT to automatically take a ZIP snapshot of production prior to changing it.

As someone who has struggled in a VSS shared development environment, using Eclipse, SVN and ANT with local development seems to be working very well indeed. In fact I have a minor geek-gasm everytime I launch or automatically trigger an ANT task - it is just so cool.

The next professional situation I have where I have a hand in setting up a development methodology I'm definately going down that route.

Cheers
# Posted By Ben D | 2/28/08 9:28 PM
Rey Bango's Gravatar @Nolan: Great explanation!

@Scott: I like that mapped drive idea. I have a server sitting here as well so I think I'm going to do what you mentioned. My thing is to avoid running CF on my own box so if I can do it on a local server via mapped drives, that's a real win.

@pan69: Apart from the link you included, do you know of any other resources for "Decentralized Development"? I'll definitely Google it but if u know of some good ones, that would be cool.

@Mike Henke: Thanks for the tip on Aptana's Sync Mgr. Gotta check it out along with Ant. ANy good Ant links?

@James: Yeah I really have to start using SVN. I can see the benefits and while VSS (Visual Source Safe) was okay, many have told me that SVN blows it away.

@Ben D: It looks like you got a great process down. Would you mind sharing those Ant scripts so I can see how they work?
# Posted By Rey Bango | 2/28/08 11:35 PM
Rey Bango's Gravatar OKay, so it sounds like the majority of those replying never just update files remotely via FTP. It seems that the common thing is to setup projects and use some sort of repo. What about the instances where you just need to make that 1 small update. Isn't using a repo in a solo scenario overkill? Just trying to flesh this out more.
# Posted By Rey Bango | 2/28/08 11:38 PM
Peter Tilbrook's Gravatar I have to agree. I have been a fan of Dreamweaver since MX (2004?) but meh before then. Am very happy with Dreamweaver CS3 - a few issues but generally a great IDE. Kudos to Adobe for a really good IDE for CF development. And of course Macromedia for getting it this far along!
# Posted By Peter Tilbrook | 2/29/08 1:04 AM
Mike Rankin's Gravatar I really like DW CS3 for some of the quick and dirty css oriented mockups you can rip out, but I honestly think they would be better off getting rid of the silly checkin/checkout options they have built in. I think it's worse than nothing at all since it gives a team a false sense of security. But without the ability to do rollbacks or examine previous versions (which are not maintained), it's utility is marginal at best. Note that there is a subversion extension available for dreamweaver that works with tortisesvn that works great if you have svn in place. As for doing ftp tasks in any of the editors, nothing really beats a dedicated client in my opinion. Building Ant ftp tasks may seem like the way to go, but compared to something like filezilla, they are pitifully slow. I have to admit, though, that I wouldn't mind being able to just pop open a file from the file system in eclipse and making a quick edit or two without regard to the project process. I usually wind up just using textedit or notpad for those now.
# Posted By Mike Rankin | 2/29/08 1:59 AM
Doug Cain's Gravatar At a slight tangent, I moved to Eclipse a couple of years ago and have always used a decentralised model for development (saves so much frustration of who did what to break this or that). Throw in SVN and life is much easier. Oh don't forget Eclipse also has it's own version control known as local history which has been a life saver between check ins of code.

Ok on to the slight tangent, I have also been using trac for bug tracking and was annoyed at having to remember to always switch to a web browser to update it. A couple of months ago I updated my trac server to 10.x and added mylyn to eclipse. (http://www.eclipse.org/mylyn/)

Wow, it integrates directly into the IDE and gives you direct access to all the items in trac (which is also directly hooked into my subversion server). Not only this it works offline and syncs with trac when on line. It also notices what your doing on a per trac issue basis and allows you to focus the IDE on only the files your editing. It's difficult to explain how cool and useful this is until you see it and go wow. It also has the beginnings of time management in it but I haven't explored that yet.

So with a full stack of local CF server, local web server, cfEclipse, a remote SVN and remote trac server I have complete control of all aspects of a project right in Eclipse. I can work on and off line, and distributed development is much easier to manage. Oh and I can be on my mac, Pc or whatever.

Builds to staging and production are done with SVN so everything is controlled.

Hope that helps paint a bit of a fuller picture of one choice of environment.
# Posted By Doug Cain | 2/29/08 4:50 AM
# Posted By Mike Henke | 2/29/08 8:10 AM
Andy Matthews's Gravatar Rey...

I bought a Mac Mini at the beginning of the year simply as a means to test websites in Safari and FF for the Mac. Then about 4 months ago I wanted to started condensing my office equipment. I had my primary workstation, the Mini, and I had a file server. What I did was to dump all of my client files, web files, photos, and music onto the Mini. I installed CF and MAMP (Mac, Apache, MySQL, PHP; www.mamp.info) so that I could use the Mini as a combination file and web server.

Now, that prevents me from having to run all of those apps on my workstation, freeing up valuable RAM. Then all I do is to create some host file entries on my PC pointing to the Mini and presto. It works beautifully. I even took it a step further and created virtualHost entries on the Mac corresponding to specific sites I'm developing. local.xyzsite.com now points to a specific subdirectory in my webroot on the Mini. That lets me treat that folder as root as far as it's concerned.

Lastly this lets me have full control over the source files, and I have a backup running to an external hard drive on the Mini as well.
# Posted By Andy Matthews | 2/29/08 9:18 AM
Darren Walker's Gravatar Hi - you can use the free software here http://www.jetstat.com/iisadmin to create multiple websites under IIS with xp

Hope this helps.
# Posted By Darren Walker | 2/29/08 11:12 AM
Steve 'Cutter' Blades's Gravatar At work I use a local multi-instance ColdFusion server on top of Apache. I do all of my development, and initial testing, on my local system, using Subversion for version control (our team uses a remote Subversion system, with user level access). Once initial, local testing is completed, all code is committed to the repository, and an ANT build publishes the latest Subversion revision to our staging server for final functional and load testing. Once a build is finalized, we 'tag' it in Subversion, use ANT to export the build, zip it, and schedule deployment to our production environment (usually around 2AM).

At home, my computer is also my wife's and daughter's. I do have a home server, which runs a multi-instance CF installation on top of Apache. My Eclipse projects attach to my code through UNC pathing to the server. I do all testing on the 'remote' server, still committing to Subversion (which is backed up regularly). I run my deployment processes in much the same manner as those outlined above.
# Posted By Steve 'Cutter' Blades | 3/2/08 10:55 AM
Chris Johnson's Gravatar For doing development directly on a remote server, you should check out the Target Management plugin. It can connect via a selection of protocols (I use ssh), and provides a navigator for browsing and editing files. Saving automatically updates the file on the remote server.

This is preferable to mounting a drive to the remote server, as somebody suggested above. Eclipse by default assumes the files you are working with are in the local workstation's hard drive, and so a lot of filesystem handshaking goes on in the background. If your connection is dicey, this can seriously slow you down with the remote mount scheme.

Also, about this: "If so, what about if you're working on multiple apps? WinXP doesn't allow for multiple IPs in it so how do you configure your PC to test your apps locally?"

That's not technically true. 127.0.0.2 is a localhost ip, same as 127.0.0.1. By editing the hosts file (I think it's system32/drivers/etc/hosts but look it up), you can assign names to those ips:

127.0.0.2 foo.localhost
127.0.0.3 bar.localhost
# Posted By Chris Johnson | 4/3/08 4:52 PM
Chris Johnson's Gravatar Sorry, forgot to add the Target Management URL:

http://www.eclipse.org/dsdp/tm/

p.s. I think I met you one night at the Barking Clam during jQuery week or something.
# Posted By Chris Johnson | 4/3/08 4:55 PM
Ben Davies's Gravatar I use Eclipse at work where we have a mapped drive to the source code on a shared development server. Its definitely not ideal but we have never had the opportunity to change the approach. Eclipse does struggle now and then but overall it works OK with the arrangement. Still, there are frequent times when you find yourself struggling against Eclipse's internal nature and its basic assumptions to make this work.

For anyone who is forced into this arrangement, I recommend leaving the project root folder on the local drive, so the .project file and settings folders don't get created amongst your source. Instead, create a sub-folder under the project folder and on the New Folder dialog box pick the "Advanced >> Link to Folder in File System" checkbox and specify your remote drive. This will keep your Eclipse/developer specific settings separate and out of the way of the other developers.

At home I do my development directly under the project (not under the webroot), and use ANT to add it to SVN appropriately and copy it to the development, QA and Production site - all still on the one machine. That works really well, and it no longer feeling like I'm fighting to make Eclipse behave in a way it is not meant to.
# Posted By Ben Davies | 4/4/08 7:21 AM
Ben Davies's Gravatar Whoops - I forgot I had already posted on the blog. Sorry for the redundant comments!
# Posted By Ben Davies | 4/4/08 7:24 AM
Steve 'Cutter' Blades's Gravatar @Chris - It's not that XP doesn't handle multiple domains, but rather IIS on XP does not support running them concurrently. This is why Apache is a smart choice in local development. And yes, hosts file changes are essential, in conjunction with the Apache config.

Thanks for the heads up on the Target Management plugin, I'm going to check that out.
# Posted By Steve 'Cutter' Blades | 4/4/08 9:55 AM
switchy's Gravatar great points all around. one suggestion I have is to summarize all this stuff and get in touch with adobe. They are bringing back a standardized IDE for ColdFusion development in version 9. It will be based off of eclipse, but completely built specifically for CF. Some cool things are proposed, like views for administration, server status, etc. in line debugging, right in your eclipse views. I hate using the cfeclipse ftp because it takes sooo long to parse through a remote directory, especially if there are thousands of files. Anyway, rock on.

s
# Posted By switchy | 4/25/08 4:31 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.