JavaScript Frameworks for the Geospatial Web - Change is Here, Part Four

Author’s Note: A Technical Architect with GeoDecisions, Naveed Sami designs and develops web-based, desktop, and mobile GIS applications and enterprise applications. With his finger on the pulse of the latest geospatial trends and technologies, Naveed will regularly discuss a variety of technical topics on our website.


JavaScript Frameworks – The Geospatial Twist

Hello, World!

My previous blog provided an introduction to the current state of JavaScript frameworks. The geospatial world adds a series of factors to consider while evaluating use of any particular framework. Because of its dominant position in the GIS world, Esri® technology must be taken into consideration. For web mapping, Esri's ArcGIS API for JavaScript, makes heavy use of Dojo Toolkit (Esri explains why here); and there are no plans to re-write the JavaScript API to replace Dojo with another toolkit or framework.

Seen to the right, David Bouwman and Mike Juniper delivered a wonderful presentation of Esri's use of other frameworks, in conjunction with Dojo and viewpoints related to JavaScript frameworks within the geospatial context, during the 2015 Esri Developer’s Summit.

There are multiple methods for developing with other frameworks and the Esri JavaScript API. Possible starting points include:

  • Use the API's compact build. A much smaller footprint that loads the minimum required Dojo components, this method can produce a more performant initial load. This is useful because other frameworks have their own components adding to the overall JavaScript payload.
  • Use Esri’s framework samples. This procedure is applicable for integration with Angular, Backbone, and Knockout from GitHub.
  • Leverage Esri’s integration with Leaflet. Since Leaflet is open source, widely adopted, and lightweight, it tends to move faster to integrate with other frameworks due to contributions from the open source developer community.  Here is Esri’s sample of the JavaScript API, ESRI’s Leaflet extension, and Angular.

A Way Forward

Actual use of particular frameworks in individual development efforts should be based on detailed analysis of the development project under consideration. This process incorporates architectural trade-offs that should be made while considering development team skills. The following broad conclusions can be drawn from the discussion:

  • Dojo: Because of Esri’s ongoing reliance on Dojo, existing commitments to production development based on Dojo should be continued.
  • Angular 2: Due to its current and prominent role in enterprise JavaScript development, Angular development should continue. This involves a steady increase in Angular 2 development.
  • React: A major overhaul to Angular 1, Angular 2 incorporates significant design principles from React, which has increased in popularity. A commitment to React for prototype development in the near term, allows developers to stay in tune with emerging technologies.
  • Esri Leaflet: The production and prototype development efforts described above should focus on the Esri JavaScript API compact build and Esri’s Leaflet extension as components to integrate with other frameworks.

These conclusions should serve as guidelines to incorporate within the detailed analysis carried out for individual development projects and propel research and development efforts.

“When the immense drugged universe explodes

In a cascade of unendurable color

And leaves us gasping naked,

This is no more than the ecstasy of chaos:

Hold fast, with both hands, to that royal love

Which alone, as we know certainly, restores

Fragmentation into true being.” – Robert Graves