SlideShare ist ein Scribd-Unternehmen logo
1 von 98
Downloaden Sie, um offline zu lesen
Moving to Dojo 1.7
                                                ...and the path to 2.0

http://www.flickr.com/photos/jenik/4836118314/
Wednesday, 7 December 2011
Me.




                             @thomasj

Wednesday, 7 December 2011
Dojo 1.7




http://www.flickr.com/photos/anythreewords/3197918781
Wednesday, 7 December 2011
Dojo 1.7




http://www.flickr.com/photos/anythreewords/3197918781
Wednesday, 7 December 2011
Wednesday, 7 December 2011
Lots has changed...
                  •     AMD Module format       •   Touch events support

                  •     New Loader              •   Gauges & Charting

                  •     New Build system        •   Data Stores

                  •     Better Mobile support   •   MVC support

                  •     Feature detection       •   Slim-line widgets

                  •     Improved Grid           •   Dojo Package Repo

                  •     and much more...        •   and much more....

Wednesday, 7 December 2011
http://www.flickr.com/photos/trancemist/361935363/
Wednesday, 7 December 2011
Don’t




http://www.flickr.com/photos/trancemist/361935363/
Wednesday, 7 December 2011
API compatibility until
                           2.0*


         * - There may be some exceptions
Wednesday, 7 December 2011
What’s AMD?



Wednesday, 7 December 2011
“Asynchronous Module Definition
              (AMD) API specifies a mechanism for
              defining modules such that the
              module and its dependencies can be
              asynchronously loaded”




Wednesday, 7 December 2011
What’s new about that?



Wednesday, 7 December 2011
“Asynchronous Module Definition
              (AMD) API specifies a mechanism for
              defining modules such that the
              module and its dependencies can be
              asynchronously loaded”



Wednesday, 7 December 2011
“Dojo is slow....”
Wednesday, 7 December 2011
“Dojo is slow....”
Wednesday, 7 December 2011
AMD Support



Wednesday, 7 December 2011
AMD Support
             Toolkits:
                               JQuery 1.7+

                                Dojo 1.7+

                              MooTools 2.0+

Wednesday, 7 December 2011
AMD Support




                                                                      Firebug 1.8+
 http://www.flickr.com/photos/phil-jackson/3624102329/in/photostream

Wednesday, 7 December 2011
AMD Support




                                                              ...also seen in the BBC iPlayer
 http://www.flickr.com/photos/phil-jackson/3624102329/in/photostream

Wednesday, 7 December 2011
Dojo 1.7 - “Nano”




http://www.flickr.com/photos/argonne/4703475086
Wednesday, 7 December 2011
http://www.flickr.com/photos/obiwanjr/5313551313




          Dojo gives you lots of “blocks”
Wednesday, 7 December 2011
The Dojo Toolkit


                             Dojo         Dijit        DojoX




Wednesday, 7 December 2011
The Dojo Toolkit
                             Dojo
                             Core
                                          Dijit        DojoX

                             Base




Wednesday, 7 December 2011
The Dojo Toolkit
                             Dojo
                              Core
                                           Dijit        DojoX

                              Base




                             Base modules are always loaded
Wednesday, 7 December 2011
NodeList.js           array.js
                  connect.js            event.js
                  html.js               lang.js
                  query.js              xhr.js
                  Deferred.js           _loader
                  browser.js            declare.js
                  fx.js                 json.js
                  query-sizzle.js       window.js
                  Color.js

                             ~32KB gzip+minified
Wednesday, 7 December 2011
http://www.flickr.com/photos/obiwanjr/5313551313




                       Do we always need them?
Wednesday, 7 December 2011
http://www.flickr.com/photos/redux/4297873805/
Wednesday, 7 December 2011
“Base-less” Dojo




                                   Just the AMD loader by default....
                                        only load what you need


http://www.flickr.com/photos/redux/4297873805/
                                                           < 4KB gzip+minified
Wednesday, 7 December 2011
Turning on AMD
http://www.flickr.com/photos/reel-dreams/4893003699

Wednesday, 7 December 2011
Non-AMD loader
                             <script src="path/to/dojo.js"></script>




Wednesday, 7 December 2011
Configuration Flag


                     async: {true|false}




Wednesday, 7 December 2011
Enabling AMD loader
                             <script src="path/to/dojo.js"></script>




                                          "async:true"




 <script data-dojo-config="async:true" src="path/to/dojo.js"></script>




Wednesday, 7 December 2011
Enabling AMD loader
            <script>
            	 	 var dojoConfig = {
            	 	 	 async:true
              	 };
            </script>

            <script src="path/to/dojo.js"></script>




Wednesday, 7 December 2011
Writing AMD modules



Wednesday, 7 December 2011
Let’s take an example...



Wednesday, 7 December 2011
dojo.provide("org.test.widget");

       dojo.require("org.test.base");
       dojo.require("dijit._Widget");
       dojo.require("dijit._Templated");
       dojo.require("dojo.cache");

       dojo.declare("org.test.widget",
       [dijit._Widget, dijit._Templated, org.test.base], {
           templateString: dojo.cache("org.test.template", "Widget.html")
       });




Wednesday, 7 December 2011
dojo.provide("org.test.widget");

       dojo.require("org.test.base");
       dojo.require("dijit._Widget");
       dojo.require("dijit._Templated");
       dojo.require("dojo.cache");

       dojo.declare("org.test.widget",
       [dijit._Widget, dijit._Templated, org.test.base], {
           templateString: dojo.cache("org.test.template", "Widget.html")
       });




Wednesday, 7 December 2011
dojo.provide("org.test.widget");

       dojo.require("org.test.base");
       dojo.require("dijit._Widget");
       dojo.require("dijit._Templated");
       dojo.require("dojo.cache");

       dojo.declare("org.test.widget",
       [dijit._Widget, dijit._Templated, org.test.base], {
           templateString: dojo.cache("org.test.template", "Widget.html")
       });




Wednesday, 7 December 2011
dojo.provide("org.test.widget");

       dojo.require("org.test.base");
       dojo.require("dijit._Widget");
       dojo.require("dijit._Templated");
       dojo.require("dojo.cache");

       dojo.declare("org.test.widget",
       [dijit._Widget, dijit._Templated, org.test.base], {
           templateString: dojo.cache("org.test.template", "Widget.html")
       });




Wednesday, 7 December 2011
Let’s convert to AMD...



Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
Don’t




http://www.flickr.com/photos/trancemist/361935363/
Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);



                     (Optional) String used as module identifier
                               "org/widget/test"




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);



                     (Optional) String used as module identifier
                               "org/widget/test"




  * - Ignore for anonymous modules
Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);



                       (Optional) Array of module dependencies
                        ["org/widget/base", "dojo/json"]


                Resolved modules passed as factory arguments

Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
From the AMD API Specification




                “Loader plugins extend an AMD
                implementation by allowing loading
                of resources that are not traditional
                JavaScript dependencies.”




Wednesday, 7 December 2011
What can we load?

                              Internationalisation bundles
               “dojo/i18n!../nls/messages.json”




Wednesday, 7 December 2011
What can we load?

                                  Text bundles
                 “dojo/text!../tmpl/widget.html”




Wednesday, 7 December 2011
What can we load?

                Third-party plugins for CSS, Coffeescript,
                          LESS, Google Maps...




Wednesday, 7 December 2011
What can we load?

                Third-party plugins for CSS, Coffeescript,
                          LESS, Google Maps...

                               ...or just write your own!




Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);




                        “ function that should be executed to
                        instantiate the module or an object...”




Wednesday, 7 December 2011
From the AMD API Specification




                 define(id?, dependencies?, factory);




                        “ function that should be executed to
                        instantiate the module or an object...”



   * - Can also return an object
Wednesday, 7 December 2011
define([
       	 "org/test/base", "dijit/_Widget", "dijit/_Templated",
       	 "dojo/_base/declare", "dojo/text!../template/Widget.html"],
          function (base, _Widget, _Templated, declare, template) {

       	      	     return declare([base, _Widget, _Templated], {
                          templateString: template
                    	
                    });
                }
       );




