Ask a Jedi: Setting up a home environment

Fernando had a large set of questions, all related to how best to set up a home environment. Let me start with his questions and then I'll respond.

I would like to have a sense of what is the community using as far as tools and technologies at home. I'm thinking of using CF7 developer edition and IIS ( my PC is a 2000 pro). Also JRUN, MySql as a database, and Eclipse with CFEclipse of course.

I don't know what to use as far as an admin tool for MySQL.

On the side I want to install PHP as well, but that's for different reasons.

Would you let us know what do you use at home and pass this on your blog so we could know what other developers have setup at their local environments?

Fernando follow up this question with another one concerning source control. He said he is currently using CVS but heard SVN is better.

So - I have mentioned it before, but the absolute best guide in the world for setting up a dev environment is the ACME Guide by Stephen Collins. I can't recommend it enough. It will get you start with ColdFusion, Apache, Eclipse, and MySQL. I believe he also briefly touches on Subversion. And yes, I do recommend it over CVS. I also recommend Tortoise SVN for a PC SVN client. I have yet to find a SVN client for the Mac. (Of course, I haven't looked yet.)

So in general, get the ACME Guide and start with that. You will notice that it uses Apache instead of IIS, which I think is nicer for developers. At least until Microsoft decides to allow the non-Server OS the ability to use virtual hosts. (Without hacks I mean.) I almost always recommend you keep your dev environment exactly the same as your live environment, but I don't follow that advice myself. My local environment uses Apache while my live box (for this blog, CFLib, etc) uses IIS.

Comments

My home dev environment:

CF7 Dev
PHP

Apache (serving PHP and CF7)

MySQL (mainly for PHP work but also configured as CF7 datasource)
MS SQL Server Express (free dev edition of SQL Server)

If you have PHP up and running then there's a good free web-based, PHP-driven MySQL admin tool called PHPMyAdmin (http://www.phpmyadmin.net).

I'll also second Ray's recommendation for ACME Guide - it's invaluable.
# Posted By Ed | 6/26/06 9:25 AM
I try to run my development environment as close as possible to the production environments I will be dealing with. As an independent consultant I run into clients with all kinds of different production environments. This used to be problematic for me, but not anymore.

What I have done is use one beefy server, and I run multiple virtual servers on top of it.

The box is a dual Xeon 2.8GHz Nocona server ( This is a 64 bit machine, but I am currently running a 32 bit OS ) with 4GB ram.

My host OS is Windows XP Professional 32 bit.

My virtual servers are running in VMWare workstation 5. ( MS Virtual Server would do just as well )

Generally I have running:
App Server: Windows 2003 server/IIS6/CFMX 7
DB Server: Windows 2003 server/SQL Server 2000

When I need to develop for a client running on a different configuration ( LAMP for example ) I simply shut down the above servers, and fire up a virtual machines that match the client configuration!

I have been running this setup for about a year now, and it has performed flawlessly!


For those of you unfamiliar with virtual servers, these act exactly the same as seperate physical machines, each with their own MAC address, set of IP address, disk drives etc.

Here are some of the advantages I get with this setup:

1. I have clean copies of each virtual server. When I want to play around with a new technology, I just install a new virtual server, play around, and if I decide I no longer need it POOF it's gone without affecting my core dev environment. Just last week I set up a new server in order to check out Ruby On Rails. It took me less than 10 minutes to set up a new App server to run Ruby on Rails.

2. I can easily log into and manage each server from my workstation either through remote desktop or VMWare.

3. When I travel, I just copy my virtual servers to my laptop, and I can take my entire dev environment with me!

4. Backup up my entire dev environment consists of copying 3 directories to a USB drive. Even if my main box craps out, I can be back up and running on my laptop in well under an hour.

5. When I don't need to run my virtual servers, I just turn them off, and have an incredibly powerful machine to do things like video editing!

I highly recommend this setup for any serious development work.

By the way.. VMWare Server is now available free!

Gus
# Posted By Gus | 6/26/06 9:33 AM
Wow! Gus, you have a killer dev environment!!

