Appendix A. Setting up your environment

You have a few software options when developing web applications. Whether you prefer a visual environment or the command line, the ArcGIS API for JavaScript requires a local server. My three recommendations are outlined in this appendix.

A.1. Visual Studio Express for Web

Web development is easiest with Microsoft Visual Studio Express for Web (www.microsoft.com/visualstudio/eng/downloads#d-express-web). This software comes with a local web server to build your applications. Visual Studio Express is probably the easiest way to get started, as it is both an editing environment and local server in one.

A.2. XAMPP

If you prefer to work in a text editor, one of my favorite lightweight local servers is Apache, which can be installed with XAMPP, which stands for Cross-platform Apache, MySQL, PHP, and Perl (www.apachefriends.org/en/xampp.html). It runs a local instance of Apache HTTP web server on your machine and is easy to work with.

Tip

Copy your files to the xampphtdocs folder to view them in the browser. XAMPP will serve all files from this folder.

A.3. Python

Another option for running a local web server is to use Python (www.python.org). I recommend downloading Python v2.7.

In your favorite command-line tool, navigate to the folder containing your web files and run this command:

python –m SimpleHTTPServer

This option doesn’t provide the fastest server, but it’s suitable for running most examples in the book, except when a proxy is required. In that case, I recommend using one of the other two options.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.204