Generating Custom Widgets for Esri’s WebApp Builder with Yeoman

Recently I’ve been developing custom widgets for the ArcGIS Web AppBuilder, and I have found that there is a lot of boilerplate code that you have to create for each new widget. I thought that a Yeoman generator would be a useful way to scaffold out the widget files, so I created generator-esri-appbuilder-js.

What It Does

The package contains a couple of generators that walk users through a series of prompts to gather information about a custom widget that they want to develop for the Web AppBuilder, and then scaffolds out the widget’s files.

Screenshot of running the generator-esri-appbuilder-js generators

The generator prompts you for widget properties and then scaffolds out the required files.

Continue reading

Bye-bye tomwayson.net

In my former professional life, I used to do a lot of .Net development, mostly ASP.Net development focussed on whatever alternative to WebForms was available at that time – e.g. ASP.Net MVP (remember that?), ASP.Net MVC, ASP.Net Web Pages.

These days, however, I’m primarily a JavaScript developer and it’s been years since I’ve written any .Net code. At Esri I get to focus on front-end web development, and if I’m developing on the server it’s in Node.js. To quote David Spriggs as he was musing about Node and GitHub, “we’re lucky to be alive at this point in history.”

So, I’ve finally decided to shut down my windows hosting account. Continue reading

Using Bootstrap Map? You Might Not Need jQuery…

I’ve been working with Allan Laframboise to add examples of how to use Esri’s popular Bootstrap Map framework without a dependency on jQuery. The Dojo-Bootstrap library, a Dojo port of the Twitter Bootstrap JavaScript modules, finally has a release candidate that is compatible with Bootstrap 3.x. This enabled us to replace the references to the Bootstrap JavaScript with references to the Dojo-Bootstrap modules and completely remove the reference to jQuery.

Bootstrap Map: Now with Dojo-Bootstrap

Now you can choose whether you’d like to get started using Bootstrap with jQuery or Dojo.

You can try out the new Dojo examples live at:

http://esri.github.io/bootstrap-map-js/demo/dojo/getstarted.html

Continue reading

Removing Unused Dependencies with grunt-amdcheck

I’ve recently been playing with the grunt-amdcheck plugin to remove unused dependencies from AMD modules. It’s common for define statements in an AMD project to accumulate unused dependencies over time as developers refactor, and it’s a good idea to clean those up from time to time as unused dependencies can:

  • Make it harder to maintain your code
  • Cause the browser to make unnecessary asynchronous requests at run time
  • Increase file size and download times

I worked with Mehdi Shojaei, the plugin’s author, on a couple of pull requests to make the plugin work better for my workflow. Namely I suggested that the plugin try to preserve the whitespace between arguments in define paths and module lists, and that it include an option to not overwrite files and that did not have unused dependencies.

Continue reading

Resources from our Esri DevSummit Presentation on JavaScript Testing

At the recent 2014 Esri Developers Summit in Palm Springs, Dave Bouwman, David Spriggs, and I presented on Testing Tools & Patterns for JavaScript Mapping Apps.

The video, slides (PDF), and links to related resources from that talk are all now available at the GitHub repository we created for the talk.

Personally, I think Dave Bouwman’s introductory section on the how and why of JavaScript unit testing is as good as any presentation or book (mapping or no) that I’ve seen or read on the subject and is definitely worth a watch.

Beyond that, if you’re interested in the mechanics of testing mapping apps with any of the frameworks we cover (the Intern, Jasmine, Karma, etc) there are plenty of resources to get you going.

My GitHub 30 Day Challenge

Last month I challenged myself to try make at least one contribution a day to GitHub for 30 days straight, and as a result I’ve been able to make long overdue updates to all of my existing repositories as well as make meaningful contributions to other peoples’ open source projects. Some of the things I accomplished during the challenge:

The challenge also helped me up my Git Fu a bit, since (sadly) most of my work projects are not managed in Git. If you’re like me, most of your GitHub activity takes place outside of your normal work hours, and this kind of challenge can really help you get to things that have been on the back burner for too long.

My 2013 GitHub contribution calendar
31 days so far… The gaping holes in the above calendar could be labeled “TFS/SVN Time.”

I’d definitely recommend others try a similar challenge. Here are my (self evident) tips for successfully completing your challenge:

Continue reading

Esri Landscape Modeler Application

Screenshot of Landscape Modeler

This week the Landscape Modeler application that was previewed at the International User Conference in June has hit the ArcGIS Marketplace.

Landscape Modeler is a web application that allows users to perform fast weighted overlay analysis at multiple scales or over a large area. This is ideal when there are multiple users that want to develop their ideas about suitability analysis models and share their results with each other.

You can find out more about Landscape Modeler listing on ArcGIS Marketplace (don’t worry, it’s free to any user with an ArcGIS Online organizational account). However, I wanted to mention a few things that I find interesting about this application from a developer’s perspective.

Continue reading

Landscape Modeler Application Presented at Esri UC 2013

The Landscape Modeler application that I’ve been working on was presented during the plenary session of the 2013 Esri International User Conference. Lanscape Modeler is a JavaScript application that enables ArcGIS Online users perform weighted overlay analysis with the new landscape datasets that Esri is hosting on ArcGIS Online. The application is able to perform real-time weighted overlay at scales ranging from that of a city to the entire country by leveraging the ability of ArcGIS image services to apply raster functions on the fly.

Below is a video of the quick 2 minute run through that Suzanne Foss presented in San Diego where she demonstrates how to use the application to develop a conservation plan for an area outside of Santa Cruz:

The app will be released in the coming weeks, so stay tuned.

Community Maps Contribution Management Application Released

For the better part of my first year at Esri, I have been working on a web application for the Community Maps Program that would make it easier for program contributors to upload and manage their data contributions. We released a minimally viable version of the web application in the fall of 2012 which focused on letting users register for the program and upload data. Since then we have focused on creating an application that lets users manage the complete lifecycle of their contributions from upload, through data review, map cache generation, and finally incorporation into the Esri basemaps. This version came out of beta at the beginning of this month.

The application is for program participants only, but if you are interested in learning more about or contributing to the program you can learn more by visiting the ArcGIS Online features page for Community Maps.

Continue reading

Getting to Know the ArcGIS Online Platform

A few of the sessions at the 2013 Esri Developer Summit got me interested in learning more about how I could utilize some of the new features of ArcGIS Online to help me build web mapping applications. As a developer, my instinct is to approach each new application with a blank page in SublimeText and a cup of coffee, but I’m getting better at learning to utilize the services that are out there to help jump start new development.

Full disclosure: I’ve been working for Esri for close to a year now. I’m sharing my personal experiences in trying to better understand the strengths and weaknesses of the ArcGIS Online platform versus other online mapping platforms. I won’t pretend to be able to be completely impartial, but it is also not part of my job to advocate for the platform.

Now that we’ve got that out of the way we can get down to business. My goals are to understand:

  • How far I can get without writing a single line of code
  • The limits of the built in features of the platform like web maps and templates
  • How to start a project using those built in features (e.g. for rapid prototyping) and then transition to a custom solution to get beyond those limits

The Plan

My plan is to tackle a small application from a few different angles. After seeing the Developing custom JavaScript Applications with ArcGIS Online presentation where they running routes as sample data, I was inspired to build a map of my own trail running routes in Southern California.

Continue reading