I'm currently getting to grips with the new (3.1) ArcGIS JavaScript API and how it bundles Dojo and relies on Dojo's Asynchronous Module Definition (AMD) approach.
I'm familiar with AMD and recently completed a project using Require, Backbone, and OpenLayers in combination - overall a very pleasant experience.
However I'm worried by
- how tightly-coupled Dojo is with the ArcGIS JavaScript API,
- that trying to use Require instead of Dojo AMD throws an exception, and
- that Dojo AMD doesn't seem to have the same user-base and momentum as Require, making it difficult to research / resolve problems without hitting the forums
My main concern is that I will write an ArcGIS JavaScript API application and not be able to build / package it into a single / small number of scripts. This will leave me with an application making 100+ HTTP requests at startup for all of the modules it depends on.
I've seen this article covering 3.0 but it doesn't mention the build process and I believe 3.0 is quite different. I've also seen this piece on building / packaging an application that uses the ArcGIS JavaScript API but the comments suggest this is pre-Dojo 1.7 AMD.
Have ESRI really only half implemented the AMD approach, and in a way that will actually make my application slower? Why can I not find ESRI documentation on building / packaging a JavaScript API-based application?
Any thoughts or experience here would be much appreciated.
EDIT Based on the answers so far it seems that no, ESRI hasn't provided any information on building your Dojo application after inflating the number of scripts involved. It seems the only useful information available is from non-official sources and slightly outdated (enough to cause problems). This leads to me wonder why more people aren't vocal about the API's new improvements / deficiencies
- am I being too critical / demanding in expecting some more information here?
- is no one using the latest version of the API?
- should I use an older version of the API that doesn't depend on AMD?