Development Setup

In the old days, the idea of setting up an “environment” scared developers because it meant asking IT system administrators to create a new server so the developers could work on it without affecting the live site. Nowadays, developers can use their own machines to develop and test in real-time without any fear of affecting the production application.

Think of coding environments as different geographic areas of the application. They contain the same code base, but the underlining data (from a database) is static. The goal of separating these environments is to allow code development and testing to take place without affecting your live version of the site. Table 3-1 compares the pros and cons of segregating your environments.

Table 3-1 Pros and Con for Segregated Environments

Pros

Cons

Allows development in a secure area without fear of breaking existing features

Multiple code repositories require tools to keep each environment in sync

Local development is an easy and cheap solution to get started

Local machines have a hard time simulating scale or “live” experience

Wide range of free tools to help you get started quickly

When dealing with two different environments, it’s essential to make sure code is up to date. Nothing is worse than having more than one environment out of sync with the rest of the codebase. You can use tools to help manage iterations of code, called repositories. The most popular repositories are SVN, or Subversion, ...

Get Smashing Mobile Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.