O'Reilly logo

Mastering ArcGIS Server Development with JavaScript by Ken Doman

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

Putting some Backbone in your app

Since Backbone uses jQuery under the hood to work with the DOM, we can reuse much of the code from our jQuery application. We'll be using the same ArcGIS JavaScript API modules to interact with the map services. We'll only change how the drop-down options are rendered and how the change events on those dropdowns are handled. So, let's start by making a copy of our jQuery application and naming the folder Backbone.

Next, we'll need to add references to the Backbone and Underscore libraries in our dojoConfig, so that they are available through AMD. We'll load them from a CDN source for this application, although you're free to download them into folders for your own applications:

dojoConfig = { async: true, packages: ...

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