- Mastering ArcGIS Server Development with JavaScript
- Ken Doman
- 180字
- 2021-07-16 20:03:00
Asynchronous Module Definition
Both the ArcGIS JavaScript API and Dojo decided to handle the bloated library crisis by incorporating the concept of Asynchronous Module Definition (AMD). In AMD, a library is broken down into modular components. The developer can pick and choose which parts of library they want to include in the application. By loading only the parts we need, we reduce download times, free the browser memory of unused functionality, and improve performance.
Another advantage of AMD is name collision avoidance or the names of the variables where the libraries load are controlled by the developer. Also, the scope of the loaded libraries is limited to within the calling function, much like a self-executing statement.
In an AMD based application, we make a list of the library modules we want to use, usually in an array of strings that the library knows how to interpret. We then follow it up with a function that loads most or all of those modules into JavaScript objects. We can then use those modules within the function to get the results we want.
- Computer Vision for the Web
- Mastering Ember.js
- Apache Spark 2 for Beginners
- Python王者歸來
- Object-Oriented JavaScript(Second Edition)
- R的極客理想:工具篇
- Java項目實戰精編
- C語言程序設計
- Unity 2017 Mobile Game Development
- 一塊面包板玩轉Arduino編程
- 持續輕量級Java EE開發:編寫可測試的代碼
- Android Game Programming by Example
- Visual Basic程序設計全程指南
- C語言程序設計
- Android移動應用項目化教程