Start Building Your App – Patrick Arlt



Start Building Your App – Patrick Arlt

0 3


dev-summit-talk-getting-started

Get started building your application with ArcGIS for Developers

On Github patrickarlt / dev-summit-talk-getting-started

Start Building Your App

Patrick Arlt

Experience Developer - Esri Portland R&D Center

@patrickarlt - http://bit.ly/1cnAUEr

A bit of background...

  • I joined Esri in mid 2012 (From the Geoloqi acquisition)
  • There was no developer site for ArcGIS
  • ArcGIS for Developers launched at Dev Summit 2013

Since Then...

  • Most docs are moving/moved to developers.arcgis.com
  • New tools for developers
  • Lots of new capabilites
  • Lots of new use cases

Lets Build An App

  • Application
  • Users
  • OAuth 2
you have an app, you have some users to consume that app, how do you connect them?

Lets face it Oauth 2 is…

  • Scary
  • Awesome
  • The future
  • All of the above
scary, awesome, future

A more technical overview of Oauth 2…

Using ArcGIS with OAuth 2.0

Aaron Parecki @ Middle East Dev Summit

Before OAuth 2…

Now…

OAuth 2 is great becuse…

  • Users don't have to give away their passwords
  • You dont have to store users passwords
  • Standardized central & authorative login system
  • A well accepted standard around the web

Questions and Decisions

  • Do my users have ArcGIS Online accounts?
  • Do I want my users to login w/ their ArcGIS Online accounts?
  • What is my users don't have ArcGIS Online accounts?
have ago?, use ago?, dont have ago?

A Tale Of Two Use Cases

"App Logins" vs "User Logins"

"User Logins"

Users allow your applcation to access their ArcGIS Online content an use services on their behalf.

  • Users will login with their ArcGIS Online accounts
  • Your app will get an access_token
  • Use access_token to access that users content
  • Use the access_token to access services like directions, geocoding, GeoEnrichment, ect...
describe user flow in oauth 2, use token to access content + services

"User Logins" great for

  • Building apps for the ArcGIS Marketplace
  • Extending ArcGIS Online
  • Letting ArcGIS Online users access premium services

"App Logins"

Your application uses services on behalf of users.

  • Your app gets an access_token from ArcGIS Online
  • Use the access_token to access premium services like directions, geocoding, GeoEnrichment, ect…
  • You will be able to read from services owned by the same account as the application
get token, use, token, access services

"App Logins" great For

  • Allowing users to use ArcGIS Online services without authentication
  • Letting your own authenticated users access ArcGIS services
  • Server and script based applications

Demo Apps

Vanilla JS user login JS API user login App login on the server App login with a proxy

Vanilla JS user login

OAuth 2 with no frameworks or servers.

Source on GitHub

JS API user login

Integrate OAuth 2 authentication into the JS API.

Source on GitHub

App login on the server

Have our server make authenticated calls to ArcGIS Online.

Source on GitHub

App login with a proxy

Use a proxy with the JS API so make authenticated calls without logging in.

Source on GitHub

Thanks

Twitter : @patrickarlt

Slides : http://bit.ly/1cnAUEr