SlideShare une entreprise Scribd logo
1  sur  120
AMD - WHY, WHAT,
            AND HOW



Mike Wilcox - January
2012
Tweets: @clubajax
Blogs: clubajax.org
The Problem
The Problem
Today’s complex Web Apps have created the
need for:
The Problem
Today’s complex Web Apps have created the
need for:
   Structure
   Some sort of framework, to aid in rapid development
The Problem
Today’s complex Web Apps have created the
need for:
   Structure
   Some sort of framework, to aid in rapid development
  Object orientation
   To “black box” complex code
The Problem
Today’s complex Web Apps have created the
need for:
   Structure
   Some sort of framework, to aid in rapid development
  Object orientation
   To “black box” complex code
  Modules and packages
   RE: The 2,500 best jQuery plugins...
The Problem
Today’s complex Web Apps have created the
need for:
   Structure
   Some sort of framework, to aid in rapid development
  Object orientation
   To “black box” complex code
  Modules and packages
   RE: The 2,500 best jQuery plugins...
  Dependencies
   (includes, requires, imports, what-ev)
The Problem
Today’s complex Web Apps have created the
need for:
   Structure
   Some sort of framework, to aid in rapid development
  Object orientation
   To “black box” complex code
  Modules and packages
   RE: The 2,500 best jQuery plugins...
  Dependencies
   (includes, requires, imports, what-ev)
  Reusable code
   Scope-isolated, clean API, portable
     Globals are bad!
Single Files
Single Files
 The “old fashioned way” to write JavaScript was to do
 it all in a single file.
