SlideShare a Scribd company logo
Fairfield Country JavaScript Meetup
       Wednesday Sept 26, 2012
About Jeff Fox

• Senior Software Engineer at [X+1]
• Self taught Web developer since 1997
• Also studied Art and Music Production
• Baseball enthusiast (ney fanatic)
• Twitter: @jfox015
Overview
• What is Dojo?

• Major components of the Dojo Toolkit

• Intro to [X+1] Origin

• Practical examples of Dojo usage in [X+1] Origin
  application

• Q&A
What is it?
What is Dojo?

• Powerful, feature rich JavaScript Toolkit

• Open Source and Community Driven

• One of the leading JS Frameworks along with
  Jquery, YUI, MooTools and Prototype

• Geared towards rapid web app development
Who is behind Dojo?




• Non-profit organization

• Open source community committers

• Industry leading technologists
Who is backing Dojo?
Why use Dojo?
•   Modern Browser Support
•   Full feature Mobile library (Dojo 1.7+)
•   Package Based
•   oAuth compatible
•   XMPP
•   2D and 3D FX Library
•   Namespaced, so it won’t conflict with
    other libraries.
Important support milestones
• IBM and Sun (now Oracle) announce support
  and contribute code

• Zend Technologies enters a partnership to
  integrate Dojo into the Zend Framework
Dojo Architecture
Dojo and Dojo Core
Calling Dojo

Local
<script type="text/javascript"
 src=“js/dojo/dojo.js"></script>
Google API
<script
 src="http://ajax.googleapis.com
 /ajax/libs/dojo/1.6.0/dojo/dojo
 .xd.js"></script>
Dojo Base
• Dojo.js – 90kb compressed (v 1.6.1)

• Initializes Dojo Bootstrap

• Built in host detection

• Class Package System
• Query, DOM, Ajax, Events, FX, Mobile
djConfig

<script type="text/javascript"
 src=“js/dojo/dojo.js“ data-
 dojo-config="isDebug: true,
 parseOnLoad: true"></script>

• Uses Firebug(if installed). Firebug Lite included
  if not
• Send messages via console.*()
Dojo Packages
• Include additional classes using dojo.require()
  – dojo.require(“dojo.store.Cache”);
  – Resolves to “pathtojs/dojo/store/Cache.js”
• Register and reuse a non-standard module
  path
  – dojo.registerModulePath(‘path2’,’a
    pth/to/js’);
  – dojo.require(“path2.ModuleName”);
Browser Detection
• Built in detection for modern browsers and
  technologies
•   dojo.isMoz           •   dojo.isKhtml
•   dojo.isFF            •   dojo.isWebKit
•   dojo.isIE            •   dojo.isSafari
•   dojo.isAIR           •   dojo.isChrome
•   dojo.isOpera         •   dojo.isQuirks
Classes and Inheritance
  • dojo.declare()
         – “Foundation of class creation. Allows for multiple
           inheritance to create flexible code and avoid
           writing the same code routines.” *


  dojo.declare("myClass",null,{
      // Custom code here
  });
* Source Classy JavaScript with dojo.declare, David Walsh
Classes and Inheritance
  • dojo.extend()
         – Add functionality and values to classes
  dojo.extend(myClass,{
      showUpper: function (msg) 
   { this.say(msg.toUpperCase()}; 
   }
  });
  var myc = new myClass();
  myc.showUpper(“hello”);
* Source Classy JavaScript with dojo.declare, David Walsh
Cool and useful functions
• dojo.mixin()
  – Utility function for mixing together objects
  – Powerful yet sometimes confusing function
  – Similar to extend(), but only works on objects


var objOne = { a: "first", b: 
 "second"}; 
dojo.mixin(objOne ,{c: ”Third”}});
Cool and useful functions
• dojo.hitch()
  – Utility function for simplifying context bindings
  – Creates a new function bound to a specific context
  – Can safely invoke without worrying about context
    changes
var myObject = { foo: "baz" }; 
var boundFunction = 
 dojo.hitch(myObject, function()
 {return "bar";});
Cool and useful functions
• dojo.query()
  – Uses familiar CSS queries (which you use in your
    stylesheets) to retrieve a list of nodes, including
    support for advanced CSS3 selectors
dojo.query(".odd").forEach(function
 (node, index, nodelist){
    dojo.addClass(node, "red");
});
More helpful DOM Functions
• dojo.byId()
  – Retrieve elements by DOM node id
• dojo.body()
  – Retrieve the HTML body element
