SlideShare a Scribd company logo
1 of 37
Dojo Tutorial




            Girish Srivastava
Objective
 In this tutorial, we will learn everything about the dojo. After completing the
  tutorial you will be able to understand about Dojo framework.
 This Dojo tutorial covers:
           Introduction to DOJO
           Features of Dojo
           Why DOJO tool kit?
           DOJO tool kit Libraries
           Comparison between different tool kits
Introduction to Dojo
 What is Dojo?
  Dojo is JavaScript framework released as open
   source software. This JavaScript toolkit provides
   many components to develop rich internet
   applications.
  You can use Dojo toolkit to develop dynamic web
   applications. Dojo toolkit will put life in your web
   application and turn it into highly interactive
   application. You can turn your web application into
   desktop like web application.
  Dojo offers many widgets, utilities and ajax libraries
   to develop your application.
  Dojo is released under BSD or AFL license
Features of Dojo
 Dojo is based on HTML and JavaScript, so its easy for the
    developers to learn it fast.
   There is no requirement of learning new programming language.
    Just HTML and JavaScript knowledge if sufficient.
   Dojo provides higher abstraction layer to the programmer. So, it
    helps the programmers to develop powerful functions very easily.
   Dojo has already invented the wheels for the programmers and
    now programmers just have to use the Dojo api into their
    application
   Here is the list of components that comes along with Dojo
    framework:
   DOJO Tree
   DOJO Button
   DOJO Calendar control
   DOJO Grid
   DOJO List box
   and many more..
DOJO Core
What Is Dijit?
Benefits of Dojo Framework
 Dojo toolkit provides many widgets to develop the UI for
  web applications.
 Dojo is one of the robust ajax framework that can be
  used to develop enterprise grade application.
 Following are the benefits of Dojo.
      Associative arrays
      Loosely typed variables
      Regular expressions
      Objects and classes
      Highly evolved date, math, and string libraries
      W3C DOM support in the Dojo
Disadvantages of Dojo
 Developer depends on the browser support for
  the Dojo
 There is no way to hide the Dojo code in case of
  commercial application
JQuery versus Dojo versus YUI
               • JQuery
 Pros:
  - JQuery is the most popular one of them all.
  - It is very easy to use and to understand.
  - The core library is only 15Kb in size.
  - Their statement is: ‘The Write Less, Do More,
  Javascript Library’.
 Cons:
  - Hard to use with object oriented programming
  - JQuery supports plug-ins, but all these plug-ins are
  not verified.
  - JQuery is a library
•YUI(The Yahoo! User Interface
                 Library)
 Pros:
  - It is developed by Yahoo
  - Fully documented, with a great API browser
  - Very consistent and reliable
  - Also contains unit testing framework
  - YUI is a framework
 Cons:
  - Heavy page weight
  - Very few utility or helper functions/methods
  - Lacks the use of chaining methods together
• Dojo Toolkit
  Pros:
   - Debug your code in Firebug
   - Dojo integrated in Zend Framework
   - Hierarchical package system speeds loading
   - Dojo is a framework
  Cons:
   - Dojo fails in online documentation


When we compare these 3 libraries/frameworks, I found
the following which was quite useful.
http://selectors.turnwheel.com/slickspeed.php
 Based on these results, we can conclude that YUI is the
    slowest one. This is also the reason why we didn’t chose for
    YUI. Dojo and JQuery scores the best.
   Knowing that JQuery is the easiest to use and immense
    popular, Dojo has its advantage of being integrated in Zend
    Framework. Also, the difference in being a library or
    framework counts.
    - A library is about reusable functionalities, but a framework is
    about reusable behaviours
    - A library is something you call/inherit from your code, but
    framework is something that calls your code or provide
    services for your code
    - A library is a collection of components and classes, where
    framework is how abstract classes and components interact
    with each others
   Dojo is a framework and JQuery a library.
    JQuery is good for small websites where you want to achieve
    a ‘WOW’ factor in relative short time.
   But when you are building an application, you need a robust
Loading Dojo ToolKit
Install Dojo
 Downloading Dojo
  You can download the latest version of Dojo from its official
   site http://dojotoolkit.org/.
  Download the Dojo toolkit directly
   from http://dojotoolkit.org/download.
Remoting
(Ajax Application)
Dojo Hello World
<html>                                       dojo.addOnLoad(init);
<head>                                        </script>
                                             </head>
