Demonstrations

Loading

There are two reasons to choose an AMD, script-injection loader compared to a synchronous loader:

We've put together a set of demonstrations of the second point here.

Loader Size

Loaders are difficult to get right. Most of the problem is rooted in the desire to add features, yet keep the loader small and unobtrusive. After all, once the application is loaded, the loader basically becomes a chunk of dead code that doesn't do anything. Clearly to pay for downloading 10K onto an iphone just to load the real application is a nonstarter. So there are lots of tradeoffs and some disagreement among loader developers about which are the right tradeoffs to take.

The #1 design requirement for bdLoad is to minimize the implementation size while fully implementing the AMD specification. We claim bdLoad is quite small indeed, coming at less the 3K in some configurations! You can see optimized versions of bdLoad here.