NICTA/nationalmap — pull request #453 by kring (2014-11-11 23:41:34+00:00)
Title: Use promises to manage loading, instead of ad hoc insanity

This pull request makes the `load` method of our various catalog groups and items much simpler and less error prone. Instead of managing the `isLoading` flag and various other bits of state as they were before, items and groups now override a protected `_load` method that does nothing other than actually load. It returns a Promise that resolves when the load is complete.

In addition to making it easier to write and understand view-model loading, this change also improves catalog item composability. For example, it is now much more straightforward for `WebFeatureServiceItemViewModel` to aggregate `GeoJsonViewModel`.

Plus National Map is 5 lines of code shorter than before. :)