- 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.
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- Mastering Zabbix(Second Edition)
- 深入理解Bootstrap
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- AutoCAD VBA參數化繪圖程序開發與實戰編碼
- Python極簡講義:一本書入門數據分析與機器學習
- Access 2010數據庫應用技術實驗指導與習題選解(第2版)
- Illustrator CS6設計與應用任務教程
- 零基礎學C語言(第4版)
- Ext JS 4 Plugin and Extension Development
- Visual Basic語言程序設計基礎(第3版)
- INSTANT Premium Drupal Themes
- Web前端開發精品課:HTML5 Canvas開發詳解
- Python算法交易實戰
- Unity3D高級編程:主程手記