<title>button</title>
                                             <body bgcolor="#FFFFCC">
 <script type="text/javascript">             <p align="center"><font size="6"
 dojo.require("dojo.event.*");
 dojo.require("dojo.widget.*");              color="#800000">Welcome to Dojo
                                             Project</font></p>
 dojo.require("dojo.widget.Button");         <button dojoType="Button"
 function helloPressed()                     widgetId="helloButton"
 {
                                             onClick="helloPressed();">Hello
 alert('Click on the Hello World Button');
                                             World!</button>
 }                                           <br>
 function init()                             </body>
 {                                           </html>
 var helloButton = dojo.widget.byId('helloButton');
 dojo.event.connect(helloButton, 'onClick', 'helloPressed')
 }
 The above example we have created a button "Hello
  World!". To create a button in dojo you need to a Button
  Widget that contains three visual states as: mouseOut,
  mouseOver and mouseDown. To follow the following
  steps for creating a dojo button widget:
 <script type="text/javascript">
   // Load Dojo's code relating to widget managing
  functions
   dojo.require("dojo.widget.*");

  // Load Dojo's code relating to the Button widget
  dojo.require("dojo.widget.Button");
 </script>

 dojo.require("dojo.widget.*"): It instructs you to
 include the dojo widget (Not load all the widgets) for
 dojo.require("dojo.widget.Button"): This line instructs
  you to load the Dojo button widget. If you don't include
  this line, the markup code for the button would not be
  evaluated by Dojo upon loading, resulting in a plain
  HTML button instead of what you expect.
 Insert the following code into the HTML body:
 <button dojoType="Button" widgetId="helloButton"
   onClick="helloPressed();">Hello World!</button>
 The key attribute of this HTML element to notice is
  the dojoType attribute. This is responsible for instructing
  Dojo on how to process the element when the page is
  loading. In this case you will use abutton element for the
  button that is used to input element - Dojo will work with
  either as long as thedojoType attribute is present.
 widgetId="helloButton": This is replaced
    with id="helloButton" without the functionality
    being affected - Dojo's widget system is smart
    enough to convert regular idattributes to widgetId's
    if no widgetId` attribute is explicitly named.
   Connecting an Event to the Widget
   When you click the command button then it doing
    something? We specify an onClick event handler for
    the given command button.
   dojo.require("dojo.event.*");
   Above code we use "dojo.event.*" that includes all
    events functionality of Dojo
   Like This we can create can create different different
    examples.
   CheckBox …
   ComboBox…
Dojo tutorial
Dojo tutorial

More Related Content

Viewers also liked

The Dojo Toolkit An Introduction
The Dojo Toolkit   An IntroductionThe Dojo Toolkit   An Introduction
The Dojo Toolkit An IntroductionJeff Fox
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 
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 Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Refactoring legacy code: step-by-step examples
Refactoring legacy code: step-by-step examplesRefactoring legacy code: step-by-step examples
Refactoring legacy code: step-by-step examplesEndava
 
Practical training general for career services
Practical training general for career servicesPractical training general for career services
Practical training general for career servicesVickey Edge
 
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTH
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTHDIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTH
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTHEndava
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLAmit Tyagi
 
2016 Holiday Retail Tech Recap
2016 Holiday Retail Tech Recap2016 Holiday Retail Tech Recap
2016 Holiday Retail Tech RecapDynatrace
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentDynatrace
 

Viewers also liked (14)

The Dojo Toolkit An Introduction
The Dojo Toolkit   An IntroductionThe Dojo Toolkit   An Introduction
The Dojo Toolkit An Introduction
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 
Dojo
DojoDojo
Dojo
 
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
 
Dojo & HTML5
Dojo & HTML5Dojo & HTML5
Dojo & HTML5
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Refactoring legacy code: step-by-step examples
Refactoring legacy code: step-by-step examplesRefactoring legacy code: step-by-step examples
Refactoring legacy code: step-by-step examples
 
Ria with dojo
Ria with dojoRia with dojo
Ria with dojo
 
Practical training general for career services
Practical training general for career servicesPractical training general for career services
Practical training general for career services
 
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTH
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTHDIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTH
DIGITAL EVOLUTION: A SUSTAINABLE APPROACH TO DIGITAL BUSINESS GROWTH
 
Class Dojo
Class DojoClass Dojo
Class Dojo
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
2016 Holiday Retail Tech Recap
2016 Holiday Retail Tech Recap2016 Holiday Retail Tech Recap
2016 Holiday Retail Tech Recap
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 

Similar to Dojo tutorial

Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit Predhin Sapru
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastGabriel Hamilton
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slideshelenmga
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the CloudJames Thomas
 
Dojo Toolkit from a Flex developer's perspective
Dojo Toolkit from a Flex developer's perspectiveDojo Toolkit from a Flex developer's perspective
Dojo Toolkit from a Flex developer's perspectivecjolif
 
Easy joget v3 for the absolute beginner
Easy joget v3 for the absolute beginnerEasy joget v3 for the absolute beginner
Easy joget v3 for the absolute beginnermadengly
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPnsandonato
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Manoj Ellappan
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQueryAnil Kumar
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsRob Goris
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started TodayGabriel Hamilton
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overviewjeresig
 
Dojo mobile web5-2013
Dojo mobile web5-2013Dojo mobile web5-2013
Dojo mobile web5-2013cjolif
 

Similar to Dojo tutorial (20)

Dojo javascript toolkit
Dojo javascript toolkit Dojo javascript toolkit
Dojo javascript toolkit
 
Test02
Test02Test02
Test02
 
DOJO
DOJO DOJO
DOJO
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
Building Dojo in the Cloud
Building Dojo in the CloudBuilding Dojo in the Cloud
Building Dojo in the Cloud
 
Dojo Toolkit from a Flex developer's perspective
Dojo Toolkit from a Flex developer's perspectiveDojo Toolkit from a Flex developer's perspective
Dojo Toolkit from a Flex developer's perspective
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
 
Dojo1.0_Tutorials
Dojo1.0_TutorialsDojo1.0_Tutorials
Dojo1.0_Tutorials
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Easy joget v3 for the absolute beginner
Easy joget v3 for the absolute beginnerEasy joget v3 for the absolute beginner
Easy joget v3 for the absolute beginner
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTP
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace Widgets
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started Today
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
 
Dojo mobile web5-2013
Dojo mobile web5-2013Dojo mobile web5-2013
Dojo mobile web5-2013
 

More from Girish Srivastava (8)

My tableau
My tableauMy tableau
My tableau
 
IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)
 
Jquery
JqueryJquery
Jquery
 
Jscript part2
Jscript part2Jscript part2
Jscript part2
 
Extjs
ExtjsExtjs
Extjs
 
Jive
JiveJive
Jive
 
Jscript part1
Jscript part1Jscript part1
Jscript part1
 
Cgi
CgiCgi
Cgi
 

Recently uploaded

Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 

Recently uploaded (20)

Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 

Dojo tutorial

  • 1. Dojo Tutorial Girish Srivastava
  • 2. Objective  In this tutorial, we will learn everything about the dojo. After completing the tutorial you will be able to understand about Dojo framework.  This Dojo tutorial covers:  Introduction to DOJO  Features of Dojo  Why DOJO tool kit?  DOJO tool kit Libraries  Comparison between different tool kits
  • 3. Introduction to Dojo  What is Dojo?  Dojo is JavaScript framework released as open source software. This JavaScript toolkit provides many components to develop rich internet applications.  You can use Dojo toolkit to develop dynamic web applications. Dojo toolkit will put life in your web application and turn it into highly interactive application. You can turn your web application into desktop like web application.  Dojo offers many widgets, utilities and ajax libraries to develop your application.  Dojo is released under BSD or AFL license
  • 4.
  • 5. Features of Dojo  Dojo is based on HTML and JavaScript, so its easy for the developers to learn it fast.  There is no requirement of learning new programming language. Just HTML and JavaScript knowledge if sufficient.  Dojo provides higher abstraction layer to the programmer. So, it helps the programmers to develop powerful functions very easily.  Dojo has already invented the wheels for the programmers and now programmers just have to use the Dojo api into their application  Here is the list of components that comes along with Dojo framework:  DOJO Tree  DOJO Button  DOJO Calendar control  DOJO Grid  DOJO List box  and many more..
  • 6.
  • 7.
  • 8.
  • 11.
  • 12.
  • 13.
  • 14. Benefits of Dojo Framework  Dojo toolkit provides many widgets to develop the UI for web applications.  Dojo is one of the robust ajax framework that can be used to develop enterprise grade application.  Following are the benefits of Dojo.  Associative arrays  Loosely typed variables  Regular expressions  Objects and classes  Highly evolved date, math, and string libraries  W3C DOM support in the Dojo
  • 15. Disadvantages of Dojo  Developer depends on the browser support for the Dojo  There is no way to hide the Dojo code in case of commercial application
  • 16.
  • 17. JQuery versus Dojo versus YUI • JQuery  Pros: - JQuery is the most popular one of them all. - It is very easy to use and to understand. - The core library is only 15Kb in size. - Their statement is: ‘The Write Less, Do More, Javascript Library’.  Cons: - Hard to use with object oriented programming - JQuery supports plug-ins, but all these plug-ins are not verified. - JQuery is a library
  • 18. •YUI(The Yahoo! User Interface Library)  Pros: - It is developed by Yahoo - Fully documented, with a great API browser - Very consistent and reliable - Also contains unit testing framework - YUI is a framework  Cons: - Heavy page weight - Very few utility or helper functions/methods - Lacks the use of chaining methods together
  • 19. • Dojo Toolkit  Pros: - Debug your code in Firebug - Dojo integrated in Zend Framework - Hierarchical package system speeds loading - Dojo is a framework  Cons: - Dojo fails in online documentation When we compare these 3 libraries/frameworks, I found the following which was quite useful. http://selectors.turnwheel.com/slickspeed.php
  • 20.  Based on these results, we can conclude that YUI is the slowest one. This is also the reason why we didn’t chose for YUI. Dojo and JQuery scores the best.  Knowing that JQuery is the easiest to use and immense popular, Dojo has its advantage of being integrated in Zend Framework. Also, the difference in being a library or framework counts. - A library is about reusable functionalities, but a framework is about reusable behaviours - A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code - A library is a collection of components and classes, where framework is how abstract classes and components interact with each others  Dojo is a framework and JQuery a library.  JQuery is good for small websites where you want to achieve a ‘WOW’ factor in relative short time.  But when you are building an application, you need a robust
  • 21.
  • 22.
  • 23.
  • 24.
  • 26.
  • 27. Install Dojo  Downloading Dojo  You can download the latest version of Dojo from its official site http://dojotoolkit.org/.  Download the Dojo toolkit directly from http://dojotoolkit.org/download.
  • 28.
  • 29.
  • 31.
  • 32. Dojo Hello World <html> dojo.addOnLoad(init); <head> </script> </head> <title>button</title> <body bgcolor="#FFFFCC"> <script type="text/javascript"> <p align="center"><font size="6" dojo.require("dojo.event.*"); dojo.require("dojo.widget.*"); color="#800000">Welcome to Dojo Project</font></p> dojo.require("dojo.widget.Button"); <button dojoType="Button" function helloPressed() widgetId="helloButton" { onClick="helloPressed();">Hello alert('Click on the Hello World Button'); World!</button> } <br> function init() </body> { </html> var helloButton = dojo.widget.byId('helloButton'); dojo.event.connect(helloButton, 'onClick', 'helloPressed') }
  • 33.  The above example we have created a button "Hello World!". To create a button in dojo you need to a Button Widget that contains three visual states as: mouseOut, mouseOver and mouseDown. To follow the following steps for creating a dojo button widget:  <script type="text/javascript"> // Load Dojo's code relating to widget managing functions dojo.require("dojo.widget.*"); // Load Dojo's code relating to the Button widget dojo.require("dojo.widget.Button"); </script>  dojo.require("dojo.widget.*"): It instructs you to include the dojo widget (Not load all the widgets) for
  • 34.  dojo.require("dojo.widget.Button"): This line instructs you to load the Dojo button widget. If you don't include this line, the markup code for the button would not be evaluated by Dojo upon loading, resulting in a plain HTML button instead of what you expect.  Insert the following code into the HTML body:  <button dojoType="Button" widgetId="helloButton" onClick="helloPressed();">Hello World!</button>  The key attribute of this HTML element to notice is the dojoType attribute. This is responsible for instructing Dojo on how to process the element when the page is loading. In this case you will use abutton element for the button that is used to input element - Dojo will work with either as long as thedojoType attribute is present.
  • 35.  widgetId="helloButton": This is replaced with id="helloButton" without the functionality being affected - Dojo's widget system is smart enough to convert regular idattributes to widgetId's if no widgetId` attribute is explicitly named.  Connecting an Event to the Widget  When you click the command button then it doing something? We specify an onClick event handler for the given command button.  dojo.require("dojo.event.*");  Above code we use "dojo.event.*" that includes all events functionality of Dojo  Like This we can create can create different different examples.  CheckBox …  ComboBox…