Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Requirejs Demo - 2/14/12

1,694 views

Published on

Slides used in a quick demo of RequireJS for the Scitent dev team

Published in: Technology, Design
  • Be the first to comment

  • Be the first to like this

Requirejs Demo - 2/14/12

  1. 1. RequireJS 2-14-2014 : 2 02
  2. 2. RequireJS is...✤ An asynchronous script loader✤ A tool to support organization of code cleanly into modules in separate files✤ A tool to “build” and optimize multiple javascript modules into a single file
  3. 3. Why use a loader?✤ Overcome script tag “blocking” behavior✤ Parallel script downloads✤ On-demand or “lazy” loading
  4. 4. Lots of flavors…
  5. 5. Javascript Modules✤ Namespacing (actually, scope closure)✤ One module per file✤ Dependency management✤ Load in parallel in any order, but execute in correct order
  6. 6. AMD (Asynchronous Module Definition) The Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross-domain access problems. https://github.com/amdjs/amdjs-api/wiki/AMD http://addyosmani.com/writing-modular-js/ http://requirejs.org/docs/whyamd.html
  7. 7. RequireJS vs. Sprockets

×