Dojo: The Definitive Guide. The Definitive Guide - Helion
ISBN: 978-05-965-5172-8
stron: 488, Format: ebook
Data wydania: 2008-06-17
Księgarnia: Helion
Cena książki: 118,15 zł (poprzednio: 137,38 zł)
Oszczędzasz: 14% (-19,23 zł)
Of all the Ajax-specific frameworks that have popped up in recent years, one clearly stands out as the industrial strength solution. Dojo is not just another JavaScript toolkit—it's the JavaScript toolkit—and Dojo: The Definitive Guide demonstrates how to tame Dojo's extensive library of utilities so that you can build rich and responsive web applications like never before. Dojo founder Alex Russell gives a foreword that explains the "why" of Dojo and of this book.
Dojo provides an end-to-end solution for development in the browser, including everything from the core JavaScript library and turnkey widgets to build tools and a testing framework. Its vibrant open source community keeps adding to Dojo's arsenal, and this book provides an ideal companion to Dojo's official documentation.
Dojo: the Definitive Guide gives you the most thorough overview of this toolkit available, showing you everything from how to create complex layouts and form controls closely resembling those found in the most advanced desktop applications with stock widgets, to advanced JavaScript idioms to AJAX and advanced communication transports. With this definitive reference you get:
- Get a concise introduction to Dojo that's good for all 1.x versions
- Well-explained examples, with scores of tested code samples, that let you see Dojo in action
- A comprehensive reference to Dojo's standard JavaScript library (including fundamental utilities in Base, Dojo's tiny but powerful kernel) that you'll wonder how you ever lived without
- An extensive look at additional Core features, such as animations, drag-and-drop, back-button handling, animations like wipe and slide, and more
- Exhaustive coverage of out-of-the-box Dijits (Dojo widgets) as well as definitive coverage on how to create your own, either from scratch or building on existing ones
- An itemized inventory of DojoX subprojects, the build tools, and the DOH, Dojo's unit-testing framework that you can use with Dojo—or anywhere else
If you're a DHTML-toting web developer, you need to read this book—whether you're a one-person operation or part of an organization employing scores of developers. Dojo packs the standard JavaScript library you've always wanted, and Dojo: The Definitive Guide helps you transform your ideas into working applications quickly by leveraging design concepts you already know.
Osoby które kupowały "Dojo: The Definitive Guide. The Definitive Guide", wybierały także:
- Zen Steve'a Jobsa 29,67 zł, (8,90 zł -70%)
- ASP.NET MVC. Kompletny przewodnik dla programistów interaktywnych aplikacji internetowych w Visual Studio 86,77 zł, (26,90 zł -69%)
- jQuery, jQuery UI oraz jQuery Mobile. Receptury 57,74 zł, (17,90 zł -69%)
- Scratch. Komiksowa przygoda z programowaniem 36,06 zł, (11,90 zł -67%)
- Baltie. Kurs video. Poziom pierwszy. Elementarz programowania w języku wizualnym 59,00 zł, (26,55 zł -55%)
Spis treści
Dojo: The Definitive Guide. The Definitive Guide eBook -- spis treści
- Dojo: The Definitive Guide
- SPECIAL OFFER: Upgrade this ebook with OReilly
- A Note Regarding Supplemental Files
- Foreword
- Preface
- Why Dojo?
- Whats in This Book
- What's Not in This Book
- Open Source Software Is Fluid
- About You
- Development Tools
- Essential Working Knowledge
- Closures
- Context
- Anonymous functions
- Conventions Used in This Book
- Style Conventions
- Using Code Examples
- Safari Books Online
- We'd Like to Hear from You
- Acknowledgments
- I. Base and Core
- 1. Toolkit Overview
- Overview of Dojo's Architecture
- Base
- Core
- Dijit
- DojoX
- Util
- Prepping for Development
- Getting Dojo
- Downloading an official release
- Downloading from Subversion
- AOL's CDN
- Debugging with Firebug
- Browser Security Settings for Running Dojo Locally
- Lightweight Server Responses
- Getting Dojo
- Terminology
- Bootstrapping
- dojo.addOnLoad
- Configuration with djConfig
- Exploring Dojo with Firebug
- Exploring Base
- dojo.byId
- dojo.connect
- Exploring Dijit
- Exploring Base
- Summary
- Overview of Dojo's Architecture
- 2. Language and Browser Utilities
- Looking Up DOM Nodes
- Type Checking
- Duck Typing
- String Utilities
- Array Processing
- Finding Locations of Elements
- Testing Elements for a Condition
- Iterating Over Elements
- Transforming Elements
- String-As-Function Style Arguments
- Managing Source Code with Modules
- Motivation for Managing the Mayhem
- Custom Module Example Over XDomain
- Fibonacci Example with Local Toolkit Installation
- Building a Magic Genie Example Module
- JavaScript Object Utilities
- Mixins
- Extending Object Prototypes
- Cloning Objects
- Manipulating Object Context
- Partially Applying Parameters
- Hitching an Object to a Specific Context
- Delegation and Inheritance
- DOM Utilities
- Ancestry
- Selectability
- Styling Nodes
- Manipulating Attributes
- Placing Nodes
- The Box Model
- Browser Utilities
- Cookies
- Back Button Handling
- Summary
- 3. Event Listeners and Pub/Sub Communication
- Event and Keyboard Normalization
- Mouse and Keyboard Event Normalization
- Standardized Key Codes
- Event Listeners
- Event Propagation
- Leveraging Closures with dojo.connect
- One-time connections
- Setting up connections within a loop
- Connecting in Markup
- Publish/Subscribe Communication
- Summary
- Event and Keyboard Normalization
- 4. AJAX and Server Communication
- Quick Overview of AJAX
- JSON
- AJAX Made Easy
- XHR Examples
- General Purpose XMLHttpRequest Calls
- Hitching Up Callbacks
- Deferreds
- Deferred Examples Via CherryPy
- Using Deferreds returned from XHR functions
- Injecting Deferreds into XHR functions
- Custom canceller
- DeferredList
- Deferred Examples Via CherryPy
- Form and HTTP Utilities
- Cross-Site Scripting with JSONP
- JSONP Primer
- Core IO
- Using JSONP with Dojo
- Connecting to a Flickr data source
- Getting back JavaScript from a JSONP call
- IFRAME Transports
- File downloads with IFRAMEs
- Form submissions with IFRAMEs
- Non-HTML response types
- Manually creating a hidden IFRAME
- Using JSONP with Dojo
- JSON Remote Procedure Calls
- JSON RPC Example
- OpenAjax Hub
- Summary
- Quick Overview of AJAX
- 5. Node Manipulation
- Query: One Size Fits All
- Warm Up
- State Tracking Example
- The long, brittle way
- The short, robust way
- NodeList
- Array-Like Methods
- Chaining NodeList results
- String-as-Function style Arguments
- Enhanced filtering
- Style
- Placement
- DOM Event Shortcuts
- Animation
- Array-Like Methods
- Creating NodeList Extensions
- Behavior
- Summary
- Query: One Size Fits All
- 6. Internationalization (i18n)
- Introduction
- Internationalizing a Module
- Layout on Disk
- Defining String Tables
- Putting It All Together
- Use build tools for snappy performance
- Dates, Numbers, and Currency
- Dates
- Numbers
- Currency
- Summary
- 7. Drag-and-Drop
- Dragging
- Simple Moveables
- Drag Events
- Z-Indexing
- Constrained Moveables
- Dropping
- Pure Targets
- Custom Avatars
- Drop Events
- Scripting Droppables
- Summary
- Dragging
- 8. Animation and Special Effects
- Animation
- Simple Fades
- Animating Arbitrary CSS Properties
- Programatically Controlling Animations
- Core fx
- Sliding
- Wiping
- Chaining and Combining
- Toggling
- Animation + Drag-and-Drop = Fun!
- Colors
- Creating and Blending Colors
- Named Color Values Available Via Base
- Additional Color Values Available Via Core
- Summary
- Animation
- 9. Data Abstraction
- Shifting the Data Paradigm
- Data API Overview
- The APIs
- The Read API
- The Identity API
- The Write API
- The Notification API
- Core Implementations of Data APIs
- ItemFileReadStore
- Hierarchical JSON and JSON with references
- ItemFileReadStore walkthrough
- Fetching an item by identity
- Fetching an item by arbitrary criteria
- Querying child items
- ItemFileWriteStore
- Modifying an existing item
- Creating and deleting items
- Custom saves
- Responding to notifications
- Serializing and Deserializing Custom Data Types
- Implicit type-mapping
- Custom type maps
- ItemFileReadStore
- Summary
- 10. Simulated Classes and Inheritance
- JavaScript Is Not Java
- One Problem, Many Solutions
- Typical JavaScript Inheritance
- Mixin Pattern
- Delegation Pattern
- Simulating Classes with Dojo
- The Basic Class Creation Pattern
- A Single Inheritance Example
- A common gotcha with prototype-based inheritance
- Calling an inherited method
- Multiply Inheriting with Mixins
- Multiple Inheritance Oddities
- Summary
- 1. Toolkit Overview
- II. Dijit and Util
- 11. Dijit Overview
- Motivation for Dijit
- Low Coupling, High Cohesion
- Accessibility (a11y)
- Common a11y Issues
- WAI-ARIA
- Dijit for Designers
- Themes
- Nodes Versus Dijits, DOM Events Versus Dijit Methods
- The Parser
- Parsing a Widget When the Page Loads
- Manually Parsing a Widget
- Demystifying the Parser
- Hands-on Dijit with NumberSpinner
- Creating from Markup
- Programmatic Creation
- Lots of Niceties
- Defining Methods in Markup
- Overview of Stock Dijits
- Form Dijits
- Layout Dijits
- Application Dijits
- Dijit API Drive-By
- Summary
- Motivation for Dijit
- 12. Dijit Anatomy and Lifecycle
- Dijit Anatomy
- Web Development Review
- Dijits to the Rescue
- Dijit Lifecycle Methods
- The _Widget Lifecycle
- Lifecycle methods
- Essential properties
- Mixing in _Templated
- Lifecycle methods
- Essential properties
- The _Widget Lifecycle
- Your First Dijit: HelloWorld
- HelloWorld Dijit (Take 1: Bare Bones)
- HTML page
- CSS
- Template
- JavaScript
- HelloWorld Dijit (Take 2: Modifying The Template)
- HelloWorld Dijit (Take 3: Interning the Template)
- HelloWord Dijit (Take 4: Passing in Parameters)
- HelloWorld Dijit (Take 5: Associating Events with Dijits)
- HelloWorld Dijit (Take 1: Bare Bones)
- Parent-Child Relationships with _Container and _Contained
- Rapidly Prototyping Widgets in Markup
- Summary
- Dijit Anatomy
- 13. Form Widgets
- Drive-By Form Review
- Form Dijits
- TextBox Variations
- TextBox
- ValidationTextBox
- MappedTextBox and RangeBoundTextBox
- TimeTextBox and DateTextBox
- Commonalities between DateTextBox and TimeTextBox
- Serializing data to the server
- Don't forget about inherited properties
- NumberTextBox
- NumberSpinner
- CurrencyTextBox
- ComboBox
- FilteringSelect
- MultiSelect
- Textarea Variations
- Textarea
- SimpleTextarea
- Button Variations
- Button
- ToggleButton
- CheckBox
- RadioButton
- DropDownButton
- ComboButton
- Slider
- HorizontalSlider
- VerticalSlider
- Form
- HTML Form Tag Synopsis
- Form
- Summary
- 14. Layout Widgets
- Layout Dijit Commonalities
- Programmatic Creation
- Keyboard Support
- ContentPane
- BorderContainer
- StackContainer
- Procrastination (a.k.a. Lazy Loading) May Yield Better Performance
- TabContainer
- AccordionContainer
- Rendering and Visibility Considerations
- Summary
- Layout Dijit Commonalities
- 15. Application Widgets
- Tooltip
- Dialog Widgets
- Dialog
- TooltipDialog
- ProgressBar
- ColorPalette
- Toolbar
- Menu
- TitlePane
- InlineEditBox
- Tree
- Simple Tree
- Simple Forest
- Responding to Click Events
- Tree-Related APIs
- Drag-and-Drop with the Tree
- Drag-and-droppable Tree example
- Editor
- Editor Architecture
- Editor Plug-Ins
- Summary
- 16. Build Tools, Testing, and Production Considerations
- Building
- Running a Build
- Build Profiles
- Setting up a build profile
- Setting up a (more clever) build profile
- Standard build profile
- ShrinkSafe optimization and other common options
- Dojo Objective Harness (DOH)
- Rhino Test Harness Without Dojo
- Rhino Test Harness with Dojo
- Browser-Based Test Harness
- Browser Test Example
- Asynchronous Browser Test Example
- Performance Considerations
- Benefits of XDomain builds
- Don't optimize prematurely
- Summary
- Building
- 11. Dijit Overview
- A. A Firebug Primer
- Installation
- To Allow or Not to Allow?
- Now for the Fun Stuff
- Inspect
- Console
- HTML and CSS
- Script and DOM
- Net
- Go Forth and Dismantle
- B. A Brief Survey of DojoX
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly