Wiley 978-0-470-45202-8 Datasheet

Browse online or download Datasheet for Software manuals Wiley 978-0-470-45202-8. Wiley Concise Guide to Dojo User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 20
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Enhancing Development
with Dojo Core
This chapter shows the Dojo core of basic JavaScript language enhancements that provides the
foundation for all of the other tools and systems offered by the toolkit. But first, you learn how to
get a copy of Dojo, either from current releases or leading-edge development versions. Then, you are
taken on a tour through the basic packaging, markup declaration, and object-oriented programming
features.
Getting Dojo
It’s time to dig in and start playing with Dojo for yourself. There are several ways to do this, and
each way offers its own advantages.
Using Dojo via the AOL CDN
The easiest way to start using Dojo is by way of the AOL Content Delivery Network.
In short, the AOL CDN is a widely distributed and highly available network of web servers hosting
static assets — and among these assets are the code and collateral for the Dojo toolkit. What this
means is that you can get started using Dojo with an include like the following:
<script type="text/javascript"
src="http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js"></script>
This single JavaScript include will pull in an optimized build of the Dojo core, which is enough to
get you rolling thanks to the Dojo packaging system and dynamic module loading.
COPYRIGHTED MATERIAL
Page view 0
1 2 3 4 5 6 ... 19 20

Summary of Contents

Page 1 - COPYRIGHTED MATERIAL

Enhancing Developmentwith Dojo CoreThis chapter shows the Dojo core of basic JavaScript language enhancements that provides thefoundation for all of t

Page 2 - Sampling Dojo

Chapter 1: Enhancing Development with Dojo Coremeans that Dojo will orient itself with respect to relative paths from wherever you’ve installed Dojo a

Page 3 - Getting to Hello World

Chapter 1: Enhancing Development with Dojo CoreThis sets the base URL for all modules loaded with relative paths, which exclude those that are part of

Page 4

Chapter 1: Enhancing Development with Dojo CoregetName: function() {return this.name;}};Now, consider this functionally similar code from a module defi

Page 5 - Using Firebug

Chapter 1: Enhancing Development with Dojo CoreNow, consider the following code to see how you can override methods inherited from parentclasses:dojo.

Page 6

Chapter 1: Enhancing Development with Dojo CoreExtending Existing Classes with dojo.extend()Using multiple inheritance in declaring new classes with m

Page 7

Chapter 1: Enhancing Development with Dojo Core<script type="text/javascript">djConfig = {isDebug: true,parseOnLoad: true,modulePaths:

Page 8 - Examining Dojo Core

Chapter 1: Enhancing Development with Dojo CoreDefining a Class to Support Declaration in MarkupNow, check out this implementation for thedecafbad/thin

Page 9

Chapter 1: Enhancing Development with Dojo Corean anonymous function to each of them. The final parameter,this, causes the anonymous function toexecute

Page 10

Chapter 1: Enhancing Development with Dojo Coreconstructor because they’re not part of the class declaration. In other words, if the class didn’t ask

Page 11

Chapter 1: Enhancing Development with Dojo CoreWhen called, this method is responsible for creating and returning a new instance ofthisClass,andisfree

Page 12

Chapter 1: Enhancing Development with Dojo CoreDownloading the Latest Dojo ReleaseIf relying on someone else’s servers for a JS framework isn’t quite

Page 14 - Declaring Objects in Markup

Chapter 1: Enhancing Development with Dojo Core❑dijit/— Residing in this directory is Dijit, the Dojo widget system.❑dojox/— Under this path, you’ll fi

Page 15

Chapter 1: Enhancing Development with Dojo Coredojo.require("dijit.form.DateTextBox");dojo.require("dijit.form.NumberSpinner");doj

Page 16

Chapter 1: Enhancing Development with Dojo CoreUsing FirebugIn case you’ve never been introduced to it, Firebug is an invaluable Firefox extensionfor

Page 17

Chapter 1: Enhancing Development with Dojo CoreIn Figure 1-2, you can see an example of what all the preceding produces.Figure 1-2To reinforce the ide

Page 18

Chapter 1: Enhancing Development with Dojo CoreFigure 1-3Finally, it’s time to see a little bit of scripting make an appearance in the page:<label

Page 19

Chapter 1: Enhancing Development with Dojo CoreFigure 1-4eventually find it useful to tie into this system and build your own widgets and declaratively

Page 20

Chapter 1: Enhancing Development with Dojo Corewas done: Dots in the module names were replaced with slashes, a.jswas added, and a base URL prefixwas c

Comments to this Manuals

No comments