using the dojo toolkit in a webworks application · using the dojo toolkit in a webworks...

19
Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations Dylan Schiemann Co-founder of Dojo Toolkit & CEO of SitePen Inc.

Upload: others

Post on 25-Dec-2019

28 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Using the Dojo Toolkit in a WebWorks application Michelle Mendoza

RIM Developer Relations

Dylan Schiemann

Co-founder of Dojo Toolkit & CEO of SitePen Inc.

Page 2: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Agenda

What is Dojo?

Using the Dojo Mobile package

Dojo Mobile Application Demos

Basic Code Walkthrough

Q&A

2

Page 3: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Dojo Toolkit

Build sophisticated Web apps

http://dojotoolkit.org/

Supports multiple browsers

Enables rapid development

Philosophy:

Push the limits (SVG, WebGL, HTML5)

Define & adopt defacto standards

Developer productivity & tools

Open, free & liberally licensed

Page 4: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Toolkit Components

Dojo – also known as “core”, AJAX, DOM manipulation, class-like programming, events

Dijit – extensive set of UI components known as widgets

DojoX – collection of packages and modules built upon Dojo core and Dijit

dojox/mobile

dojox/gfx

dojox/charting and many more

Util – utility scripts

Create optimized builds

DOH: Dojo Objective Harness 4

Page 5: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Dojo 1.8

Dojo 1.8 Improvements

Performance optimizations

New widgets added

175 sub-packages and 1400 modules

Much improved documentation

5

Page 6: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

AMD - Asynchronous Module Definition

6

Mechanism allows modules and dependencies to be loaded asynchronously

Asynchronous format reduces app loading time

Better performance, easier code handling

Only load the modules you require

Dojo has a lightweight AMD loader of < 4kb

Reduce page load time by up to 10x

Page 7: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Interactive Experience

Grid displays

Dynamic charts

Various Form Controls and Form Validators

Cross Platform graphics

Mapping using OpenLayers

Animated effects

Gauges

7

Page 8: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Interactive Experience

Dynamic charts

Many Styles

Many Colours

8

Page 9: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

OpenLayers Map

9

dojox.geo.openlayers

• Mapping component based on

OpenLayers library

• Open source

Page 10: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

dojox/mobile

Page 11: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

dojox/mobile

User interface optimized for mobile

Device specific UI controls and themes

Touch and gesture events

Transition effects

Business-friendly (charts, grids, gauges, etc)

Other common mobile features

11

Page 13: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Accordion View

13

Accordion View

• New in 1.8

• Works with tabbed views

• Various display modes

Page 14: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

ListItem

14

ListItem View

• Create views programmatically

• Various page loading methods

Page 15: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Carousel

15

Carousel View

Ideal for item selection/viewing

Grouped items

Page 16: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

Including the Dojo Loader

<script data-dojo-config="async:true"

src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"></script>

16

<script>

require([

"dojo/parser", // used to parse the page for widgets

"dojox/mobile", // mobile application

"dojox/mobile/deviceTheme"], // loads appropriate theme based on user agent*

function(parser) {

parser.parse(); // Parse the page for widgets and get them instantiated

});

</script>

Page 19: Using the Dojo Toolkit in a WebWorks application · Using the Dojo Toolkit in a WebWorks application Michelle Mendoza RIM Developer Relations ... Carousel 15 Carousel View Ideal for

THANK YOU

Michelle Mendoza

RIM Developer Relations

Dylan Schiemann

Co-founder of Dojo Toolkit & CEO of SitePen Inc.

October 16, 2012