• dojo.create()
• dojo.place()
• dojo.destroy()
  – Add and remove DOM nodes
Manipulate DOM nodes
• dojo.attr()
  – Get and set node attributes
• dojo.style()
  – Allows access to read and manipulate CSS styles.

<div id="poorboy3"></div>
<script type="dojo/method”>
dojo.style("poorboy3", "color", "red");
</script>
Events Support
• dojo.connect()
• dojo.disconnect()
  – Add event handling to objects
• dojo.subscribe()
• dojo.publish()
• dojo.unsubscribe()
  – Subscribe to and broadcast custom object events
Ajax
• dojo.xhr()
• dojo.xhrGet()
• dojo.xhrPost()
  – Standardized Ajax functionality
• dojo.Deferred()
  – Powerful tool for handling asynchronous operations
  – Deferred.then() allows for handling of both successful
    and error responses
• dojo. DeferredList() – Handle multiple Deferred
FX
• dojo.fadeIn()
• dojo.fadeOut()
  – Easy fade handlers
• dojo.animateProperty()
  – Animate a node according to set parameters
Dojo Core
• dojo.data                  • Utilities
   – Unified Data API           – dojo.string
• dojo.dnd                      – dojo.date
   – Drag and Drop Support      – dojo.regexp
• dojo.fx                    • I/O
   – Advanced FX Library        – dojo.io.iframe
• dojo.i18n                     – dojo.io.script
   – Internationalization       – dojo.rpc
• OpenAjax                   • dojo.back
                                – Browser History
Dijit
What is Dijit?
• Dojo Widget and Component Library
• Large library of prebuilt and tested widgets
  – Form Element Library
     • Buttons, select boxes, inputs, radios, checkboxes, etc.
  – Layout Widgets
     • Content Pan, Accordians, tabbed containers, stacks, etc
  – Experience Widgets
     • Tree, progress bar, dialogs, tooltips, menus, advanced
       text boxes
What is Dijit?
• Fully accessible
• Built in Template Support
  – Can utilize external HTML Templates when
    building dojo widgets
• Theme Support
  – Tundra, Soria, Nihilo, Noir
Declarative Instantiations
• Can declare a DOM element as a Dijit Widget
  by means of dojoType
  – For v 1.7 and up, it is now dojo-type

<textarea dojoAttachPoint="campNotes" 
  name="campNotes" 
  dojoType="dijit.form.Textarea" 
  class="campNotes"></textarea>
Programmatic Instantiations
• Create new Dijit Widgets via JS new and place
  or insert into HTML output
var mts = new 
  dijit.form.MultiSelect({ multip
  le: 'multiple', size: 10, name: 
  ‘costsList' }, this.formNode);
Widget Lifecycle
•   constructor()
•   postMixInProperties()
•   buildRendering()
•   postCreate()
•   startup()
Dijit Shortcuts
• Form. get(“value”)
  – Automatically access the values of all form
    elements that have a value attribute
  – Use dojo.mixin() to further add form data for
    submission
  – Use dojo.hitch() to add additional form validation
    and error handling
Helpful Layout Widgets
•   BorderContainer
•   ContentPane
•   LinkPane
•   TabContainer
•   AccordianContainer
•   SplitContainer
•   StackContainer
DojoX
What is DojoX
• DojoX is the Dojo breeding or playground.
• Contains widgets, classes and utilities that are
  not yet deemed ready for inclusion in the
  main Dojo library
• Contains experimental widgets and elements,
  most notable being the Dojo Grid widget
What’s in DojoX?
•   Analytics           •   I/O
•   Charting            •   More Data Stores
•   CometD              •   Language
•   Drawing             •   Layout
•   Editors             •   Mobile(!)
•   More Form Widgets   •   Testing
•   The Grid            •   Widgets
•   2D/3D gFx           •   XMPP
Dojo Mobile
Dojo Mobile
• Device ready Dojo JS library
• Pre-Built Themes for iOS and Android
• Leverage existing Dojo knowledge when
  building for mobile devices
Dojo Mobile Example
<div id="general" 
dojoType="dojox.mobile.View"><h1 
dojoType="dojox.mobile.Heading" 
back="Settings" moveTo="settings">General 
View</h1>
<ul dojoType="dojox.mobile.RoundRectList">
<li dojoType="dojox.mobile.ListItem" 
moveTo="about">
About
</li>
</ul>
</div>
Util
Dojo Util
• DOH – Built in Unit Testing Tool
Q&A
Ad

More Related Content

What's hot (18)

Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0
James Thomas
 
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
Endava
 
How dojo works
How dojo worksHow dojo works
How dojo works
Amit Tyagi
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
Andrew 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 toolkit
alexklaeser
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the Cloud
James Thomas
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
Cognizant
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
Paul Withers
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
Peter Higgins
 
XPages Binary Output
XPages Binary OutputXPages Binary Output
XPages Binary Output
JohnFoldager
 
How browser engines work?
How browser engines work?How browser engines work?
How browser engines work?
haricot
 
The jQuery Library
The  jQuery LibraryThe  jQuery Library
The jQuery Library
LearnNowOnline
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
jQuery-3-UI
jQuery-3-UIjQuery-3-UI
jQuery-3-UI
guestcf600a
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Alek Davis
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
jeresig
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
Anil Kumar
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
jeresig
 
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0
James Thomas
 
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
Endava
 
How dojo works
How dojo worksHow dojo works
How dojo works
Amit Tyagi
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
Andrew 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 toolkit
alexklaeser
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the Cloud
James Thomas
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
Cognizant
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
Paul Withers
 
XPages Binary Output
XPages Binary OutputXPages Binary Output
XPages Binary Output
JohnFoldager
 
How browser engines work?
How browser engines work?How browser engines work?
How browser engines work?
haricot
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Alek Davis
 
JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)JavaScript Library Overview (Ajax Exp West 2007)
JavaScript Library Overview (Ajax Exp West 2007)
jeresig
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
Anil Kumar
 
Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)Introduction to jQuery (Ajax Exp 2007)
Introduction to jQuery (Ajax Exp 2007)
jeresig
 

