concept map widget in category arcgis

This is an excerpt from Manning's book ArcGIS Web Development.
The next step is to update the widgetloader module to make sure it creates the map widget before the other widgets, because most of the other widgets are dependent on the map to work properly. This requires more work, because now you have to separate the map widget from the other widgets, load the map widget first, wait for it to load, and then continue loading the other widgets. Because you know that the application has to wait for an action to occur before continuing another action, that’s a dead giveaway that this is a good place to use a promise, as was discussed in section 3.2.2. A promise allows you to perform an asynchronous action and wait for it to complete. Now you’ll incorporate a promise into the widget creation process. You can see what the updated widgetloader looks like in the following listing.