Learn to speak REST

01-28-2015 07:34 AM
Labels (1)
Frequent Contributor
3 0 1,858


Esri provides a lot of resources and tools for ArcGIS Developers. You could be working in JavaScript, iOS, Android, or Java, They pretty much have you covered as far as SDKs go. You might be fairly comfortable in the SDK of your choice, but if you ever decided to go from JavaScript to Android, other than the language difference, you should feel pretty good about it. Why? Because it's all based on a single REST API.

We're all really saying the same thing

Regardless of the SDK you work in, under the hood it's all taking to the same person on the other end of the line, the REST endpoint of an ArcGIS Server, Portal or Online. This unified REST API is why you may have felt pretty familiar moving from Silverlight or Flex to JavaScript. Once you get past the initial language bump, the methods and practices all seem to work the same. A Feature has the same structure no matter what SDK you are using. Editing data is familiar no matter what language you are working in. Sure, some of the tools may differ, but it's all very familiar.

SDKs? Where we're going, we don't need SDKs

Because the REST API is the driving force to the ArcGIS development, you could theoretically write all your applications from scratch against the API without using any ArcGIS SDKs. Sometimes this becomes necessary when the features in an SDK may not be up to date with the latest features of the REST API. The more familiar you are with working with the REST API, the easier it is for you as a developer to overcome these hurdles.

It's for this same reason that you are not limited to having to use the ArcGIS JS API for your JavaScript development, you could use esri-leaflet. Esri-leaflet is able to pull in tiles and services from ArcGIS sources and work with them because under the hood it's speaking the same language as everyone else, the language of the REST API. It may not be as feature rich as the ArcGIS JS API, but it's also much more lightweight and could be perfectly suitable for your use case.

Need to interact with ArcGIS Services in a server side application? You can talk to the REST API directly just like this ArcGIS partial class library does. You can run your queries, customize the results and output the information as needed. You don't need to be limited to official SDKs and tools, the REST API is there for your abuse use.

Have fun with it

So go on, give it a shot. Next time you find yourself limited by the SDK of your choosing, try to see if you can interact with the REST API directly to get the desired results. Up your game and get things done.

For more tips and tricks, be sure to check out my geodev blog.

About the Author
Softwhere Developer at Esri working on cool stuff! Author: Introducing ArcGIS API 4 for JavaScript: Turn Awesome Maps into Awesome Apps https://amzn.to/2qwihrV ArcGIS Web Development - https://amzn.to/2EIxTOp Born and raised in East L.A.