Viewers also liked (18)

Common Practices in Religion
Common Practices in ReligionCommon Practices in Religion
Common Practices in Religion
Stacey Troup
 
Certificate in hardware networking
Certificate in  hardware networkingCertificate in  hardware networking
Certificate in hardware networking
ignounict
 
Motor vehicle sale agreement
Motor vehicle sale agreementMotor vehicle sale agreement
Motor vehicle sale agreement
Manesa George
 
Effective intercultural communication
Effective intercultural communicationEffective intercultural communication
Effective intercultural communication
Alícia Bolíbar Manich
 
Significance of CAP accreditation
Significance of CAP accreditationSignificance of CAP accreditation
Significance of CAP accreditation
Bilal Al-kadri
 
Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)
Brian O'Neill
 
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
NAMSA
 
Types of Insurance Policies Owned by Singaporeans
Types of Insurance Policies Owned by SingaporeansTypes of Insurance Policies Owned by Singaporeans
Types of Insurance Policies Owned by Singaporeans
Chew Zhan Lun
 
Endowment Policy
Endowment PolicyEndowment Policy
Endowment Policy
Kiran Kurian Philip
 
Performance Management System in Bank Assignment Sample
Performance Management System in Bank Assignment SamplePerformance Management System in Bank Assignment Sample
Performance Management System in Bank Assignment Sample
Global Assignment Help
 
overview of banking sector & growth and structure
overview of banking sector & growth  and structureoverview of banking sector & growth  and structure
overview of banking sector & growth and structure
Anil Beniwal
 
Accounting Standard-3 Cash Flow Statement by Nithin Raj
Accounting Standard-3 Cash Flow Statement by Nithin RajAccounting Standard-3 Cash Flow Statement by Nithin Raj
Accounting Standard-3 Cash Flow Statement by Nithin Raj
Chinnu Raj
 
해킹 대회 리뷰 및 실전 해킹
해킹 대회 리뷰 및 실전 해킹해킹 대회 리뷰 및 실전 해킹
해킹 대회 리뷰 및 실전 해킹
totodeung
 
Ceph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross TurkCeph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross Turk
buildacloud
 
Second Grade Science: Plants
Second Grade Science: PlantsSecond Grade Science: Plants
Second Grade Science: Plants
KathyFiol
 
Effective Automation 〜変化に強い開発基盤〜
Effective Automation 〜変化に強い開発基盤〜Effective Automation 〜変化に強い開発基盤〜
Effective Automation 〜変化に強い開発基盤〜
Jumpei Miyata
 
Digital Marketing Strategic Framework
Digital Marketing Strategic FrameworkDigital Marketing Strategic Framework
Digital Marketing Strategic Framework
Janet Jaiswal
 
SCgame2
SCgame2SCgame2
SCgame2
Prafulla Kumar Shahi
 