I, too, deviate from the dev-should-match-production rule, but I don't have the resources to get all the cool software that my production environments run. I use Stephen's ACME solution on both OS X and Windows, but since we use CVS, I use Tortoise CVS to access the repository. I also have VPN access to the SQL Servers, so I prefer to develop against the University's dev databases when I'm hooked in. Otherwise, I stick to MySQL. I also run ActivePython from ActiveState.com because Python is cool :)
# Posted By Edward T | 6/26/06 10:06 AM
For Tortoise-esqe integration on OS X see: http://scplugin.tigris.org/
# Posted By Nathan D | 6/26/06 10:25 AM
Subversion: That's the one thing I wish ACME expanded on...I've seen commercial services offer the server side, but i'd like to be able to (pain-free) install Subversion as part of this whole platform -- even better, if I could install it all on a memory stick that i could carry with me as an uber-developement platform -- for those places that have locked down desktops...
# Posted By Brian | 6/26/06 11:25 AM
For Eclipse, there's Subclipse, of course, and Subversive.

For OSX stand-alone clients, there's:

SvnX
ZigVersion

I tried iSVN, but I was unable to get it to accept the path to my installed subversion files.

You can get these, as well as other clients, at <http://www.macupdate.com/search.php?keywords=subve...;.
# Posted By Lola Lee Beno | 6/26/06 11:27 AM
There seems to be a short supply on JRun 4 and CF MX support out there. Perhaps I have not been looking in the right places for Multi-Server configurations. I have been having some trouble getting CF MX 7 to work properly with JRun 4. I am sure that I will the right path.
# Posted By Teddy R Payne | 6/26/06 2:16 PM
I actaully have the following on my dev machine, whcih is a laptop.

WinXP Pro
ColdFusion MX 7
Apache
Subversion
MySQL 5
SQL Server 2000
SQl Server 2005

I use Eclipse for me IDE.
# Posted By Scott Stroz | 6/26/06 2:34 PM
Hi Brian.
There's *nothing* to setting up SubVersion. Download the installer:
http://subversion.tigris.org/servlets/ProjectDocum...

Run it. That's it: SVN is now installed. There's no trick to it or configuration necessary.
(I see no reason why this could not be to a memory stick, too. That's a good idea, actually).

Read this:
http://svnbook.red-bean.com/nightly/en/svn-book.ht...

Set up your repository (it's ONE command-line instruction).

Read this:
http://svnbook.red-bean.com/nightly/en/svn-book.ht...

I recommend using the trunk / branches / tags model it suggests.

Install TortoiseSVN:
http://tortoisesvn.sourceforge.net/downloads

Right click on a (new) directory, and use TortoiseSVN's repo browser to point at the URI of your repository and create the trunk / branches / tags structure as mentioned in the docs above.

Next tell select an EMPTY directory, and tell TortoiseSVN to do a checkout, pointing it to the URI of the trunk (so something like file:///c:/path/to/repository/trunk). This will install all the files SVN needs to source control that directory.

That's it. You can not start creating source files, committing them, etc.

If you've already got - say - a website you want to add to source control, still do the check out in the empty dir, then copy all your existing files into it, and then commit them. They're now in source control. Easy.

If you then want to move the source-controlled files elsewhere, simply repeat the checkout procedure in another empty dir, and all the source controlled files will be deployed for you.

As a rule of thumb, I never actively develop in the trunk, instead working in a branch, only merging with the trunk when I'm done (at which point I delete the branch), so the trunk only ever had WORKING code in it. And every time I release my app, I create a tag.

It'd be worth while reading the whole SVN book, and the --help on the SVN commandline tools. For example, I find merging branches a lot easier to get my brain around using the command-line than I do Tortoise. But maybe I'm just a bit thick.

HTH.

--
Adam
# Posted By Adam Cameron | 6/26/06 4:09 PM
Oops.

"That's it. You can not start creating source files..." should read "That's it. You can NOW start creating source files..."

--
Adam
# Posted By Adam Cameron | 6/26/06 4:11 PM
Amazing, I love this community. I'm the Fernando that send the email to Ray.

I was thinking about the Source Control system and even though I could go with CVS or SVN on my laptop I realized that it would be useless if somebody steals my laptop or if the waters from the Potomac decide to come knocking on my door ( it's raining heavily in DC). So I started wondering if it wasn't a better idea to have a CVS/SVN server hosted somewhere on the net. Something cheap of course.
Anybody knows of a good CVS/SVN hosting company out there?

BTW the ACME guide looks great, definitely a great deal of good information Thanks Ray and all.

--
Fernando Lopez
# Posted By Fernando | 6/27/06 8:19 AM
I use Subversion with Apache Server and use Apache authentication so I can access my *central* Subversion repository from any where (in house net work or from outside network/vpn)... It's really fast, much much faster then SourceSafe/vpn...
# Posted By Tuyen | 6/27/06 12:40 PM