cf.Objective() Session - Setting Up a Local Development Environment by Kurt Wiersma
Posted on May 02, 2008
This is the first in a series of posts covering the sessions I am attending at this year's cf.Objective() conference. The first is by Kurt Wiersma covering best practices on setting up a local development environment.Consider your local environment a "mini production server". Helps to get people familiar with the environment and settings.
Since your settings mimic production, keep notes on settings changes that may be needed when deploying to production.
Requirements:
- A web server with virtual hosts
- one or more ColdFusion instances
- local db connection or connection to development server
- local checkout from source code control
- development tools
Kurt recommends not using CF's built-in web server since the idea is to duplicate production. He recommends Apache but you can use IIS. CF8 can run on any version of Apache. Steps for setting up a virtual host in Apache:
- configure your virtual host in conf/httpd.conf (apache needs to be configured for virtual hosts; you can add alias to CFIDE)
- Update your hosts with new virtual domain (mapped to 127.0.0.1)
- Restart Apache
Kurt suggests using multi-instance of ColdFusion locally, which is available with developer's edition (in production this would require enterprise). You can set up one instance per client or one instance per environment. To connect Apache you need to know the proxy port that the instance of ColdFusion runs on, though much of this is handled by the ColdFusion installer. Understanding the ports of each ColdFusion instance is the most complicated part of managing this.
Use either a local database or a shared one. You can keep local databases in sync across developers using DDLUtils which plugs into ANT. Good database tools include Aqua Data Studio and SQL Explorer.
When using source code control, use branches to split out your development code from the trunk which should match production. You should consider installing Trac, Skweegee or ViewCVS.
Kurt offers some tips such as using an issue tracker, keeping directory structures clean, not relying on hardcoded paths and using tools to automate repetitive tasks.
Comments
There are currently no comments for this entry...be the first!