O'Reilly logo

Smashing Mobile Web Development by Greg Avola

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required