Common Practices in Religion
Common Practices in ReligionCommon Practices in Religion
Common Practices in Religion
Stacey Troup
 
Certificate in hardware networking
Certificate in  hardware networkingCertificate in  hardware networking
Certificate in hardware networking
ignounict
 
Motor vehicle sale agreement
Motor vehicle sale agreementMotor vehicle sale agreement
Motor vehicle sale agreement
Manesa George
 
Significance of CAP accreditation
Significance of CAP accreditationSignificance of CAP accreditation
Significance of CAP accreditation
Bilal Al-kadri
 
Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)Ruby on Big Data (Cassandra + Hadoop)
Ruby on Big Data (Cassandra + Hadoop)
Brian O'Neill
 
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
ISO 10993-7 Biological Evaluation of Medical Devices - Ethylene Oxide Sterili...
NAMSA
 
Types of Insurance Policies Owned by Singaporeans
Types of Insurance Policies Owned by SingaporeansTypes of Insurance Policies Owned by Singaporeans
Types of Insurance Policies Owned by Singaporeans
Chew Zhan Lun
 
Performance Management System in Bank Assignment Sample
Performance Management System in Bank Assignment SamplePerformance Management System in Bank Assignment Sample
Performance Management System in Bank Assignment Sample
Global Assignment Help
 
overview of banking sector & growth and structure
overview of banking sector & growth  and structureoverview of banking sector & growth  and structure
overview of banking sector & growth and structure
Anil Beniwal
 
Accounting Standard-3 Cash Flow Statement by Nithin Raj
Accounting Standard-3 Cash Flow Statement by Nithin RajAccounting Standard-3 Cash Flow Statement by Nithin Raj
Accounting Standard-3 Cash Flow Statement by Nithin Raj
Chinnu Raj
 
해킹 대회 리뷰 및 실전 해킹
해킹 대회 리뷰 및 실전 해킹해킹 대회 리뷰 및 실전 해킹
해킹 대회 리뷰 및 실전 해킹
totodeung
 
Ceph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross TurkCeph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross Turk
buildacloud
 
Second Grade Science: Plants
Second Grade Science: PlantsSecond Grade Science: Plants
Second Grade Science: Plants
KathyFiol
 
Effective Automation 〜変化に強い開発基盤〜
Effective Automation 〜変化に強い開発基盤〜Effective Automation 〜変化に強い開発基盤〜
Effective Automation 〜変化に強い開発基盤〜
Jumpei Miyata
 
Digital Marketing Strategic Framework
Digital Marketing Strategic FrameworkDigital Marketing Strategic Framework
Digital Marketing Strategic Framework
Janet Jaiswal
 
Ad

Similar to The Dojo Toolkit An Introduction (20)

Dojo training
Dojo trainingDojo training
Dojo training
vadivelan_k
 
Getting Started with Dojo Toolkit
Getting Started with Dojo ToolkitGetting Started with Dojo Toolkit
Getting Started with Dojo Toolkit
Thomas Koch
 
Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)
Eugene Lazutkin
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
helenmga
 
Dojo GFX workshop slides
Dojo GFX workshop slidesDojo GFX workshop slides
Dojo GFX workshop slides
Eugene Lazutkin
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig
 
Test02
Test02Test02
Test02
testingPdf
 
Dojo and Zend Framework
Dojo and Zend  FrameworkDojo and Zend  Framework
Dojo and Zend Framework
Kuldeep Singh
 
Pulsar
PulsarPulsar
Pulsar
Eugene Lazutkin
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
Salvatore Fazio
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
Gabriel Hamilton
 
jQuery Learning
jQuery LearningjQuery Learning
jQuery Learning
Uzair Ali
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
DOJO
DOJO DOJO
DOJO
Mahi Mca
 
How to start developing apps for Firefox OS
How to start developing apps for Firefox OSHow to start developing apps for Firefox OS
How to start developing apps for Firefox OS
benko
 
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
 
JQuery-Tutorial
 JQuery-Tutorial JQuery-Tutorial
JQuery-Tutorial
tutorialsruby
 
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptxMicrosoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
tutorialsruby
 
jQuery-3-UI
jQuery-3-UIjQuery-3-UI
jQuery-3-UI
guestcf600a
 
Ios development
Ios developmentIos development
Ios development
Shakil Ahmed
 
