[GIS] Application Templates for ArcGIS Server

arcgis-javascript-apiarcgis-serverbootstrap-frameworkweb-mapping

Esri provide a lot of excellent template applications for us in conjunction with web maps.

These templates are specifically designed for using with your resources on ArcGIS Online as opposed to ArcGIS Server. (i.e. you supply a web map ID, as opposed to URLs to your GIS Services Directory).

In particular I found this awesome template, that ticks all the boxes for me:

  • Mobile support (e.g media queries, responsive design)
  • Share to social media
  • Nice looking layout
  • Built in Geocoder
    etc. etc.

I have been looking at the code behind it, and was hoping I could reverse engineer it to work with my ArcGIS Server REST endpoints instead. However, does not look like an easy task (im new to Javascript) and believe I would spend more time trying to do this Vs building something from scratch.

Can anyone recommend some template applications to use as a starting point for developing an ArcGIS Javascript API app to use against ArcGIS for Server?

I have already put together the bones of my application in a basic dojo template, but its the stuff mentioned above that I need to also include in my web application.

This will then allow me to focus my development efforts on the actual Esri Javascript API logic, without needing to spend a lot of time having to do a 101 on other aspects of web development.

I understand there are a number of web frameworks out there (e.g Bootstrap) that might assist in some of this, but I was kind of hoping for something a bit more established and aimed at Esri Javascript API. However, would still be interested in answers that do leverage other web framework templates as a starting point.

Best Answer

I completely agree that the ESRI samples are now both out of date and misleading. I notice a few samples are updated to AMD but not many. The samples embedding of JavaScript in the HTML is bad practice that most new comers seem to follow. They are just samples to get across ideas, but many don't seem to realise this.

The Basic Map Viewer provided some very useful features for working with ArcGIS online and making a configurable viewer which fits in with ESRI's AGO framework. This is probably quite similar to the app you were looking at though. Also it's also not structured very well in terms of AMD.

For structuring your code in AMD take a look at odoe's AGSModular demo. It also demonstrates how to build Esri JS code in to a single js using r.js (I never got the hang of Dojo build). It's probably going to be quite a steep learning curve if you are new to JS.

I use the HTML5 boiler plate which helps with a number of cross browser issues. It also includes modernizer for feature detection.

For responsive design I haven't found anything out of the box for web maps that is useful.

Related Question