Wednesday, 7 December 2011
Uses local arguments,
                     no need for globals


Wednesday, 7 December 2011
What about the
                               template?


Wednesday, 7 December 2011
Widget Template
               <div>
                   <label>First name</label>
                   <input dojoAttachPoint="first_name"
                         placeHolder="First name"
                         dojoType="dijit.form.TextBox">

                         <label>Second name</label>
                         <input dojoAttachPoint="second_name"
                               placeHolder="Second name"
                               dojoType="dijit.form.TextBox">

                   <button dojoAttachEvent="onClick:sendName"
                          dojoType="dijit.form.Button">
               </div>


Wednesday, 7 December 2011
Widget Template
               <div>
                   <label>First name</label>
                   <input dojoAttachPoint="first_name"
                         placeHolder="First name"
                         dojoType="dijit.form.TextBox">

                         <label>Second name</label>
                         <input dojoAttachPoint="second_name"
                               placeHolder="Second name"
                               dojoType="dijit.form.TextBox">

                   <button dojoAttachEvent="onClick:sendName"
                          dojoType="dijit.form.Button">
               </div>

                             Non-standard HTML attributes
Wednesday, 7 December 2011
HTML5 Data Attributes



Wednesday, 7 December 2011
HTML5 Data Attributes
           dojoAttachPoint    data-dojo-attach-point

           dojoAttachEvent    data-dojo-attach-event

                   dojoType      data-dojo-type

        custom widget attr       data-dojo-props

                 dojoConfig       data-dojo-config



Wednesday, 7 December 2011
Widget Template
               <div>
                   <label>First name</label>
                   <input data-dojo-attach-point="first_name"
                         data-dojo-props="placeHolder:First Name"
                         data-dojo-type="dijit.form.TextBox">

                         <label>Second name</label>
                         <input data-dojo-attach-point="first_name"
                               data-dojo-props="placeHolder:Second Name"
                               data-dojo-type="dijit.form.TextBox">

                   <button dojo-dojo-attach-point="onClick:sendName"
                          data-dojo-type="dijit.form.Button">
               </div>


Wednesday, 7 December 2011
What if I’m not defining
                      modules?


Wednesday, 7 December 2011
Let’s take an example...



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="parseOnLoad: true"></script>

       <script>
       dojo.require("dijit.form.Form");
       dojo.require("dijit.form.TextBox");
       dojo.require("dijit.form.Button");

       dojo.ready({
           dojo.query("input").forEach(function () {...});
           dojo.connect(dojo.byId("send"), "onclick", function (){...});
       });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="parseOnLoad: true"></script>

       <script>
       dojo.require("dijit.form.Form");
       dojo.require("dijit.form.TextBox");
       dojo.require("dijit.form.Button");

       dojo.ready({
           dojo.query("input").forEach(function () {...});
           dojo.connect(dojo.byId("send"), "onclick", function (){...});
       });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="parseOnLoad: true"></script>

       <script>
       dojo.require("dijit.form.Form");
       dojo.require("dijit.form.TextBox");
       dojo.require("dijit.form.Button");

       dojo.ready({
           dojo.query("input").forEach(function () {...});
           dojo.connect(dojo.byId("send"), "onclick", function (){...});
       });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="parseOnLoad: true"></script>

       <script>
       dojo.require("dijit.form.Form");
       dojo.require("dijit.form.TextBox");
       dojo.require("dijit.form.Button");

       dojo.ready({
           dojo.query("input").forEach(function () {...});
           dojo.connect(dojo.byId("send"), "onclick", function (){...});
       });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="parseOnLoad: true"></script>

       <script>
       dojo.require("dijit.form.Form");
       dojo.require("dijit.form.TextBox");
       dojo.require("dijit.form.Button");

       dojo.ready({
           dojo.query("input").forEach(function () {...});
           dojo.connect(dojo.byId("send"), "onclick", function (){...});
       });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>



