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.





http://help.eclipse.org/stable/index.jsp?topic=/or...
hth,
j
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.
@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
...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
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.
Just a quick introduction (with a pretty picture):
http://blog.daemon.com.au/go/blog-post/decentralis...
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
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
@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?
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.
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.
Hope this helps.
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.
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
http://www.eclipse.org/dsdp/tm/
p.s. I think I met you one night at the Barking Clam during jQuery week or something.
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.
Thanks for the heads up on the Target Management plugin, I'm going to check that out.
s