Asynchronous module definition

Asynchronous module definition (AMD) is a specification for the programming language JavaScript. It defines an application programming interface (API) that defines code module and their dependencies, and loads them asynchronously if desired. Implementations of AMD provide the following benefits:

  • Website performance improvements. AMD implementations load smaller JavaScript files, and then only when they are needed.
  • Fewer page errors. AMD implementations allow developers to define dependencies that must load before a module is executed, so the module does not try to use outside code that is not available yet.

In addition to loading multiple JavaScript files at runtime, AMD implementations allow developers to encapsulate code in smaller, more logically-organized files, in a way similar to other programming languages such as Java. For production and deployment, developers can concatenate and minify JavaScript modules based on an AMD API into one file, the same as traditional JavaScript.

The AMD specification is implemented by Dojo Toolkit, RequireJS, and other libraries.

https://github.com/amdjs/amdjs-api/blob/master/AMD.md

扩展阅读

Why AMD?   require.js

Using jQuery UI with AMD

Asynchronous module definition的更多相关文章

  1. So, How About UMD模块-Universal Module Definition

    在ES6模块解决方案出现之前,工具库或包常用三种解决方案提供对外使用的接口,最早是直接暴露给全局变量,比如我们熟知的Jquery暴露的全局变量是$,Lodash对外暴露的全局变量是_,后来出现了AMD ...

  2. 公共模块定义/草案(Common Module Definition / draft - CMD草案)

    This specification addresses how modules should be written in order to be interoperable in browser-b ...

  3. JavaScript ES6 module 模块

    在使用JavaScript开发大型项目时,模块开发概念是一个必须考虑的问题.其目的就是通过命名空间对各类业务对象进行一定的封装,防止命名冲突. 本篇着重介绍ES6 module中的export和imp ...

  4. 前端模块化小总结—commonJs,AMD,CMD, ES6 的Module

    随着前端快速发展,需要使用javascript处理越来越多的事情,不在局限页面的交互,项目的需求越来越多,更多的逻辑需要在前端完成,这时需要一种新的模式 --模块化编程 模块化的理解:模块化是一种处理 ...

  5. Node.js & module system

    Node.js & module system Node.js v10.9.0 Documentation https://nodejs.org/api/modules.html#module ...

  6. 再次梳理AMD、CMD、CommonJS、ES6 Module的区别

    AMD AMD一开始是CommonJS规范中的一个草案,全称是Asynchronous Module Definition,即异步模块加载机制.后来由该草案的作者以RequireJS实现了AMD规范, ...

  7. webpack——Modules && Hot Module Replacement

    blog:JavaScript Module Systems Showdown: CommonJS vs AMD vs ES2015 官网链接: Modules 官网链接:Hot Module Rep ...

  8. 前端模块化IIFE,commonjs,AMD,UMD,ES6 Module规范超详细讲解

    目录 为什么前端需要模块化 什么是模块 是什么IIFE 举个栗子 模块化标准 Commonjs 特征 IIFE中的例子用commonjs实现 AMD和RequireJS 如何定义一个模块 如何在入口文 ...

  9. JS/TS项目里的Module都是什么?

    摘要:在日常进行JS/TS项目开发的时候,经常会遇到require某个依赖和module.exports来定义某个函数的情况.就很好奇Modules都代表什么和有什么作用呢. 本文分享自华为云社区&l ...

随机推荐

  1. 循环Gray码的生成(递归)

    #!/usr/bin/env python #coding:utf-8 import sys def gray_code(num, array): if num < 1: return if n ...

  2. SpringBoot_03mybatisPlus

    注意: mybatisPlus默认加载resources下的mapper文件夹下的xml文件 默认将数据库表的字段用驼峰标识转换成实体类的属性 官方网站: https://mp.baomidou.co ...

  3. python基础知识之数据类型

    一.与用户的交互 古时候,我们去银行取钱,需要有一个银行业务员等着我们把自己的账号密码输入给他, 然后他去进行验证,成功后,我们再将取款金额输入/告诉他 骄傲的现代人,会为客户提供一台ATM机(就是一 ...

  4. 为什么你不看好家教O2O

    伴随着科技的不断进步,大众创业的激情在不断的燃烧着,于是又很多的朋友会往家教这条路上走.就有了家教O2O的出现,很多的人都在抢占市场,可是,为什么你不看好家教O2O? 家教O2O虽然能够帮助附近的朋友 ...

  5. linux MySql 在 Master 主从复制配置

    在 Master 服务器上建立用于 Slave 服务器复制数据的帐户 [root@master ~]# mysql mysql> grant replication slave,replicat ...

  6. 关于<input type="hidden"/>标签的记录

    <input type="hidden" name="pid" value="10"/>标签放在一个input标签后可以使用,但 ...

  7. FPGA引脚锁定 注意err和高阻状态

    1.fpga没有用的的管脚一定要设置成高阻状态设置路径如下: Assignmen->Device->Device&Pin Option->Unused pins->As ...

  8. 服务器上搭建jupyter notebook

    参考:https://zhuanlan.zhihu.com/p/44405596 https://blog.csdn.net/cvMat/article/details/79351420 遇到的问题 ...

  9. libboost_regex 备份用时

    libboost_regex-vc100-mt-s-1_57.lib  //生成数据

  10. 用doxygen+graphviz生成函数调用流程图

    https://www.jianshu.com/p/fe4b6b95dca5 注意点:由于使用到了Graphviz,所以要设置Dot选项,勾选HAVE_DOT,并设置DOT_PATH为Graphviz ...