Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

8. Modular Development > Organizing Modules with RequireJS and AMD

Organizing Modules with RequireJS and AMD

Partly contributed by Jack Franklin

RequireJS is a popular script loader written by James Burke, a developer who has been quite instrumental in helping shape the AMD module format, which we’ll discuss shortly. Among other things, RequireJS helps you to load multiple script files, define modules with or without dependencies, and load in nonscript dependencies such as text files.

Maintainability Problems with Multiple Script Files

You might be thinking that there is little benefit to RequireJS. After all, you can simply load in your JavaScript files through multiple <script> tags, which is very straightforward. However, doing it that way has a lot of drawbacks, including increasing the HTTP overhead.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial