Slides from talk "Getting Started with Dojo Toolkit" at Cologne.JS in August 2010
some sample Dojo Code from my presentation is on http://code.google.com/p/dojodemo/
Cologne.JS is a local JavaScript user group: http://colognejs.de/
Scaling API-first â The story of a global engineering organization
Â
Getting Started with Dojo Toolkit
1. Getting started with
Dojo Toolkit
Cologne.js
User Group Meeting, Cologne (@cowoco)
Thomas Koch
(@tomy_koch)
10. August 2010
2. Dojo Toolkit: About
⢠Dojo is JS Framework
â Pure client-side JS (in contrast to GWT etc.)
â Includes Dev.Tools: build, test
â Open source, active community
http://www.dojotoolkit.org/
⢠Dojo features
â OO-style class based development
â Modularisation (via concept of packages)
â Support for data and GUI ď MVC
â Wide range of builtin widgets
10.08.2010 Thomas Koch 2
3. Dojo Toolkit: Features
⢠Development: APIs for robust Web Applications
â Event handling, DOM manipulation
â CSS Querying, Animations, âŚ
⢠Communication: Ajax and even more
â Data abstraction layer, JSON-RPC, Comet, XMPP etc.
⢠Integration: with many server-side developments
â including DWR, Django, TurboGears, Google, Jaxer âŚ
⢠User interface: re-usable gui components
â Standard gui widgets (button, slider, table, tree, menu âŚ)
â vector graphics, charting, âŚ
â theming, dragân drop, âŚ
â i18N, a11y
⢠Widely used: Dojo Widgets (aka Dijits)
10.08.2010 Thomas Koch 3
17. Dojo Core
⢠Extends Dojo Base Framework
â Contains everything from dojo-Namespace
that needs import, e.g. dojo.require(âdojo.dateâ)
⢠Important Components
â dojo.dnd: Drag and Drop
â dojo.i18n: Internationalization Utility
â dojo.rpc: Remote Procedure Calls with Backend Servers
â dojo.data: a uniform data access layer
⢠Furthermore containsâŚ
â dojo.fx: Effects library on top of Base animations
â dojo.gears: Google Gears
â dojo.io: Additional AJAX I/O transports
â dojo.html: Inserting contents in HTML nodes
â Misc: dojo.currency, dojo.date, dojo.number, dojo.regexp etc.
Thomas Koch 10.08.2010 17
18. Dojo Unified Events
⢠Publish/Subscribe communication
⢠connect a function of your own to:
â a DOM event, such as when a link is clicked
â an event of an object, such as an animation starting
â a topic, which other objects can publish objects to
â function call of your own, such as bar();
⢠Methods
â dojo.[dis]connect(), dojo.publish, dojo.subscribe()
⢠Example var foo = dojo.byId("foo"); // anchor element
dojo.connect(foo, "onclick", function(evt) {
console.log("anchor clicked");
dojo.stopEvent(evt); //suppress navigation
10.08.2010 Thomas Koch 18
});
20. Dojo Documentation
⢠API Docs
â Online Documentation : http://dojotoolkit.org/api/
⢠Dojo Campus
â Articles, Tutorials, Feature Explorer ⌠http://dojocampus.org
⢠Blogs
â Dojo Project Blog
⢠http://dojotoolkit.org/blog/
â SitePen Blog
⢠http://www.sitepen.com/blog
â Shane OâSullivanâs technical blog
⢠http://shaneosullivan.wordpress.com/
⢠Books
â Russell, Matthew A.
⢠Dojo: The Definitive Guide
â Riecke, C.; Gill, R.; Russell, A.
⢠Mastering Dojo:
â Zammetti, Frank
10.08.2010
⢠Practical Dojo Projects Thomas Koch 20
21. Dojo Performance
⢠Dojo Performs Better (DOM Manipulation!)
â Dojo is 1.5-2x faster than jQuery, and the difference is
biggest on the slowest browsers â where it counts most.
siehe TaskSpeed
â http://dante.dojotoolkit.org/taskspeed/
10.08.2010 Thomas Koch 21
22. Dojo Foundation
â http://www.dojofoundation.org/
â home of great open-source projects
â started as the home of
the Dojo Toolkit
â today the Dojo Foundation
is also home of other open
web projects including
cometD, DWR, OpenRecord,
Persevere, and Sizzle.
â Dojo Foundation Board
â vote per committer
10.08.2010 Thomas Koch 22