Wednesday, 7 December 2011
Let’s convert to AMD



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
NOT in the AMD API Specification




                      require(dependencies?, callback);




Wednesday, 7 December 2011
NOT in the AMD API Specification




                      require(dependencies?, callback);




                    “... implementation-dependent API that will kick
                    off module loading.”

                https://github.com/amdjs/amdjs-api/wiki/require

Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
NOT in the AMD API Specification




                      require(dependencies?, callback);



                       (Optional) Array of module dependencies
                        ["org/widget/base", "dojo/json"]


                Resolved modules passed as factory arguments

Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
NOT in the AMD API Specification




                      require(dependencies?, callback);




                        “...once all the modules are available,
                        the function callback is executed.”


               Resolved modules passed as callback arguments

Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
No global references...



Wednesday, 7 December 2011
<script src="dojo.js" dojoConfig="async: true, parseOnLoad: true">
       </script>

       <script>
       require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready",
       	 	      "dojo/parser", "dijit/form/Form", "dijit/form/TextBox",
       	 	      "dijit/form/Button"],

           function (query, on, dom, ready) {
               ready(function () {
                   query("input").forEach(function () {...});
                   on(dom.byId("send"), "click", function (){...});
               });
           });
       </script>

       <form dojoType="dijit.form.Form">
           <label>First Name:</label>
           <input dojoType="dijit.form.TextBox">
           ...
           <button dojoType="dijit.form.Button">
       </form>

Wednesday, 7 December 2011
...only load modules we
                       actually use


Wednesday, 7 December 2011
What about the new stuff?




http://www.flickr.com/photos/fcrippa/3401571934
Wednesday, 7 December 2011
Dojo Mobile




 http://www.flickr.com/photos/dominiksyka-photography/4334590250
Wednesday, 7 December 2011
Dojo Mobile




                             Lightweight set of Mobile UI widgets
Wednesday, 7 December 2011
Dojo Mobile




                       Blackberry        iPhone      Android



              Device-specific or device-neutral themes available
Wednesday, 7 December 2011
Dojo Mobile Showcase




Wednesday, 7 December 2011
dGrid: Next
                  Generation Dojo Grid




Wednesday, 7 December 2011
Small, fast and light

                  •     < 30KB minified, <80KB
                        with dependencies

                  •     6 - 10x faster that
                        DataGrid

                  •     Pluggable modules

                  •     Mobile device support

                  •     Customisable with CSS

Wednesday, 7 December 2011
Wednesday, 7 December 2011
There’s lots more...
                  •     AMD Module format       •   Touch events support

                  •     New Loader              •   Gauges & Charting

                  •     New Build system        •   Data Stores

                  •     Better Mobile support   •   MVC support

                  •     Feature detection       •   Slim-line widgets

                  •     Improved Grid           •   Dojo Package Repo

                  •     and much more...        •   and much more....

Wednesday, 7 December 2011
Before getting started...



Wednesday, 7 December 2011
Wednesday, 7 December 2011
Dojo 1.7 provides early
                            access to 2.0 features...




                 Start “future proofing” your
                       application today
http://www.flickr.com/photos/9948354@N08/763399258
Wednesday, 7 December 2011

Weitere ähnliche Inhalte

Was ist angesagt?

How dojo works
How dojo worksHow dojo works
How dojo worksAmit Tyagi
 
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Endava
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Rich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitRich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitalexklaeser
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the CloudJames Thomas
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks TriviaCognizant
 
XPages Binary Output
XPages Binary OutputXPages Binary Output
XPages Binary OutputJohnFoldager
 
jQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and BlingjQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and BlingDoug Neiner
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastGabriel Hamilton
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQueryDoug Neiner
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit RenderingAriya Hidayat
 
Why and How to Use Virtual DOM
Why and How to Use Virtual DOMWhy and How to Use Virtual DOM
Why and How to Use Virtual DOMDaiwei Lu
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQueryAngel Ruiz
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterpriseDave Artz
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSMartin Hochel
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoiddmethvin
 

Was ist angesagt? (20)

