JavaScript architecture design 2. Module Loading System

Source: Internet
Author: User

2.1 AMD Specifications

AMD is the abbreviation for "Asynchronous module definition", meaning "async module definition". There are two major points of emphasis. Asynchronous-effectively avoids the phenomenon of suspended animation of the page caused by synchronous loading mode. Module definitions-Each module must be written in a certain format. There are two main interfaces, define and require. Define is a way for module developers to focus, and require is a way for module users to focus on them.

The Define parameter condition is define (ID?). , Deps? , factory). The first one is the module ID, the 2nd is the dependency list, and the third is the factory method. The first two are optional, and if you do not define an ID, it is an anonymous module

JavaScript architecture design 2. Module Loading System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.