8.2. Setting up the Development Environment

Before you start writing any networked programs, you should make sure that you have a working network. Since development requires lots of trial and error, you should be able to update code on your server, as well as on your phone, without too many steps.

In the following sections, we show how to set up a test environment in four different settings:

  • Environment A: a WiFi-enabled phone, a local WiFi network and a PC connected to it; the PC works as a test server and no Internet access is needed.

  • Environment B: a phone with Internet access through a GSM or 3G data plan; the PC works as a test server and you can connect to it from the Internet, possibly through a firewall.

  • Environment C: a phone with Internet access, either through a GSM or 3G data plan or a WiFi network; you need shell (SSH) access to an external test server.

  • Environment D: a phone with Internet access, either through a GSM or 3G data plan or a WiFi network; you need access to an external web server which is used for testing.

If you have already developed server-side code for other purposes, you can probably use your existing environment for mobile development as well. If you do not have previous experience in this area, environment A is likely to be the easiest option to start with.

8.2.1. Preliminaries

It is useful to know what we are aiming to achieve. Here is a quick reminder of how the Internet works. Each computer or host has an IP address, which is of the form 123.45.54.56. ...

Get Mobile Python: Rapid Prototyping of Applications on the Mobile Platform 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.