Dojo toolkit
Dojo toolkitDojo toolkit
Dojo toolkit
 
How dojo works
How dojo worksHow dojo works
How dojo works
 
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Rich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitRich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkit
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the Cloud
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
The jQuery Library
The  jQuery LibraryThe  jQuery Library
The jQuery Library
 
XPages Binary Output
XPages Binary OutputXPages Binary Output
XPages Binary Output
 
jQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and BlingjQuery: Nuts, Bolts and Bling
jQuery: Nuts, Bolts and Bling
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
Contextual jQuery
Contextual jQueryContextual jQuery
Contextual jQuery
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
 
Why and How to Use Virtual DOM
Why and How to Use Virtual DOMWhy and How to Use Virtual DOM
Why and How to Use Virtual DOM
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
 
jQuery Features to Avoid
jQuery Features to AvoidjQuery Features to Avoid
jQuery Features to Avoid
 

Ähnlich wie Moving to Dojo 1.7 and the path to 2.0

Custom Android Code Templates
Custom Android Code TemplatesCustom Android Code Templates
Custom Android Code Templatesmurphonic
 
So, you think you know widgets.
So, you think you know widgets.So, you think you know widgets.
So, you think you know widgets.danielericlee
 
MongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignMongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignDATAVERSITY
 
Behat dpc12
Behat dpc12Behat dpc12
Behat dpc12benwaine
 
Flowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock
 
Frozen Rails Slides
Frozen Rails SlidesFrozen Rails Slides
Frozen Rails Slidescarllerche
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started TodayGabriel Hamilton
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPACheng Ta Yeh
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneDeepu S Nath
 
Deploying on the cutting edge
Deploying on the cutting edgeDeploying on the cutting edge
Deploying on the cutting edgeericholscher
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDBYnon Perek
 
Organized web app development using backbone.js
Organized web app development using backbone.jsOrganized web app development using backbone.js
Organized web app development using backbone.jsShakti Shrestha
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks ComparisonDeepu S Nath
 
Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Leonardo Borges
 
A Look at the Future of HTML5
A Look at the Future of HTML5A Look at the Future of HTML5
A Look at the Future of HTML5Tim Wright
 

Ähnlich wie Moving to Dojo 1.7 and the path to 2.0 (20)

Node at artsy
Node at artsyNode at artsy
Node at artsy
 
Custom Android Code Templates
Custom Android Code TemplatesCustom Android Code Templates
Custom Android Code Templates
 
So, you think you know widgets.
So, you think you know widgets.So, you think you know widgets.
So, you think you know widgets.
 
MongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema DesignMongoDB at Sailthru: Scaling and Schema Design
MongoDB at Sailthru: Scaling and Schema Design
 
Test02
Test02Test02
Test02
 
Behat dpc12
Behat dpc12Behat dpc12
Behat dpc12
 
Flowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDB
 
Everyday - mongodb
Everyday - mongodbEveryday - mongodb
Everyday - mongodb
 
Frozen Rails Slides
Frozen Rails SlidesFrozen Rails Slides
Frozen Rails Slides
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started Today
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
 
Deploying on the cutting edge
Deploying on the cutting edgeDeploying on the cutting edge
Deploying on the cutting edge
 
HTML5 and Sencha Touch
HTML5 and Sencha TouchHTML5 and Sencha Touch
HTML5 and Sencha Touch
 
Pocket Knife JS
Pocket Knife JSPocket Knife JS
Pocket Knife JS
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
Organized web app development using backbone.js
Organized web app development using backbone.jsOrganized web app development using backbone.js
Organized web app development using backbone.js
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks Comparison
 
Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011)
 
A Look at the Future of HTML5
A Look at the Future of HTML5A Look at the Future of HTML5
A Look at the Future of HTML5
 

Kürzlich hochgeladen

React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 

Kürzlich hochgeladen (20)

React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 

