Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
I'm not sure I totally understand the question. The app templates on git mentioned in your question use REST endpoints, for example see the config.js for the land use notification app. –  geojeff Dec 12 '12 at 23:48
add comment

2 Answers 2

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.

share|improve this answer
add comment

I always reference the 'samples' section from the ESRI JavaScript API site. I wouldn't call them templates, but the samples all contain the full code to show you how to achieve different tasks and should be especially friendly to new JavaScript developers.

ESRI JavaScript API Site

share|improve this answer
    
I agree they are a good starting place for beginners. But they showcase functionality, and not so much on how to structure an actual web application. gis.stackexchange.com/a/18762/325 –  Simon Dec 14 '12 at 22:53
    
samples on ESRI site shows good how the API works. but the code structure is very messy and it is not good for more complex application. Try to learn OO JavaScript and then mix it with above tutorials. that how I did and it works great for me! –  Krystian Jan 28 '13 at 22:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.