Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Set up a Development Environment

Web server

If developing a traditional web application that is to be accessed via the browser, the recommended approach is to deploy it to a web server and access it via http:// (or https://) rather than file://. Web server software is available free of charge for all operating systems. For Windows, IIS is recommended. On Mac OS and Linux, Apache is a popular option but any web server will do.

As a side note, a web server is not necessary when the ArcGIS API for JavaScript is used in embedded scenarios, for example Microsoft PowerBI, Windows Store app, or Adobe Creative Cloud.

Writing code

JavaScript developers have a wide-range of development environment options. Some individuals prefer text editors that have many keyboard shortcuts for traversing through words, sentences, paragraphs, etc. Others are partial to more robust Integrated Development Environments (IDE) that often have many more tools related to code refactoring, syntax checking, code completion, code formatting, and source code management. Whichever editor you use, we recommend validating your code throughout your development process.

Code validation

The JavaScript team maintains a collection of useful resources for developers using the ArcGIS API for JavaScript. Two popular options for inspecting your source code are JSLint and JSHint. Both are code quality tools that scan your code to identify potential issues such as missing semicolons, trailing commas, implied globals, unreachable code and more. Using a linter can save you debugging time by quickly identifying issues that are easily overlooked.

Code assist and IDE configurations

Many newer IDEs (e.g. Visual Studio Code) support syntax checking with JSHint and code hinting when providing a TypeScript definition file. The JavaScript team maintains a

Microsoft Visual Studio Code

Microsoft Visual Studio Code, is a free development enviroment for building Web applications.

Instructions for installing extensions, such as JSLint, for Visual Studio Code can be found here. For JSlint, review the documentation for more details.

WebStorm

Download WebStorm and take a tour of the Quickstart Guide.

Setup Coding style:

  1. Open the project settings > Code Style > HTML
    • Change the values for Tab size, Indent, and Continuation indent to be 2 spaces instead of 4.
  2. Open the project settings > Code Style > JavaScript
    • Change the values for Tab size, Indent, and Continuation indent to be 2 spaces instead of 4.
  3. Open the project settings > Code Style > CSS
    • Change the values for Tab size, Indent, and Continuation indent to be 2 spaces instead of 4.

For more advanced Code Style formatting, visit the Web Help topic on Code Style.

Show Modal