Requirejs

Jul. 22, 2011
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
Requirejs
1 of 16

More Related Content

What's hot

React.js触ってみた 吉澤和香奈React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈Wakana Yoshizawa
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
Asynchronous Module Definition (AMD) used for Dependency Injection (DI) and MVVMAsynchronous Module Definition (AMD) used for Dependency Injection (DI) and MVVM
Asynchronous Module Definition (AMD) used for Dependency Injection (DI) and MVVMHugh Anderson
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowDerek Willian Stavis
Modularize JavaScript with RequireJSModularize JavaScript with RequireJS
Modularize JavaScript with RequireJSMinh Hoang
Backbone.jsBackbone.js
Backbone.jsVO Tho

Viewers also liked

Meet HandlebarMeet Handlebar
Meet HandlebarHandlebar Publishing
Require.JSRequire.JS
Require.JSIvano Malavolta
Using RequireJS for Modular JavaScript CodeUsing RequireJS for Modular JavaScript Code
Using RequireJS for Modular JavaScript CodeThomas Lundström
Require JSRequire JS
Require JSImaginea
Using RequireJS with CakePHPUsing RequireJS with CakePHP
Using RequireJS with CakePHPStephen Young
Open layers - utilisation simple et avancéeOpen layers - utilisation simple et avancée
Open layers - utilisation simple et avancéeKhalid Jebbari

Similar to Requirejs

All you need to know about JavaScript loading and execution in the browser - ...All you need to know about JavaScript loading and execution in the browser - ...
All you need to know about JavaScript loading and execution in the browser - ...Caelum
Angular2  - In ActionAngular2  - In Action
Angular2 - In ActionSebastian Pożoga
Webpack packing it allWebpack packing it all
Webpack packing it allCriciúma Dev
Beyond DOMReady: Ultra High-Performance JavascriptBeyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance Javascriptaglemann
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJSAaronius
SPTechCon Boston 2015 - Whither SPServices?SPTechCon Boston 2015 - Whither SPServices?
SPTechCon Boston 2015 - Whither SPServices?Marc D Anderson

Recently uploaded

Improving Employee Experiences on Cisco RoomOS Devices, Webex, and Microsoft ...Improving Employee Experiences on Cisco RoomOS Devices, Webex, and Microsoft ...
Improving Employee Experiences on Cisco RoomOS Devices, Webex, and Microsoft ...ThousandEyes
Webhook Testing StrategyWebhook Testing Strategy
Webhook Testing StrategyDimpy Adhikary
Advancing Equity and Inclusion for Deaf Students in Higher EducationAdvancing Equity and Inclusion for Deaf Students in Higher Education
Advancing Equity and Inclusion for Deaf Students in Higher Education3Play Media
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGDSCNiT
Common WordPress APIs - Options APICommon WordPress APIs - Options API
Common WordPress APIs - Options APIJonathan Bossenger
The Flutter Job Market At The MomentThe Flutter Job Market At The Moment
The Flutter Job Market At The MomentAhmed Abu Eldahab

Requirejs

Editor's Notes

  1. Test\n
  2. \n
  3. 1. DEPENDENCIES - No way to cross-reference javascript (dependencies)\nEvery page needs to repeat the list of scripts, maintain it’s own set of dependencies\n
  4. 2. SPEED - Each new script that is included blocks the browser until it is done downloading & runs\n\n
  5. 3. EXECUTION ORDER - Managing order of downloading & running scripts- what comes before what & what needs to be on the page afterwards\n
  6. \n
  7. The easiest way to use it is to just load require.js on the page and point it to a single file that contains the scripts- it will download all scripts in parallel & execute in order\n
  8. A single main file that can load any dependencies\n
  9. Modules are where require.js really shines.\nJavaScript’s biggest problem is that it was designed to be written and run directly in the browser- they didn’t have to worry about how to manage dependencies in between scripts- they didn’t expect it to grow like it did. Require.js solves this problem for us.\n\n
  10. Once you define a module, you can then use that module in any require script and directly call that script as a function\n
  11. \n
  12. Modules can be named, can require other modules (or files), and pass those modules into the module function\n
  13. \n
  14. \n
  15. Assuming a structure like above, you can build a build script that can trace down through all of your files and build a minified version of each, as well as an overall minified project file\n
  16. \n