In this post, I’ll explain the hack that underlies these solutions and explore the pros and cons of two patterns for loading ArcGIS modules in applications that are built with a module bundler. Although most of the examples shown use webpack, the same patterns can be applied to rollup.js as well.
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.
The generator prompts you for widget properties and then scaffolds out the required files.
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.
Now you can choose whether you’d like to get started using Bootstrap with jQuery or Dojo.
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
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.
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.
I’d definitely recommend others try a similar challenge. Here are my (self evident) tips for successfully completing your challenge:
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.
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.