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. Windows系统里Oracle 11g R2 Client(64bit)的下载与安装

    环境: windows10系统(64位) 最好先安装jre或jdk(此软件用来打开oracle自带的可视化操作界面,不装也没关系:可以安装plsql,或者直接用命令行操作) Oracle 11g 是仅 ...

  2. 时间处理插件moment.js

    monment.js插件 处理时间:http://momentjs.cn/

  3. C#操作电脑多显示器设置

    电脑多显示器设置 第一种方式 通过使用api函数SetDisplayConfig来设置.这种方式在某些电脑中设置有几率会导致电脑黑屏 使用代码如下: private const uint SDC_AP ...

  4. reactV16理解

    在 V16 版本中引入了 Fiber 机制.这个机制一定程度上的影响了部分生命周期的调用,并且也引入了新的 2 个 API 来解决问题. 在之前的版本中,如果你拥有一个很复杂的复合组件,然后改动了最上 ...

  5. [七月挑选]Tomcat使用命令行启动之指定jdk版本

    title: Tomcat使用命令行启动之指定jdk版本 准备好环境,jdk和tomcat. 主要步骤 1.找到Tomcat/bin/catalina.bat文件. 2.在文件前端添加如下. set ...

  6. Java多线程(1)

    线程与进程 进程:程序的执行过程 线程:线程共享进程的资源 Java多线程 实现的方式 继承Tread类:使用getName()获取当前线程名 实现Runnable接口:Thread.currentT ...

  7. STM32 常用词汇释义

    1.AF——Alternate function   复用功能: 2.NVIC——Nested Vectored Interrupt Controller   内嵌向量中断控制器 3.ISER[8]— ...

  8. Andronov-Hopf bifurcation

    地址:http://www.scholarpedia.org/article/Andronov-Hopf_bifurcation Andronov-Hopf bifurcation is the bi ...

  9. 自然语言处理资源NLP

    转自:https://github.com/andrewt3000/DL4NLP Deep Learning for NLP resources State of the art resources ...

  10. pipeline语法学习日记

    1.pipeline 整合job的通用代码,比较基本 2.pipeline参数化构建