Getting Started with Dojo Toolkit
Getting Started with Dojo ToolkitGetting Started with Dojo Toolkit
Getting Started with Dojo Toolkit
Thomas Koch
 
Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)
Eugene Lazutkin
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
helenmga
 
Dojo GFX workshop slides
Dojo GFX workshop slidesDojo GFX workshop slides
Dojo GFX workshop slides
Eugene Lazutkin
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig
 
Dojo and Zend Framework
Dojo and Zend  FrameworkDojo and Zend  Framework
Dojo and Zend Framework
Kuldeep Singh
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
Gabriel Hamilton
 
jQuery Learning
jQuery LearningjQuery Learning
jQuery Learning
Uzair Ali
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
How to start developing apps for Firefox OS
How to start developing apps for Firefox OSHow to start developing apps for Firefox OS
How to start developing apps for Firefox OS
benko
 
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
 
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptxMicrosoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
Microsoft PowerPoint - &lt;b>jQuery&lt;/b>-3-UI.pptx
tutorialsruby
 
Ad

Recently uploaded (20)

Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 

The Dojo Toolkit An Introduction

  • 1. Fairfield Country JavaScript Meetup Wednesday Sept 26, 2012
  • 2. About Jeff Fox • Senior Software Engineer at [X+1] • Self taught Web developer since 1997 • Also studied Art and Music Production • Baseball enthusiast (ney fanatic) • Twitter: @jfox015
  • 3. Overview • What is Dojo? • Major components of the Dojo Toolkit • Intro to [X+1] Origin • Practical examples of Dojo usage in [X+1] Origin application • Q&A
  • 5. What is Dojo? • Powerful, feature rich JavaScript Toolkit • Open Source and Community Driven • One of the leading JS Frameworks along with Jquery, YUI, MooTools and Prototype • Geared towards rapid web app development
  • 6. Who is behind Dojo? • Non-profit organization • Open source community committers • Industry leading technologists
  • 8. Why use Dojo? • Modern Browser Support • Full feature Mobile library (Dojo 1.7+) • Package Based • oAuth compatible • XMPP • 2D and 3D FX Library • Namespaced, so it won’t conflict with other libraries.
  • 9. Important support milestones • IBM and Sun (now Oracle) announce support and contribute code • Zend Technologies enters a partnership to integrate Dojo into the Zend Framework
  • 12. Calling Dojo Local <script type="text/javascript" src=“js/dojo/dojo.js"></script> Google API <script src="http://ajax.googleapis.com /ajax/libs/dojo/1.6.0/dojo/dojo .xd.js"></script>
  • 13. Dojo Base • Dojo.js – 90kb compressed (v 1.6.1) • Initializes Dojo Bootstrap • Built in host detection • Class Package System • Query, DOM, Ajax, Events, FX, Mobile
  • 14. djConfig <script type="text/javascript" src=“js/dojo/dojo.js“ data- dojo-config="isDebug: true, parseOnLoad: true"></script> • Uses Firebug(if installed). Firebug Lite included if not • Send messages via console.*()
  • 15. Dojo Packages • Include additional classes using dojo.require() – dojo.require(“dojo.store.Cache”); – Resolves to “pathtojs/dojo/store/Cache.js” • Register and reuse a non-standard module path – dojo.registerModulePath(‘path2’,’a pth/to/js’); – dojo.require(“path2.ModuleName”);
  • 16. Browser Detection • Built in detection for modern browsers and technologies • dojo.isMoz • dojo.isKhtml • dojo.isFF • dojo.isWebKit • dojo.isIE • dojo.isSafari • dojo.isAIR • dojo.isChrome • dojo.isOpera • dojo.isQuirks
  • 17. Classes and Inheritance • dojo.declare() – “Foundation of class creation. Allows for multiple inheritance to create flexible code and avoid writing the same code routines.” * dojo.declare("myClass",null,{     // Custom code here }); * Source Classy JavaScript with dojo.declare, David Walsh
  • 18. Classes and Inheritance • dojo.extend() – Add functionality and values to classes dojo.extend(myClass,{     showUpper: function (msg)  { this.say(msg.toUpperCase()};  } }); var myc = new myClass(); myc.showUpper(“hello”); * Source Classy JavaScript with dojo.declare, David Walsh
  • 19. Cool and useful functions • dojo.mixin() – Utility function for mixing together objects – Powerful yet sometimes confusing function – Similar to extend(), but only works on objects var objOne = { a: "first", b:  "second"};  dojo.mixin(objOne ,{c: ”Third”}});
  • 20. Cool and useful functions • dojo.hitch() – Utility function for simplifying context bindings – Creates a new function bound to a specific context – Can safely invoke without worrying about context changes var myObject = { foo: "baz" };  var boundFunction =  dojo.hitch(myObject, function() {return "bar";});
  • 21. Cool and useful functions • dojo.query() – Uses familiar CSS queries (which you use in your stylesheets) to retrieve a list of nodes, including support for advanced CSS3 selectors dojo.query(".odd").forEach(function (node, index, nodelist){ dojo.addClass(node, "red"); });
  • 22. More helpful DOM Functions • dojo.byId() – Retrieve elements by DOM node id • dojo.body() – Retrieve the HTML body element • dojo.create() • dojo.place() • dojo.destroy() – Add and remove DOM nodes
  • 23. Manipulate DOM nodes • dojo.attr() – Get and set node attributes • dojo.style() – Allows access to read and manipulate CSS styles. <div id="poorboy3"></div> <script type="dojo/method”> dojo.style("poorboy3", "color", "red"); </script>
  • 24. Events Support • dojo.connect() • dojo.disconnect() – Add event handling to objects • dojo.subscribe() • dojo.publish() • dojo.unsubscribe() – Subscribe to and broadcast custom object events
  • 25. Ajax • dojo.xhr() • dojo.xhrGet() • dojo.xhrPost() – Standardized Ajax functionality • dojo.Deferred() – Powerful tool for handling asynchronous operations – Deferred.then() allows for handling of both successful and error responses • dojo. DeferredList() – Handle multiple Deferred
  • 26. FX • dojo.fadeIn() • dojo.fadeOut() – Easy fade handlers • dojo.animateProperty() – Animate a node according to set parameters
  • 27. Dojo Core • dojo.data • Utilities – Unified Data API – dojo.string • dojo.dnd – dojo.date – Drag and Drop Support – dojo.regexp • dojo.fx • I/O – Advanced FX Library – dojo.io.iframe • dojo.i18n – dojo.io.script – Internationalization – dojo.rpc • OpenAjax • dojo.back – Browser History
  • 28. Dijit
  • 29. What is Dijit? • Dojo Widget and Component Library • Large library of prebuilt and tested widgets – Form Element Library • Buttons, select boxes, inputs, radios, checkboxes, etc. – Layout Widgets • Content Pan, Accordians, tabbed containers, stacks, etc – Experience Widgets • Tree, progress bar, dialogs, tooltips, menus, advanced text boxes
  • 30. What is Dijit? • Fully accessible • Built in Template Support – Can utilize external HTML Templates when building dojo widgets • Theme Support – Tundra, Soria, Nihilo, Noir
  • 31. Declarative Instantiations • Can declare a DOM element as a Dijit Widget by means of dojoType – For v 1.7 and up, it is now dojo-type <textarea dojoAttachPoint="campNotes"  name="campNotes"  dojoType="dijit.form.Textarea"  class="campNotes"></textarea>
  • 32. Programmatic Instantiations • Create new Dijit Widgets via JS new and place or insert into HTML output var mts = new  dijit.form.MultiSelect({ multip le: 'multiple', size: 10, name:  ‘costsList' }, this.formNode);
  • 33. Widget Lifecycle • constructor() • postMixInProperties() • buildRendering() • postCreate() • startup()
  • 34. Dijit Shortcuts • Form. get(“value”) – Automatically access the values of all form elements that have a value attribute – Use dojo.mixin() to further add form data for submission – Use dojo.hitch() to add additional form validation and error handling
  • 35. Helpful Layout Widgets • BorderContainer • ContentPane • LinkPane • TabContainer • AccordianContainer • SplitContainer • StackContainer
  • 36. DojoX
  • 37. What is DojoX • DojoX is the Dojo breeding or playground. • Contains widgets, classes and utilities that are not yet deemed ready for inclusion in the main Dojo library • Contains experimental widgets and elements, most notable being the Dojo Grid widget
  • 38. What’s in DojoX? • Analytics • I/O • Charting • More Data Stores • CometD • Language • Drawing • Layout • Editors • Mobile(!) • More Form Widgets • Testing • The Grid • Widgets • 2D/3D gFx • XMPP
  • 40. Dojo Mobile • Device ready Dojo JS library • Pre-Built Themes for iOS and Android • Leverage existing Dojo knowledge when building for mobile devices
  • 42. Util
  • 43. Dojo Util • DOH – Built in Unit Testing Tool
  • 44. Q&A