- 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.
- PostgreSQL for Data Architects
- 三維圖形化C++趣味編程
- Production Ready OpenStack:Recipes for Successful Environments
- Full-Stack Vue.js 2 and Laravel 5
- Python完全自學教程
- Java編程技術與項目實戰(第2版)
- FPGA Verilog開發實戰指南:基于Intel Cyclone IV(進階篇)
- C++從入門到精通(第5版)
- Spring Boot實戰
- PHP+MySQL動態網站開發從入門到精通(視頻教學版)
- JavaScript前端開發基礎教程
- C語言程序設計教程
- 網頁設計與制作
- Building Apple Watch Projects
- Design Patterns and Best Practices in Java