Moving to Dojo 1.7 and the path to 2.0

  • 1. Moving to Dojo 1.7 ...and the path to 2.0 http://www.flickr.com/photos/jenik/4836118314/ Wednesday, 7 December 2011
  • 2. Me. @thomasj Wednesday, 7 December 2011
  • 6. Lots has changed... • AMD Module format • Touch events support • New Loader • Gauges & Charting • New Build system • Data Stores • Better Mobile support • MVC support • Feature detection • Slim-line widgets • Improved Grid • Dojo Package Repo • and much more... • and much more.... Wednesday, 7 December 2011
  • 9. API compatibility until 2.0* * - There may be some exceptions Wednesday, 7 December 2011
  • 10. What’s AMD? Wednesday, 7 December 2011
  • 11. “Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded” Wednesday, 7 December 2011
  • 12. What’s new about that? Wednesday, 7 December 2011
  • 13. “Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded” Wednesday, 7 December 2011
  • 16. AMD Support Wednesday, 7 December 2011
  • 17. AMD Support Toolkits: JQuery 1.7+ Dojo 1.7+ MooTools 2.0+ Wednesday, 7 December 2011
  • 18. AMD Support Firebug 1.8+ http://www.flickr.com/photos/phil-jackson/3624102329/in/photostream Wednesday, 7 December 2011
  • 19. AMD Support ...also seen in the BBC iPlayer http://www.flickr.com/photos/phil-jackson/3624102329/in/photostream Wednesday, 7 December 2011
  • 20. Dojo 1.7 - “Nano” http://www.flickr.com/photos/argonne/4703475086 Wednesday, 7 December 2011
  • 21. http://www.flickr.com/photos/obiwanjr/5313551313 Dojo gives you lots of “blocks” Wednesday, 7 December 2011
  • 22. The Dojo Toolkit Dojo Dijit DojoX Wednesday, 7 December 2011
  • 23. The Dojo Toolkit Dojo Core Dijit DojoX Base Wednesday, 7 December 2011
  • 24. The Dojo Toolkit Dojo Core Dijit DojoX Base Base modules are always loaded Wednesday, 7 December 2011
  • 25. NodeList.js array.js connect.js event.js html.js lang.js query.js xhr.js Deferred.js _loader browser.js declare.js fx.js json.js query-sizzle.js window.js Color.js ~32KB gzip+minified Wednesday, 7 December 2011
  • 26. http://www.flickr.com/photos/obiwanjr/5313551313 Do we always need them? Wednesday, 7 December 2011
  • 28. “Base-less” Dojo Just the AMD loader by default.... only load what you need http://www.flickr.com/photos/redux/4297873805/ < 4KB gzip+minified Wednesday, 7 December 2011
  • 30. Non-AMD loader <script src="path/to/dojo.js"></script> Wednesday, 7 December 2011
  • 31. Configuration Flag async: {true|false} Wednesday, 7 December 2011
  • 32. Enabling AMD loader <script src="path/to/dojo.js"></script> "async:true" <script data-dojo-config="async:true" src="path/to/dojo.js"></script> Wednesday, 7 December 2011
  • 33. Enabling AMD loader <script> var dojoConfig = { async:true }; </script> <script src="path/to/dojo.js"></script> Wednesday, 7 December 2011
  • 35. Let’s take an example... Wednesday, 7 December 2011
  • 36. dojo.provide("org.test.widget"); dojo.require("org.test.base"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.cache"); dojo.declare("org.test.widget", [dijit._Widget, dijit._Templated, org.test.base], { templateString: dojo.cache("org.test.template", "Widget.html") }); Wednesday, 7 December 2011
  • 37. dojo.provide("org.test.widget"); dojo.require("org.test.base"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.cache"); dojo.declare("org.test.widget", [dijit._Widget, dijit._Templated, org.test.base], { templateString: dojo.cache("org.test.template", "Widget.html") }); Wednesday, 7 December 2011
  • 38. dojo.provide("org.test.widget"); dojo.require("org.test.base"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.cache"); dojo.declare("org.test.widget", [dijit._Widget, dijit._Templated, org.test.base], { templateString: dojo.cache("org.test.template", "Widget.html") }); Wednesday, 7 December 2011
  • 39. dojo.provide("org.test.widget"); dojo.require("org.test.base"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojo.cache"); dojo.declare("org.test.widget", [dijit._Widget, dijit._Templated, org.test.base], { templateString: dojo.cache("org.test.template", "Widget.html") }); Wednesday, 7 December 2011
  • 40. Let’s convert to AMD... Wednesday, 7 December 2011
  • 41. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 43. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 44. From the AMD API Specification define(id?, dependencies?, factory); Wednesday, 7 December 2011
  • 45. From the AMD API Specification define(id?, dependencies?, factory); (Optional) String used as module identifier "org/widget/test" Wednesday, 7 December 2011
  • 46. From the AMD API Specification define(id?, dependencies?, factory); (Optional) String used as module identifier "org/widget/test" * - Ignore for anonymous modules Wednesday, 7 December 2011
  • 47. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 48. From the AMD API Specification define(id?, dependencies?, factory); (Optional) Array of module dependencies ["org/widget/base", "dojo/json"] Resolved modules passed as factory arguments Wednesday, 7 December 2011
  • 49. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 50. From the AMD API Specification “Loader plugins extend an AMD implementation by allowing loading of resources that are not traditional JavaScript dependencies.” Wednesday, 7 December 2011
  • 51. What can we load? Internationalisation bundles “dojo/i18n!../nls/messages.json” Wednesday, 7 December 2011
  • 52. What can we load? Text bundles “dojo/text!../tmpl/widget.html” Wednesday, 7 December 2011
  • 53. What can we load? Third-party plugins for CSS, Coffeescript, LESS, Google Maps... Wednesday, 7 December 2011
  • 54. What can we load? Third-party plugins for CSS, Coffeescript, LESS, Google Maps... ...or just write your own! Wednesday, 7 December 2011
  • 55. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 56. From the AMD API Specification define(id?, dependencies?, factory); “ function that should be executed to instantiate the module or an object...” Wednesday, 7 December 2011
  • 57. From the AMD API Specification define(id?, dependencies?, factory); “ function that should be executed to instantiate the module or an object...” * - Can also return an object Wednesday, 7 December 2011
  • 58. define([ "org/test/base", "dijit/_Widget", "dijit/_Templated", "dojo/_base/declare", "dojo/text!../template/Widget.html"], function (base, _Widget, _Templated, declare, template) { return declare([base, _Widget, _Templated], { templateString: template }); } ); Wednesday, 7 December 2011
  • 59. Uses local arguments, no need for globals Wednesday, 7 December 2011
  • 60. What about the template? Wednesday, 7 December 2011
  • 61. Widget Template <div> <label>First name</label> <input dojoAttachPoint="first_name" placeHolder="First name" dojoType="dijit.form.TextBox"> <label>Second name</label> <input dojoAttachPoint="second_name" placeHolder="Second name" dojoType="dijit.form.TextBox"> <button dojoAttachEvent="onClick:sendName" dojoType="dijit.form.Button"> </div> Wednesday, 7 December 2011
  • 62. Widget Template <div> <label>First name</label> <input dojoAttachPoint="first_name" placeHolder="First name" dojoType="dijit.form.TextBox"> <label>Second name</label> <input dojoAttachPoint="second_name" placeHolder="Second name" dojoType="dijit.form.TextBox"> <button dojoAttachEvent="onClick:sendName" dojoType="dijit.form.Button"> </div> Non-standard HTML attributes Wednesday, 7 December 2011
  • 64. HTML5 Data Attributes dojoAttachPoint data-dojo-attach-point dojoAttachEvent data-dojo-attach-event dojoType data-dojo-type custom widget attr data-dojo-props dojoConfig data-dojo-config Wednesday, 7 December 2011
  • 65. Widget Template <div> <label>First name</label> <input data-dojo-attach-point="first_name" data-dojo-props="placeHolder:First Name" data-dojo-type="dijit.form.TextBox"> <label>Second name</label> <input data-dojo-attach-point="first_name" data-dojo-props="placeHolder:Second Name" data-dojo-type="dijit.form.TextBox"> <button dojo-dojo-attach-point="onClick:sendName" data-dojo-type="dijit.form.Button"> </div> Wednesday, 7 December 2011
  • 66. What if I’m not defining modules? Wednesday, 7 December 2011
  • 67. Let’s take an example... Wednesday, 7 December 2011
  • 68. <script src="dojo.js" dojoConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.form.Form"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.ready({ dojo.query("input").forEach(function () {...}); dojo.connect(dojo.byId("send"), "onclick", function (){...}); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 69. <script src="dojo.js" dojoConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.form.Form"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.ready({ dojo.query("input").forEach(function () {...}); dojo.connect(dojo.byId("send"), "onclick", function (){...}); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 70. <script src="dojo.js" dojoConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.form.Form"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.ready({ dojo.query("input").forEach(function () {...}); dojo.connect(dojo.byId("send"), "onclick", function (){...}); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 71. <script src="dojo.js" dojoConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.form.Form"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.ready({ dojo.query("input").forEach(function () {...}); dojo.connect(dojo.byId("send"), "onclick", function (){...}); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 72. <script src="dojo.js" dojoConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.form.Form"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.ready({ dojo.query("input").forEach(function () {...}); dojo.connect(dojo.byId("send"), "onclick", function (){...}); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 73. Let’s convert to AMD Wednesday, 7 December 2011
  • 74. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 75. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 76. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 77. NOT in the AMD API Specification require(dependencies?, callback); Wednesday, 7 December 2011
  • 78. NOT in the AMD API Specification require(dependencies?, callback); “... implementation-dependent API that will kick off module loading.” https://github.com/amdjs/amdjs-api/wiki/require Wednesday, 7 December 2011
  • 79. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 80. NOT in the AMD API Specification require(dependencies?, callback); (Optional) Array of module dependencies ["org/widget/base", "dojo/json"] Resolved modules passed as factory arguments Wednesday, 7 December 2011
  • 81. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 82. NOT in the AMD API Specification require(dependencies?, callback); “...once all the modules are available, the function callback is executed.” Resolved modules passed as callback arguments Wednesday, 7 December 2011
  • 83. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 85. <script src="dojo.js" dojoConfig="async: true, parseOnLoad: true"> </script> <script> require(["dojo/query", "dojo/on", "dojo/dom", "dojo/ready", "dojo/parser", "dijit/form/Form", "dijit/form/TextBox", "dijit/form/Button"], function (query, on, dom, ready) { ready(function () { query("input").forEach(function () {...}); on(dom.byId("send"), "click", function (){...}); }); }); </script> <form dojoType="dijit.form.Form"> <label>First Name:</label> <input dojoType="dijit.form.TextBox"> ... <button dojoType="dijit.form.Button"> </form> Wednesday, 7 December 2011
  • 86. ...only load modules we actually use Wednesday, 7 December 2011
  • 87. What about the new stuff? http://www.flickr.com/photos/fcrippa/3401571934 Wednesday, 7 December 2011
  • 89. Dojo Mobile Lightweight set of Mobile UI widgets Wednesday, 7 December 2011
  • 90. Dojo Mobile Blackberry iPhone Android Device-specific or device-neutral themes available Wednesday, 7 December 2011
  • 92. dGrid: Next Generation Dojo Grid Wednesday, 7 December 2011
  • 93. Small, fast and light • < 30KB minified, <80KB with dependencies • 6 - 10x faster that DataGrid • Pluggable modules • Mobile device support • Customisable with CSS Wednesday, 7 December 2011
  • 95. There’s lots more... • AMD Module format • Touch events support • New Loader • Gauges & Charting • New Build system • Data Stores • Better Mobile support • MVC support • Feature detection • Slim-line widgets • Improved Grid • Dojo Package Repo • and much more... • and much more.... Wednesday, 7 December 2011
  • 98. Dojo 1.7 provides early access to 2.0 features... Start “future proofing” your application today http://www.flickr.com/photos/9948354@N08/763399258 Wednesday, 7 December 2011