Single Files
 The “old fashioned way” to write JavaScript was to do
 it all in a single file.



 // define library
 !  var!noop = function(){
 !  !   },

 !   !   isEmpty = function(it){
 !   !   !   for(var p in it){
 !   !   !   !   return 0;
 !   !   !   }
 !   !   !   return 1;
 !   !   },

 !   !   toString = {}.toString,

 !   !   isFunction = function(it){
 !   !   !   return toString.call(it) == "[object Function]";
 !   !   },

 !   !   isString = function(it){
 !   !   !   return toString.call(it) == "[object String]";
Single Files
 !
 !
 !
     !
     !
     !
         !
         !
         !
            computeMapProg = function(map, dest, packName){
            !
            !
                dest.splice(0, dest.length);
                var p, i, item, reverseName = 0;
 The “old fashioned way” to write JavaScript was to do
 !   !   !  !   for(p in map){
 !   !   !  !   !   dest.push([p, map[p]]);
 it all in a single file.
 !   !   !  !   !   if(map[p]==packName){
 !   !   !  !   !   !   reverseName = p;
 !   !   !  !   !   }
 !   !   !  !   }
 !   !   !  !   dest.sort(function(lhs, rhs){
 !   !   !  !   !   return rhs[0].length - lhs[0].length;
 !   !   !  !   });
 !   !   !  !   for(i = 0; i < dest.length;){
 !   !   !  !   !   item = dest[i++];
 !   !   !  !   !   item[2] = new RegExp("^" + item[0].replace(/([.$?*|{}
 ()[]/+^])/g, function(c){ return "" + c; }) + "(/|$)");
 !   !   !  !   !   item[3] = item[0].length + 1;
 !   !   !  !   }
 !   !   !  !   return reverseName;
 !   !   !  },

 !     !   !  fixupPackageInfo = function(packageInfo, baseUrl){
 !     !   !  !   // calculate the precise (name, baseUrl, main, mappings)
 for   a package
 !     !   !  !   var name = packageInfo.name;
 !     !   !  !   if(!name){
Single File - pros & cons
Single File - pros & cons
 Pros
   Fewer resources means faster load times.
Single File - pros & cons
 Pros
   Fewer resources means faster load times.
   No “build step” necessary.
Single File - pros & cons
 Pros
   Fewer resources means faster load times.
   No “build step” necessary.

Cons
   Difficult to maintain and edit a file thousands of
   lines long.
        GOTO Line #
Single File - pros & cons
 Pros
   Fewer resources means faster load times.
   No “build step” necessary.

Cons
   Difficult to maintain and edit a file thousands of
   lines long.
        GOTO Line #
   Code reusability is dirt poor.
        Copy and paste?
Single File - pros & cons
 Pros
   Fewer resources means faster load times.
   No “build step” necessary.

Cons
   Difficult to maintain and edit a file thousands of
   lines long.
        GOTO Line #
   Code reusability is dirt poor.
        Copy and paste?
   Makes team development near impossible.
        GITMERGETOOL
Multiple Files
Multiple Files
Multiple files which follow an object oriented or
namespaced approach are easier to maintain because
the brain more easily maps files to ideas.
Multiple Files
Multiple files which follow an object oriented or
namespaced approach are easier to maintain because
the brain more easily maps files to ideas.


  [dom.js]                        [lang.js]

  library.dom = {                 library.lang = {
    // code                         // code
  }                               }
                    [events.js]                [string.js]

                    library.events =          library.string =
                    {                         {
                      // code                   // code
                    }                         }
Multi File - pros & cons
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
   The brain more easily maps files to concepts
   (objects).
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
   The brain more easily maps files to concepts
   (objects).
    More team friendly.
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
   The brain more easily maps files to concepts
   (objects).
    More team friendly.
Cons
   The files (and server requests) will add up fast and
   that will slow down the page.
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
   The brain more easily maps files to concepts
   (objects).
    More team friendly.
Cons
   The files (and server requests) will add up fast and
   that will slow down the page.
   Lots of <script> tags. BLEAH.
Multi File - pros & cons
 Pros
   One-to-one, file-to-class makes organization
   easier.
   The brain more easily maps files to concepts
   (objects).
    More team friendly.
Cons
   The files (and server requests) will add up fast and
   that will slow down the page.
   Lots of <script> tags. BLEAH.
   The system to track all these files and their order is
   YOU.
Web App with <script> tags
Web App with <script> tags
Web App with <script> tags
Build solution for <script> tags
Build solution for <script> tags




                 Result can be fed into
                 Google Closure
                 Combiner, Dojo
                 Shrinksafe, UglifyJS,
                 etc, etc.
Dependency Matters
Dependency Matters
 Scripts load in this order


[dom.js]
   [events.js]
library.dom = {
  // code
      [lang.js]
   library.events =
}
   {
         [string.js]
      library.lang = {
     // code
   }    // code
      } library.string =
         {
           // code
         }
Dependency Matters
 Scripts load in this order
                              A change is made to dom.js
                               Adds events to node on create.
[dom.js]
   [events.js]
library.dom = {
  // code
      [lang.js]
   library.events =
}
   {
         [string.js]
      library.lang = {
     // code
   }    // code
      } library.string =
         {
           // code
         }
Dependency Matters
 Scripts load in this order
                              A change is made to dom.js
                               Adds events to node on create.
[dom.js]
   [events.js]
library.dom = {
  // code
      [lang.js]
   library.events =
}
   {
         [string.js]
                           dom.js is trying to access
      library.lang = {
     // code
   }    // code            events.js but it’s not loaded
      } library.string =   yet
         {
           // code
         }
Dependency Management


[dom.js]
   [events.js]
library.dom = {
  // code
      [lang.js]
   library.events =
}
   {
         [string.js]
      library.lang = {
     // code
   }    // code
      } library.string =
         {
           // code
         }
Dependency Management
                           [player.html]


[dom.js]
   [events.js]
library.dom = {
  // code

                                           [admin.html]
      [lang.js]
   library.events =
}
   {
         [string.js]
      library.lang = {
     // code
   }    // code
      } library.string =
         {
           // code
         }




                                               [test.html]




Now script order needs
to be changed in all your
I thought Dojo had a
    build tool with
     dependency
Dojo’s <1.7 Solution
Dojo’s <1.7 Solution
“provide” registers this page of code as “a class” (but
actually just an object).

 dojo.provide(“dijit.Dialog”);
Dojo’s <1.7 Solution
“provide” registers this page of code as “a class” (but
actually just an object).

 dojo.provide(“dijit.Dialog”);

 dojo.require(“dijit.form.Button”);


 “require” tells Dojo that the provided code depends
 upon the required code. Dojo guarantees that the
 required code is loaded before the provided code is
 executed.
How Dojo <1.7 Worked
How Dojo <1.7 Worked
    Script files were pulled in as text with XHR.




   -= XHR =-

[dom.js]
code
code
code
require(‘event’)
library.dom = {
  // code
}
How Dojo <1.7 Worked
    Script files were pulled in as text with XHR.
    One at a time, each text file is eval’d into
    JavaScript.

          synchronously!



   -= XHR =-                 -= EVAL =-

[dom.js]                   [dom.js]           [dom.js]
code                       code               code
code                       code               code
code                       code               code
require(‘event’)           require(‘event’)   require(‘event’)
library.dom = {            library.dom = {    library.dom = {
  // code                    // code            // code
}                          }                  }
Dojo <1.7 Problems
Dojo <1.7 Problems
 XHR load has same-origin restrictions
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
 Eval’d code totally fubar’d syntax-error line
 numbers
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
 Eval’d code totally fubar’d syntax-error line
 numbers
 Synchronous XHR is very slow
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
 Eval’d code totally fubar’d syntax-error line
 numbers
 Synchronous XHR is very slow
 Some environments do not allow eval (like Adobe
 AIR)
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
 Eval’d code totally fubar’d syntax-error line
 numbers
 Synchronous XHR is very slow
 Some environments do not allow eval (like Adobe
 AIR)
 eval executes differently across browsers
Dojo <1.7 Problems
 XHR load has same-origin restrictions
  Special, complex, XD loader was needed
 Eval’d code totally fubar’d syntax-error line
 numbers
 Synchronous XHR is very slow
 Some environments do not allow eval (like Adobe
 AIR)
 eval executes differently across browsers
 Developers are taught that eval is evil
ALTERNATIVE LOADER
    TECHNIQUES
Async
Async
 var Employee = require("Employee");

 function Manager () { }

 Manager.prototype = new Employee();   [ ERROR ]
Async
  var Employee = require("Employee");

 function Manager () { }

 Manager.prototype = new Employee();    [ ERROR ]




The Employee code is loaded async, so it happens in
the background while Manager is invoked, which
means Employee is not ready and an error occurs.
document.write
document.write
 write(‘<script src=”Store.js” />’);
 write(‘<script src=”Employee.js” />’);
document.write
 write(‘<script src=”Store.js” />’);
 write(‘<script src=”Employee.js” />’);



 No access to the script’s dependencies
document.write
 write(‘<script src=”Store.js” />’);
 write(‘<script src=”Employee.js” />’);



 No access to the script’s dependencies
 Does not work after page load
document.write
 write(‘<script src=”Store.js” />’);
 write(‘<script src=”Employee.js” />’);



 No access to the script’s dependencies
 Does not work after page load
 Blocks page rendering
appendChild(‘script’);
appendChild(‘script’);
 head = document.getElementsByTagName('head')[0];
 script = document.createElement('script');
 script.src = url;
 head.appendChild(script);


  No access to the script’s dependencies
appendChild(‘script’);
 head = document.getElementsByTagName('head')[0];
 script = document.createElement('script');
 script.src = url;
 head.appendChild(script);


  No access to the script’s dependencies
  Has same async issues
THE SOLUTION
Function Wrapping
Function Wrapping
 dependency
 dependency
 dependency

 code_for_loader_to_execute = function(){

     return code_to_be_converted_to_module_later

 }
Function Wrapping
 dependency
 dependency
 dependency

 code_for_loader_to_execute = function(){

     return code_to_be_converted_to_module_later

 }


 Wrapping code in function allows the loader to
 control when invocation needs to occur
Function Wrapping
 dependency
 dependency
 dependency

 code_for_loader_to_execute = function(){

     return code_to_be_converted_to_module_later

 }


 Wrapping code in function allows the loader to
 control when invocation needs to occur
 All code can defer until after all dependencies are
 determined and loaded
AMD’s Methods
AMD’s Methods
“define” registers this page of code as “a class”.

 define();
AMD’s Methods
“define” registers this page of code as “a class”.

 define();

 require();


 “require” loads in the requested modules and provides
 them in a callback function.
Anatomy of AMD - define()
Anatomy of AMD - define()


 define(
  [
     “./depA”,
     “./depB”
  ], function(depA, depB){
     var myModule = {};
     return myModule;
  }
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - define()
One of two
globals used in
the spec
 define(
  [
     “./depA”,
     “./depB”
  ], function(depA, depB){
     var myModule = {};
     return myModule;
  }
 );




                  * There are other argument options, but these are the most
                                                                   common.
Anatomy of AMD - define()
One of two                       Dependencies list defined
globals used in                  as an array in the first
the spec                         argument
 define(
  [
     “./depA”,
     “./depB”
  ], function(depA, depB){
     var myModule = {};
     return myModule;
  }
 );




                  * There are other argument options, but these are the most
                                                                   common.
Anatomy of AMD - define()
One of two               Dependencies list defined
globals used in          as an array in the first
the spec                 argument
                               The second
 define(
  [                            argument is the
     “./depA”,                 Factory which is
     “./depB”                  consumed when
  ], function(depA, depB){     module is requested
      var myModule = {};
      return myModule;
  }
 );




                  * There are other argument options, but these are the most
                                                                   common.
Anatomy of AMD - define()
One of two               Dependencies list defined
globals used in          as an array in the first
the spec                 argument
                               The second
 define(
  [                            argument is the
     “./depA”,                 Factory which is
     “./depB”                  consumed when
  ], function(depA, depB){     module is requested
     var myModule = {};        Dependencies
     return myModule;          passed as factory’s
  }                            arguments
 );




                  * There are other argument options, but these are the most
                                                                   common.
Anatomy of AMD - define()
One of two               Dependencies list defined
globals used in          as an array in the first
the spec                 argument
                               The second
 define(
  [                            argument is the
     “./depA”,                 Factory which is
     “./depB”                  consumed when
  ], function(depA, depB){     module is requested
     var myModule = {};        Dependencies
     return myModule;          passed as factory’s
  }                            arguments
                               All of your module
 );
                               magic happens here,
                               complete with scope
                               isolation

                  * There are other argument options, but these are the most
                                                                   common.
Anatomy of AMD - define()
One of two                      Dependencies list defined
globals used in                 as an array in the first
the spec                        argument
                                        The second
 define(
  [                                     argument is the
      “./depA”,                         Factory which is
      “./depB”                          consumed when
  ], function(depA, depB){              module is requested
      var myModule = {};                Dependencies
      return myModule;                  passed as factory’s
  }                                     arguments
                                        All of your module
);
                                        magic happens here,
                                        complete with scope
                                        isolation
Looks like a class, smells
like a class... * There are other argument options, but these are the most
                                                                 common.
Anatomy of AMD - require()
Anatomy of AMD - require()


 require(
  [
     “library/depA”,
     “library/depB”
  ], function(depA, depB){
     depA.doSomething();
     depB.someMore();
  }
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
The other global

 require(
  [
     “library/depA”,
     “library/depB”
  ], function(depA, depB){
     depA.doSomething();
     depB.someMore();
  }
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
                           Modules, or “Imports” list
The other global           defined as an array in the first
                           argument
 require(
  [
     “library/depA”,
     “library/depB”
  ], function(depA, depB){
     depA.doSomething();
     depB.someMore();
  }
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
                           Modules, or “Imports” list
The other global           defined as an array in the first
                           argument
 require(                              Callback fires when
  [
                                       modules are loaded
     “library/depA”,
     “library/depB”                    and ready
  ], function(depA, depB){
     depA.doSomething();
     depB.someMore();
  }
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
                           Modules, or “Imports” list
The other global           defined as an array in the first
                           argument
 require(                              Callback fires when
  [
                                       modules are loaded
     “library/depA”,
     “library/depB”                    and ready
  ], function(depA, depB){
     depA.doSomething();               Modules passed as
     depB.someMore();                  callback’s
  }                                    arguments
 );




               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
                           Modules, or “Imports” list
The other global           defined as an array in the first
                           argument
 require(                              Callback fires when
  [
                                       modules are loaded
     “library/depA”,
     “library/depB”                    and ready
  ], function(depA, depB){
     depA.doSomething();               Modules passed as
     depB.someMore();                  callback’s
  }                                    arguments
 );
                                       Modules are ready to
                                       access here


               * There are other argument options, but these are the most
                                                                common.
Anatomy of AMD - require()
                           Modules, or “Imports” list
The other global           defined as an array in the first
                           argument
 require(                              Callback fires when
  [
                                       modules are loaded
     “library/depA”,
     “library/depB”                    and ready
  ], function(depA, depB){
     depA.doSomething();               Modules passed as
     depB.someMore();                  callback’s
  }                                    arguments
 );
                                       Modules are ready to
                                       access here

Looks like “define”! Simple!
               * There are other argument options, but these are the most
                                                                common.
Why is ASYNC fast anyway?
Why is ASYNC fast anyway?
In this context, “async” refers to allowing the browser
to load the scripts natively. It can load many scripts at
once, concurrently.
Why is ASYNC fast anyway?




The “sync” loader needed to block all other processes
while a script was loaded.
EXTENDING AMD
Plugins
Plugins
The bang! symbol represents a plugin that
performs a special task.


 require(["dojo", "dojo/domReady!"], function(dojo){
 ! doDomStuff();
 });

 define([
     “dijit/Widget”,
     “dojo/text!myTemplate.html”
 ], function(Widget, template){
     // build a widget
 });
Plugins
The bang! symbol represents a plugin that
performs a special task.
    domReady! is a common plugin that prevents
    the callback from firing until the DOM is in
    fact... ready.
 require(["dojo", "dojo/domReady!"], function(dojo){
 ! doDomStuff();
 });

 define([
     “dijit/Widget”,
     “dojo/text!myTemplate.html”
 ], function(Widget, template){
     // build a widget
 });
Plugins
The bang! symbol represents a plugin that
performs a special task.
    domReady! is a common plugin that prevents
    the callback from firing until the DOM is in
    fact... ready.
 require(["dojo", "dojo/domReady!"], function(dojo){
 ! doDomStuff();
 });

 define([
     “dijit/Widget”,
     “dojo/text!myTemplate.html”
 ], function(Widget, template){
     // build a widget
 });


 text! knows that it is reading text or HTML
 and possibly applies transforms to it.
Build Tools
Build Tools
A “profile” is the description file the Dojo Builder uses.
The AMD structure works well as individual files or as
one combined file.
 var profile = {
 ! releaseDir:"../clubajax-deploy",
 ! packages:[
 ! ! {
 ! ! ! name:"clubajax",
 ! ! ! location:"."
 ! ! },{
 ! ! ! name:"plugin",
 ! ! ! location:"../plugin"
 ! ! }
 ! ],
 ! layers:{
 ! ! "clubajax/layer":{
 ! ! ! include:[ 'custom/main', 'plugin/main' ]
 ! ! }
 ! }
 };
Packages
Packages
A package.json file will help describe your code, its
external dependencies, and how it should be used.
 {
     "name": "clubajax.js",
     "description": "Club AJAX Base Library",
     "licenses": [{
             "type": "AFLv2.1",
             "url": "http://dojo/LICENSE"
     }],
     "bugs": "",
     "keywords": [],
     "homepage": "http://clubajax.org/",
     "dependencies": {},
     "dojoBuild": "clubajax.profile.js",
     "main": "./main"
Packages
A package.json file will help describe your code, its
external dependencies, and how it should be used.
 {
     "name": "clubajax.js",
     "description": "Club AJAX Base Library",
     "licenses": [{
             "type": "AFLv2.1",
             "url": "http://dojo/LICENSE"
     }],
     "bugs": "",
     "keywords": [],
     "homepage": "http://clubajax.org/",
     "dependencies": {},
     "dojoBuild": "clubajax.profile.js",
     "main": "./main"


“dojoBuild” points to the profile, and “main” points to
the master file that knows of all the files in the
package.
RESOURCES
AMD Authors
AMD Authors

         James Burke
          Original Dojo Loader author
          Developed RequireJS and
          spearheaded AMD
AMD Authors
AMD Authors

         Kevin Dangoor
          Authored blog post: “What
          Server Side JavaScript Needs”
          Founded CommonJS
          Expressed the need for JS
          modules and packages
          RequireJS based on CommonJS
          module spec
AMD Authors
AMD Authors

         Rawld Gill
          Wrote the Dojo 1.7 loader and
          Node.js build tool
          key contributor to AMD spec
          Authored all AMD plugins (text,
          i18n, domReady, ready)
          dojo bootstrap (kernel and base
          load)
          dojo's has.js implementation
          (enhanced from standard
          version)
AMD Authors
AMD Authors

         Kris Zyp
          Of course he helped. What is
          there that Kris Zyp DOESN’T
          do??
AMD Libraries
The following libraries are either AMD-
compliant or AMD loaders
  jQuery 1.7
  Dojo 1.7
  MooTools 2.0
  EmbedJS
  curl.js
More AMD Info
    https://github.com/amdjs/amdjs-api/wiki/AMD
    http://www.commonjs.org/
    http://www.commonjs.org/specs/
    http://dojotoolkit.org/reference-guide/loader/
    index.html#loader-index
    http://dojotoolkit.org/reference-guide/loader/amd.html#loader-
    amd
    http://arstechnica.com/web/news/2009/12/commonjs-effort-
    sets-javascript-on-path-for-world-domination.ars
    http://requirejs.org/docs/history.html
    http://www.commonjs.org/history/
    https://groups.google.com/group/amd-implement?pli=1
✴   Special credit to Rawld Gill of Alto Visio for his in depth
    explanations of Dojo Loader and Build Tool
✴   And a very special credit to James Burke - since most of the
    information in this presentation came from the RequireJS pages.
Description

Contenu connexe

Tendances

Even faster django
Even faster djangoEven faster django
Even faster djangoGage Tseng
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
Updates to the java api for json processing for java ee 8
Updates to the java api for json processing for java ee 8Updates to the java api for json processing for java ee 8
Updates to the java api for json processing for java ee 8Alex Soto
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackGaryCoady
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsersjeresig
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
 
Riak with node.js
Riak with node.jsRiak with node.js
Riak with node.jsSean Cribbs
 
The DOM is a Mess @ Yahoo
The DOM is a Mess @ YahooThe DOM is a Mess @ Yahoo
The DOM is a Mess @ Yahoojeresig
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™Nicola Iarocci
 
HTML5 JavaScript APIs
HTML5 JavaScript APIsHTML5 JavaScript APIs
HTML5 JavaScript APIsRemy Sharp
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for youSimon Willison
 
Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)Julie Meloni
 
Socket applications
Socket applicationsSocket applications
Socket applicationsJoão Moura
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShellDale Lane
 

Tendances (20)

Even faster django
Even faster djangoEven faster django
Even faster django
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Updates to the java api for json processing for java ee 8
Updates to the java api for json processing for java ee 8Updates to the java api for json processing for java ee 8
Updates to the java api for json processing for java ee 8
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
Riak with node.js
Riak with node.jsRiak with node.js
Riak with node.js
 
The DOM is a Mess @ Yahoo
The DOM is a Mess @ YahooThe DOM is a Mess @ Yahoo
The DOM is a Mess @ Yahoo
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™
 
HTML5 JavaScript APIs
HTML5 JavaScript APIsHTML5 JavaScript APIs
HTML5 JavaScript APIs
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for you
 
Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)Learning About JavaScript (…and its little buddy, JQuery!)
Learning About JavaScript (…and its little buddy, JQuery!)
 
From render() to DOM
From render() to DOMFrom render() to DOM
From render() to DOM
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Please dont touch-3.5
Please dont touch-3.5Please dont touch-3.5
Please dont touch-3.5
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
 
jQuery Objects
jQuery ObjectsjQuery Objects
jQuery Objects
 

En vedette

AMD Radeon Technology Group Summit
AMD Radeon Technology Group SummitAMD Radeon Technology Group Summit
AMD Radeon Technology Group SummitLow Hong Chuan
 
AMD 2014 Performance Mobile APUs
AMD 2014 Performance Mobile APUsAMD 2014 Performance Mobile APUs
AMD 2014 Performance Mobile APUsAMD
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD
 
Introducing the 2012 AMD E-Series APU
Introducing the 2012 AMD E-Series APUIntroducing the 2012 AMD E-Series APU
Introducing the 2012 AMD E-Series APUAMD
 
AMD CES 2013 Press Conference
AMD CES 2013 Press Conference AMD CES 2013 Press Conference
AMD CES 2013 Press Conference AMD
 
Mantle - Introducing a new API for Graphics - AMD at GDC14
Mantle - Introducing a new API for Graphics - AMD at GDC14Mantle - Introducing a new API for Graphics - AMD at GDC14
Mantle - Introducing a new API for Graphics - AMD at GDC14AMD Developer Central
 
Whats New in AMD - 2012
Whats New in AMD - 2012Whats New in AMD - 2012
Whats New in AMD - 2012Rick Trevino
 
AMD Opteron 6000 Series Platform Press Presentation
AMD Opteron 6000 Series Platform Press PresentationAMD Opteron 6000 Series Platform Press Presentation
AMD Opteron 6000 Series Platform Press PresentationAMD
 
AMD AM1 Platform Presentation
AMD AM1 Platform PresentationAMD AM1 Platform Presentation
AMD AM1 Platform PresentationLow Hong Chuan
 
AMD Financial Analyst Day 2015
AMD Financial Analyst Day 2015AMD Financial Analyst Day 2015
AMD Financial Analyst Day 2015AMD
 
Vorstellung AMD-netz.de
Vorstellung AMD-netz.deVorstellung AMD-netz.de
Vorstellung AMD-netz.deJohannes Meier
 
Computex 2014 AMD Press Conference
Computex 2014 AMD Press ConferenceComputex 2014 AMD Press Conference
Computex 2014 AMD Press ConferenceAMD
 
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahGS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahAMD Developer Central
 
evolucion de los microprocesadores AMD
evolucion de los microprocesadores AMDevolucion de los microprocesadores AMD
evolucion de los microprocesadores AMDstephanyarias
 
Microprocesadorores: INTEL o AMD
Microprocesadorores: INTEL o AMDMicroprocesadorores: INTEL o AMD
Microprocesadorores: INTEL o AMDies valledeltietar
 
AMD Bridges the X86 and ARM Ecosystems for the Data Center
AMD Bridges the X86 and ARM Ecosystems for the Data Center AMD Bridges the X86 and ARM Ecosystems for the Data Center
AMD Bridges the X86 and ARM Ecosystems for the Data Center AMD
 

En vedette (20)

Amd processor
Amd processorAmd processor
Amd processor
 
AMD Radeon Technology Group Summit
AMD Radeon Technology Group SummitAMD Radeon Technology Group Summit
AMD Radeon Technology Group Summit
 
AMD 2014 Performance Mobile APUs
AMD 2014 Performance Mobile APUsAMD 2014 Performance Mobile APUs
AMD 2014 Performance Mobile APUs
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
 
Introducing the 2012 AMD E-Series APU
Introducing the 2012 AMD E-Series APUIntroducing the 2012 AMD E-Series APU
Introducing the 2012 AMD E-Series APU
 
AMD CES 2013 Press Conference
AMD CES 2013 Press Conference AMD CES 2013 Press Conference
AMD CES 2013 Press Conference
 
Mantle - Introducing a new API for Graphics - AMD at GDC14
Mantle - Introducing a new API for Graphics - AMD at GDC14Mantle - Introducing a new API for Graphics - AMD at GDC14
Mantle - Introducing a new API for Graphics - AMD at GDC14
 
Whats New in AMD - 2012
Whats New in AMD - 2012Whats New in AMD - 2012
Whats New in AMD - 2012
 
AMD Opteron 6000 Series Platform Press Presentation
AMD Opteron 6000 Series Platform Press PresentationAMD Opteron 6000 Series Platform Press Presentation
AMD Opteron 6000 Series Platform Press Presentation
 
AMD AM1 Platform Presentation
AMD AM1 Platform PresentationAMD AM1 Platform Presentation
AMD AM1 Platform Presentation
 
AMD Financial Analyst Day 2015
AMD Financial Analyst Day 2015AMD Financial Analyst Day 2015
AMD Financial Analyst Day 2015
 
Vorstellung AMD-netz.de
Vorstellung AMD-netz.deVorstellung AMD-netz.de
Vorstellung AMD-netz.de
 
Computex 2014 AMD Press Conference
Computex 2014 AMD Press ConferenceComputex 2014 AMD Press Conference
Computex 2014 AMD Press Conference
 
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahGS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
 
evolucion de los microprocesadores AMD
evolucion de los microprocesadores AMDevolucion de los microprocesadores AMD
evolucion de los microprocesadores AMD
 
Microprocesadorores: INTEL o AMD
Microprocesadorores: INTEL o AMDMicroprocesadorores: INTEL o AMD
Microprocesadorores: INTEL o AMD
 
Inside XBOX ONE by Martin Fuller
Inside XBOX ONE by Martin FullerInside XBOX ONE by Martin Fuller
Inside XBOX ONE by Martin Fuller
 
Micropocesadores amd e intel upc jaime
Micropocesadores amd e intel upc jaimeMicropocesadores amd e intel upc jaime
Micropocesadores amd e intel upc jaime
 
AMD Bridges the X86 and ARM Ecosystems for the Data Center
AMD Bridges the X86 and ARM Ecosystems for the Data Center AMD Bridges the X86 and ARM Ecosystems for the Data Center
AMD Bridges the X86 and ARM Ecosystems for the Data Center
 
Battlefield 4 + Frostbite + Mantle
Battlefield 4 + Frostbite + MantleBattlefield 4 + Frostbite + Mantle
Battlefield 4 + Frostbite + Mantle
 

Similaire à AMD - Why, What and How

Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsSadayuki Furuhashi
 
Programming language for the cloud infrastructure
Programming language for the cloud infrastructureProgramming language for the cloud infrastructure
Programming language for the cloud infrastructureYaroslav Muravskyi
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...bobmcwhirter
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012alexismidon
 
The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQueryThe Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuerycolinbdclark
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBArangoDB Database
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the WebEelco Visser
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Tino Isnich
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Dinh Pham
 
Lecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdfLecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdfLê Thưởng
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
 

Similaire à AMD - Why, What and How (20)

"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
Programming language for the cloud infrastructure
Programming language for the cloud infrastructureProgramming language for the cloud infrastructure
Programming language for the cloud infrastructure
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 
The Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQueryThe Inclusive Web: hands-on with HTML5 and jQuery
The Inclusive Web: hands-on with HTML5 and jQuery
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDB
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the Web
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
Play framework
Play frameworkPlay framework
Play framework
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
 
Lecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdfLecture 03 - JQuery.pdf
Lecture 03 - JQuery.pdf
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 

Plus de Mike Wilcox

Accessibility for Fun and Profit
Accessibility for Fun and ProfitAccessibility for Fun and Profit
Accessibility for Fun and ProfitMike Wilcox
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itMike Wilcox
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsMike Wilcox
 
Model View Madness
Model View MadnessModel View Madness
Model View MadnessMike Wilcox
 
Hardcore JavaScript – Write it Right
Hardcore JavaScript – Write it RightHardcore JavaScript – Write it Right
Hardcore JavaScript – Write it RightMike Wilcox
 
The Great Semicolon Debate
The Great Semicolon DebateThe Great Semicolon Debate
The Great Semicolon DebateMike Wilcox
 
Webpage Design Basics for Non-Designers
Webpage Design Basics for Non-DesignersWebpage Design Basics for Non-Designers
Webpage Design Basics for Non-DesignersMike Wilcox
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End DeveloperMike Wilcox
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About RESTMike Wilcox
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5Mike Wilcox
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5Mike Wilcox
 
How to get a Job as a Front End Developer
How to get a Job as a Front End DeveloperHow to get a Job as a Front End Developer
How to get a Job as a Front End DeveloperMike Wilcox
 
The History of HTML5
The History of HTML5The History of HTML5
The History of HTML5Mike Wilcox
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?Mike Wilcox
 

Plus de Mike Wilcox (20)

Accessibility for Fun and Profit
Accessibility for Fun and ProfitAccessibility for Fun and Profit
Accessibility for Fun and Profit
 
WTF R PWAs?
WTF R PWAs?WTF R PWAs?
WTF R PWAs?
 
Advanced React
Advanced ReactAdvanced React
Advanced React
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need it
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatterns
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
 
Hardcore JavaScript – Write it Right
Hardcore JavaScript – Write it RightHardcore JavaScript – Write it Right
Hardcore JavaScript – Write it Right
 
The Great Semicolon Debate
The Great Semicolon DebateThe Great Semicolon Debate
The Great Semicolon Debate
 
Dojo & HTML5
Dojo & HTML5Dojo & HTML5
Dojo & HTML5
 
Webpage Design Basics for Non-Designers
Webpage Design Basics for Non-DesignersWebpage Design Basics for Non-Designers
Webpage Design Basics for Non-Designers
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End Developer
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5
 
How to get a Job as a Front End Developer
How to get a Job as a Front End DeveloperHow to get a Job as a Front End Developer
How to get a Job as a Front End Developer
 
The History of HTML5
The History of HTML5The History of HTML5
The History of HTML5
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 

Dernier

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Dernier (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

AMD - Why, What and How

  • 1. AMD - WHY, WHAT, AND HOW Mike Wilcox - January 2012 Tweets: @clubajax Blogs: clubajax.org
  • 3. The Problem Today’s complex Web Apps have created the need for:
  • 4. The Problem Today’s complex Web Apps have created the need for: Structure Some sort of framework, to aid in rapid development
  • 5. The Problem Today’s complex Web Apps have created the need for: Structure Some sort of framework, to aid in rapid development Object orientation To “black box” complex code
  • 6. The Problem Today’s complex Web Apps have created the need for: Structure Some sort of framework, to aid in rapid development Object orientation To “black box” complex code Modules and packages RE: The 2,500 best jQuery plugins...
  • 7. The Problem Today’s complex Web Apps have created the need for: Structure Some sort of framework, to aid in rapid development Object orientation To “black box” complex code Modules and packages RE: The 2,500 best jQuery plugins... Dependencies (includes, requires, imports, what-ev)
  • 8. The Problem Today’s complex Web Apps have created the need for: Structure Some sort of framework, to aid in rapid development Object orientation To “black box” complex code Modules and packages RE: The 2,500 best jQuery plugins... Dependencies (includes, requires, imports, what-ev) Reusable code Scope-isolated, clean API, portable Globals are bad!
  • 10. Single Files The “old fashioned way” to write JavaScript was to do it all in a single file.
  • 11. Single Files The “old fashioned way” to write JavaScript was to do it all in a single file. // define library ! var!noop = function(){ ! ! }, ! ! isEmpty = function(it){ ! ! ! for(var p in it){ ! ! ! ! return 0; ! ! ! } ! ! ! return 1; ! ! }, ! ! toString = {}.toString, ! ! isFunction = function(it){ ! ! ! return toString.call(it) == "[object Function]"; ! ! }, ! ! isString = function(it){ ! ! ! return toString.call(it) == "[object String]";
  • 12. Single Files ! ! ! ! ! ! ! ! ! computeMapProg = function(map, dest, packName){ ! ! dest.splice(0, dest.length); var p, i, item, reverseName = 0; The “old fashioned way” to write JavaScript was to do ! ! ! ! for(p in map){ ! ! ! ! ! dest.push([p, map[p]]); it all in a single file. ! ! ! ! ! if(map[p]==packName){ ! ! ! ! ! ! reverseName = p; ! ! ! ! ! } ! ! ! ! } ! ! ! ! dest.sort(function(lhs, rhs){ ! ! ! ! ! return rhs[0].length - lhs[0].length; ! ! ! ! }); ! ! ! ! for(i = 0; i < dest.length;){ ! ! ! ! ! item = dest[i++]; ! ! ! ! ! item[2] = new RegExp("^" + item[0].replace(/([.$?*|{} ()[]/+^])/g, function(c){ return "" + c; }) + "(/|$)"); ! ! ! ! ! item[3] = item[0].length + 1; ! ! ! ! } ! ! ! ! return reverseName; ! ! ! }, ! ! ! fixupPackageInfo = function(packageInfo, baseUrl){ ! ! ! ! // calculate the precise (name, baseUrl, main, mappings) for a package ! ! ! ! var name = packageInfo.name; ! ! ! ! if(!name){
  • 13. Single File - pros & cons
  • 14. Single File - pros & cons Pros Fewer resources means faster load times.
  • 15. Single File - pros & cons Pros Fewer resources means faster load times. No “build step” necessary.
  • 16. Single File - pros & cons Pros Fewer resources means faster load times. No “build step” necessary. Cons Difficult to maintain and edit a file thousands of lines long. GOTO Line #
  • 17. Single File - pros & cons Pros Fewer resources means faster load times. No “build step” necessary. Cons Difficult to maintain and edit a file thousands of lines long. GOTO Line # Code reusability is dirt poor. Copy and paste?
  • 18. Single File - pros & cons Pros Fewer resources means faster load times. No “build step” necessary. Cons Difficult to maintain and edit a file thousands of lines long. GOTO Line # Code reusability is dirt poor. Copy and paste? Makes team development near impossible. GITMERGETOOL
  • 20. Multiple Files Multiple files which follow an object oriented or namespaced approach are easier to maintain because the brain more easily maps files to ideas.
  • 21. Multiple Files Multiple files which follow an object oriented or namespaced approach are easier to maintain because the brain more easily maps files to ideas. [dom.js] [lang.js] library.dom = { library.lang = { // code // code } } [events.js] [string.js] library.events = library.string = { { // code // code } }
  • 22. Multi File - pros & cons
  • 23. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier.
  • 24. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier. The brain more easily maps files to concepts (objects).
  • 25. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier. The brain more easily maps files to concepts (objects). More team friendly.
  • 26. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier. The brain more easily maps files to concepts (objects). More team friendly. Cons The files (and server requests) will add up fast and that will slow down the page.
  • 27. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier. The brain more easily maps files to concepts (objects). More team friendly. Cons The files (and server requests) will add up fast and that will slow down the page. Lots of <script> tags. BLEAH.
  • 28. Multi File - pros & cons Pros One-to-one, file-to-class makes organization easier. The brain more easily maps files to concepts (objects). More team friendly. Cons The files (and server requests) will add up fast and that will slow down the page. Lots of <script> tags. BLEAH. The system to track all these files and their order is YOU.
  • 29. Web App with <script> tags
  • 30. Web App with <script> tags
  • 31. Web App with <script> tags
  • 32. Build solution for <script> tags
  • 33. Build solution for <script> tags Result can be fed into Google Closure Combiner, Dojo Shrinksafe, UglifyJS, etc, etc.
  • 35. Dependency Matters Scripts load in this order [dom.js] [events.js] library.dom = { // code [lang.js] library.events = } { [string.js] library.lang = { // code } // code } library.string = { // code }
  • 36. Dependency Matters Scripts load in this order A change is made to dom.js Adds events to node on create. [dom.js] [events.js] library.dom = { // code [lang.js] library.events = } { [string.js] library.lang = { // code } // code } library.string = { // code }
  • 37. Dependency Matters Scripts load in this order A change is made to dom.js Adds events to node on create. [dom.js] [events.js] library.dom = { // code [lang.js] library.events = } { [string.js] dom.js is trying to access library.lang = { // code } // code events.js but it’s not loaded } library.string = yet { // code }
  • 38. Dependency Management [dom.js] [events.js] library.dom = { // code [lang.js] library.events = } { [string.js] library.lang = { // code } // code } library.string = { // code }
  • 39. Dependency Management [player.html] [dom.js] [events.js] library.dom = { // code [admin.html] [lang.js] library.events = } { [string.js] library.lang = { // code } // code } library.string = { // code } [test.html] Now script order needs to be changed in all your
  • 40.
  • 41. I thought Dojo had a build tool with dependency
  • 43. Dojo’s <1.7 Solution “provide” registers this page of code as “a class” (but actually just an object). dojo.provide(“dijit.Dialog”);
  • 44. Dojo’s <1.7 Solution “provide” registers this page of code as “a class” (but actually just an object). dojo.provide(“dijit.Dialog”); dojo.require(“dijit.form.Button”); “require” tells Dojo that the provided code depends upon the required code. Dojo guarantees that the required code is loaded before the provided code is executed.
  • 45. How Dojo <1.7 Worked
  • 46. How Dojo <1.7 Worked Script files were pulled in as text with XHR. -= XHR =- [dom.js] code code code require(‘event’) library.dom = { // code }
  • 47. How Dojo <1.7 Worked Script files were pulled in as text with XHR. One at a time, each text file is eval’d into JavaScript. synchronously! -= XHR =- -= EVAL =- [dom.js] [dom.js] [dom.js] code code code code code code code code code require(‘event’) require(‘event’) require(‘event’) library.dom = { library.dom = { library.dom = { // code // code // code } } }
  • 49. Dojo <1.7 Problems XHR load has same-origin restrictions
  • 50. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed
  • 51. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed Eval’d code totally fubar’d syntax-error line numbers
  • 52. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed Eval’d code totally fubar’d syntax-error line numbers Synchronous XHR is very slow
  • 53. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed Eval’d code totally fubar’d syntax-error line numbers Synchronous XHR is very slow Some environments do not allow eval (like Adobe AIR)
  • 54. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed Eval’d code totally fubar’d syntax-error line numbers Synchronous XHR is very slow Some environments do not allow eval (like Adobe AIR) eval executes differently across browsers
  • 55. Dojo <1.7 Problems XHR load has same-origin restrictions Special, complex, XD loader was needed Eval’d code totally fubar’d syntax-error line numbers Synchronous XHR is very slow Some environments do not allow eval (like Adobe AIR) eval executes differently across browsers Developers are taught that eval is evil
  • 56.
  • 57. ALTERNATIVE LOADER TECHNIQUES
  • 58. Async
  • 59. Async var Employee = require("Employee"); function Manager () { } Manager.prototype = new Employee(); [ ERROR ]
  • 60. Async var Employee = require("Employee"); function Manager () { } Manager.prototype = new Employee(); [ ERROR ] The Employee code is loaded async, so it happens in the background while Manager is invoked, which means Employee is not ready and an error occurs.
  • 62. document.write write(‘<script src=”Store.js” />’); write(‘<script src=”Employee.js” />’);
  • 63. document.write write(‘<script src=”Store.js” />’); write(‘<script src=”Employee.js” />’); No access to the script’s dependencies
  • 64. document.write write(‘<script src=”Store.js” />’); write(‘<script src=”Employee.js” />’); No access to the script’s dependencies Does not work after page load
  • 65. document.write write(‘<script src=”Store.js” />’); write(‘<script src=”Employee.js” />’); No access to the script’s dependencies Does not work after page load Blocks page rendering
  • 67. appendChild(‘script’); head = document.getElementsByTagName('head')[0]; script = document.createElement('script'); script.src = url; head.appendChild(script); No access to the script’s dependencies
  • 68. appendChild(‘script’); head = document.getElementsByTagName('head')[0]; script = document.createElement('script'); script.src = url; head.appendChild(script); No access to the script’s dependencies Has same async issues
  • 69.
  • 72. Function Wrapping dependency dependency dependency code_for_loader_to_execute = function(){ return code_to_be_converted_to_module_later }
  • 73. Function Wrapping dependency dependency dependency code_for_loader_to_execute = function(){ return code_to_be_converted_to_module_later } Wrapping code in function allows the loader to control when invocation needs to occur
  • 74. Function Wrapping dependency dependency dependency code_for_loader_to_execute = function(){ return code_to_be_converted_to_module_later } Wrapping code in function allows the loader to control when invocation needs to occur All code can defer until after all dependencies are determined and loaded
  • 76. AMD’s Methods “define” registers this page of code as “a class”. define();
  • 77. AMD’s Methods “define” registers this page of code as “a class”. define(); require(); “require” loads in the requested modules and provides them in a callback function.
  • 78. Anatomy of AMD - define()
  • 79. Anatomy of AMD - define() define( [ “./depA”, “./depB” ], function(depA, depB){ var myModule = {}; return myModule; } ); * There are other argument options, but these are the most common.
  • 80. Anatomy of AMD - define() One of two globals used in the spec define( [ “./depA”, “./depB” ], function(depA, depB){ var myModule = {}; return myModule; } ); * There are other argument options, but these are the most common.
  • 81. Anatomy of AMD - define() One of two Dependencies list defined globals used in as an array in the first the spec argument define( [ “./depA”, “./depB” ], function(depA, depB){ var myModule = {}; return myModule; } ); * There are other argument options, but these are the most common.
  • 82. Anatomy of AMD - define() One of two Dependencies list defined globals used in as an array in the first the spec argument The second define( [ argument is the “./depA”, Factory which is “./depB” consumed when ], function(depA, depB){ module is requested var myModule = {}; return myModule; } ); * There are other argument options, but these are the most common.
  • 83. Anatomy of AMD - define() One of two Dependencies list defined globals used in as an array in the first the spec argument The second define( [ argument is the “./depA”, Factory which is “./depB” consumed when ], function(depA, depB){ module is requested var myModule = {}; Dependencies return myModule; passed as factory’s } arguments ); * There are other argument options, but these are the most common.
  • 84. Anatomy of AMD - define() One of two Dependencies list defined globals used in as an array in the first the spec argument The second define( [ argument is the “./depA”, Factory which is “./depB” consumed when ], function(depA, depB){ module is requested var myModule = {}; Dependencies return myModule; passed as factory’s } arguments All of your module ); magic happens here, complete with scope isolation * There are other argument options, but these are the most common.
  • 85. Anatomy of AMD - define() One of two Dependencies list defined globals used in as an array in the first the spec argument The second define( [ argument is the “./depA”, Factory which is “./depB” consumed when ], function(depA, depB){ module is requested var myModule = {}; Dependencies return myModule; passed as factory’s } arguments All of your module ); magic happens here, complete with scope isolation Looks like a class, smells like a class... * There are other argument options, but these are the most common.
  • 86. Anatomy of AMD - require()
  • 87. Anatomy of AMD - require() require( [ “library/depA”, “library/depB” ], function(depA, depB){ depA.doSomething(); depB.someMore(); } ); * There are other argument options, but these are the most common.
  • 88. Anatomy of AMD - require() The other global require( [ “library/depA”, “library/depB” ], function(depA, depB){ depA.doSomething(); depB.someMore(); } ); * There are other argument options, but these are the most common.
  • 89. Anatomy of AMD - require() Modules, or “Imports” list The other global defined as an array in the first argument require( [ “library/depA”, “library/depB” ], function(depA, depB){ depA.doSomething(); depB.someMore(); } ); * There are other argument options, but these are the most common.
  • 90. Anatomy of AMD - require() Modules, or “Imports” list The other global defined as an array in the first argument require( Callback fires when [ modules are loaded “library/depA”, “library/depB” and ready ], function(depA, depB){ depA.doSomething(); depB.someMore(); } ); * There are other argument options, but these are the most common.
  • 91. Anatomy of AMD - require() Modules, or “Imports” list The other global defined as an array in the first argument require( Callback fires when [ modules are loaded “library/depA”, “library/depB” and ready ], function(depA, depB){ depA.doSomething(); Modules passed as depB.someMore(); callback’s } arguments ); * There are other argument options, but these are the most common.
  • 92. Anatomy of AMD - require() Modules, or “Imports” list The other global defined as an array in the first argument require( Callback fires when [ modules are loaded “library/depA”, “library/depB” and ready ], function(depA, depB){ depA.doSomething(); Modules passed as depB.someMore(); callback’s } arguments ); Modules are ready to access here * There are other argument options, but these are the most common.
  • 93. Anatomy of AMD - require() Modules, or “Imports” list The other global defined as an array in the first argument require( Callback fires when [ modules are loaded “library/depA”, “library/depB” and ready ], function(depA, depB){ depA.doSomething(); Modules passed as depB.someMore(); callback’s } arguments ); Modules are ready to access here Looks like “define”! Simple! * There are other argument options, but these are the most common.
  • 94. Why is ASYNC fast anyway?
  • 95. Why is ASYNC fast anyway? In this context, “async” refers to allowing the browser to load the scripts natively. It can load many scripts at once, concurrently.
  • 96. Why is ASYNC fast anyway? The “sync” loader needed to block all other processes while a script was loaded.
  • 97.
  • 100. Plugins The bang! symbol represents a plugin that performs a special task. require(["dojo", "dojo/domReady!"], function(dojo){ ! doDomStuff(); }); define([ “dijit/Widget”, “dojo/text!myTemplate.html” ], function(Widget, template){ // build a widget });
  • 101. Plugins The bang! symbol represents a plugin that performs a special task. domReady! is a common plugin that prevents the callback from firing until the DOM is in fact... ready. require(["dojo", "dojo/domReady!"], function(dojo){ ! doDomStuff(); }); define([ “dijit/Widget”, “dojo/text!myTemplate.html” ], function(Widget, template){ // build a widget });
  • 102. Plugins The bang! symbol represents a plugin that performs a special task. domReady! is a common plugin that prevents the callback from firing until the DOM is in fact... ready. require(["dojo", "dojo/domReady!"], function(dojo){ ! doDomStuff(); }); define([ “dijit/Widget”, “dojo/text!myTemplate.html” ], function(Widget, template){ // build a widget }); text! knows that it is reading text or HTML and possibly applies transforms to it.
  • 104. Build Tools A “profile” is the description file the Dojo Builder uses. The AMD structure works well as individual files or as one combined file. var profile = { ! releaseDir:"../clubajax-deploy", ! packages:[ ! ! { ! ! ! name:"clubajax", ! ! ! location:"." ! ! },{ ! ! ! name:"plugin", ! ! ! location:"../plugin" ! ! } ! ], ! layers:{ ! ! "clubajax/layer":{ ! ! ! include:[ 'custom/main', 'plugin/main' ] ! ! } ! } };
  • 106. Packages A package.json file will help describe your code, its external dependencies, and how it should be used. { "name": "clubajax.js", "description": "Club AJAX Base Library", "licenses": [{ "type": "AFLv2.1", "url": "http://dojo/LICENSE" }], "bugs": "", "keywords": [], "homepage": "http://clubajax.org/", "dependencies": {}, "dojoBuild": "clubajax.profile.js", "main": "./main"
  • 107. Packages A package.json file will help describe your code, its external dependencies, and how it should be used. { "name": "clubajax.js", "description": "Club AJAX Base Library", "licenses": [{ "type": "AFLv2.1", "url": "http://dojo/LICENSE" }], "bugs": "", "keywords": [], "homepage": "http://clubajax.org/", "dependencies": {}, "dojoBuild": "clubajax.profile.js", "main": "./main" “dojoBuild” points to the profile, and “main” points to the master file that knows of all the files in the package.
  • 108.
  • 111. AMD Authors James Burke Original Dojo Loader author Developed RequireJS and spearheaded AMD
  • 113. AMD Authors Kevin Dangoor Authored blog post: “What Server Side JavaScript Needs” Founded CommonJS Expressed the need for JS modules and packages RequireJS based on CommonJS module spec
  • 115. AMD Authors Rawld Gill Wrote the Dojo 1.7 loader and Node.js build tool key contributor to AMD spec Authored all AMD plugins (text, i18n, domReady, ready) dojo bootstrap (kernel and base load) dojo's has.js implementation (enhanced from standard version)
  • 117. AMD Authors Kris Zyp Of course he helped. What is there that Kris Zyp DOESN’T do??
  • 118. AMD Libraries The following libraries are either AMD- compliant or AMD loaders jQuery 1.7 Dojo 1.7 MooTools 2.0 EmbedJS curl.js
  • 119. More AMD Info https://github.com/amdjs/amdjs-api/wiki/AMD http://www.commonjs.org/ http://www.commonjs.org/specs/ http://dojotoolkit.org/reference-guide/loader/ index.html#loader-index http://dojotoolkit.org/reference-guide/loader/amd.html#loader- amd http://arstechnica.com/web/news/2009/12/commonjs-effort- sets-javascript-on-path-for-world-domination.ars http://requirejs.org/docs/history.html http://www.commonjs.org/history/ https://groups.google.com/group/amd-implement?pli=1 ✴ Special credit to Rawld Gill of Alto Visio for his in depth explanations of Dojo Loader and Build Tool ✴ And a very special credit to James Burke - since most of the information in this presentation came from the RequireJS pages.

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n
  134. \n
  135. \n
  136. \n
  137. \n
  138. \n
  139. \n
  140. \n
  141. \n
  142. \n
  143. \n
  144. \n
  145. \n
  146. \n
  147. \n
  148. \n
  149. \n
  150. \n
  151. \n
  152. \n
  153. \n
  154. \n
  155. \n
  156. \n
  157. \n
  158. \n
  159. \n
  160. \n
  161. \n
  162. \n
  163. \n
  164. \n
  165. \n
  166. \n