1. Trang chủ
  2. » Công Nghệ Thông Tin

Dojo Using the Dojo JavaScript Library to Build Ajax Applications phần 1 pptx

34 272 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 34
Dung lượng 2,92 MB

Nội dung

[...]... Contents 10 .4 Description of Dojo 19 2 10 .5 What Problems Does Dojo Solve? 10 .6 Who Should Use Dojo? 10 .7 Licensing 19 3 19 4 19 5 10 .8 Competitors and Alternatives 10 .9 The Future of Dojo 19 5 19 7 11 Technical Description of Dojo 19 9 11 .1 What You Get in the Dojo Download 11 .2 Organization of Dojo Source Code 11 .2 .1 First-level Directories 19 9 2 01 2 01 11. 2.2 Digging Deeper into the Dojo Directory 11 .3 Dojo. .. Features 202 203 11 .3 .1 Naming Conventions and Name Space 11 .3.2 Dojo Base Module 11 .3.3 Dojo Core Modules 204 205 217 12 Objects and Classes 223 12 .1 Objects Explained 223 12 .1. 1 Creating Objects 12 .1. 2 Encapsulation 224 224 12 .1. 3 Object Templates 225 12 .1. 4 JavaScript Prototypes 227 12 .2 Using Dojo to Work with Objects 228 12 .2 .1 Dojo Function: dojo. declare 229 12 .3 Defining a Class 229 12 .3 .1 Superclasses... Inheritance 12 .3.2 API for dojo. declare 12 .3.3 Other Dojo Functions 2 31 2 31 233 12 .3.4 Object Graphs and Dot Notation 13 Strings and JSON 13 .1 Text Strings 234 239 239 13 .1. 1 Dojo Function: dojo. string.pad 240 13 .1. 2 Usage Example for dojo. string.pad 13 .1. 3 Dojo Function: dojo. string.substitute 2 41 2 41 13 .1. 4 Usage Example for dojo. string.substitute 243 Contents 13 .2 JSON 244 13 .2 .1 Dojo Function: dojo. toJson... 14 .4 Using Aspect Oriented Programming in Dojo 15 Ajax Remoting 15 .1 Remoting 259 259 15 .2 Review of XMLHttpRequest (or XHR for Short) 15 .2 The dojo. xhrGet Function 15 .3 .1 Parameters in Detail 15 .4 dojo. xhrPost 2 61 264 264 15 .4 .1 Usage Example—Error Handling 15 .5 Working with Forms 268 269 15 .5 .1 Dojo Function dojo. formToObject 15 .5.2 Dojo Function dojo. objectToQuery 15 .5.3 Dojo Function dojo. formToQuery... dojo. formToQuery 2 71 274 15 .5.5 Dojo Function dojo. queryToObject 16 Working with the DOM 270 272 15 .5.4 Dojo Function dojo. formToJson 274 277 16 .1 Finding Needles in the DOM Haystack 16 .2 Dojo Query 256 277 278 16 .2 .1 CSS Selectors 279 16 .2.2 Using Selectors in dojo. query 16 .2.3 Using DOM Elements Found by dojo. query 283 282 260 xi xii Contents 16 .3 Animation 283 16 .3 .1 Understanding Animation 16 .3.2 Dojo Animation... dojo. toJson 246 13 .2.2 Usage Example for dojo. toJson 13 .2.3 Dojo Function: dojo. fromJson 14 Events and Event Handling 249 14 .1 Description of the Event Model 14 .1. 1 What Are Events? 246 247 249 250 14 .1. 2 Additional Dojo Events 2 51 14.2 Defining and Assigning Event Handlers 252 14 .2 .1 Using dojo. connect to Assign Event Handlers 252 14 .2.2 Usage Example for Assigning Event Handlers 253 14 .3 Representing... 285 16 .3.3 Standard Animation Effects 17 Testing and Debugging 17 .1 Testing 286 293 293 17 .1. 1 Unit Testing 294 17 .1. 2 DOH The Dojo Unit Testing Framework 17 .1. 3 Other Types of Testing 17 .2 Logging 298 17 .2 .1 Basic Logging 299 17 .2.2 Advanced Logging Index 303 300 298 294 Foreword If there is one lesson to be learned from the Dojo Toolkit, it is “Be careful what you wish for!”When we first started Dojo, ... page with Ajax features.We will enhance the page in a number of small ways that each address a specific type of issue Along the way, we’ll see the kinds of features that Ajax allows us to add to web pages, and we’ll see exactly how to implement those features using the Dojo Toolkit 1. 1 .1 Goals for this Tutorial The primary goal of this tutorial is to show you how to use the Dojo Toolkit to introduce... running the code along with corrections to the book’s text Please check out the website and feel free to contact me.2 1 2 You can download the Tomcat web server from the following address: http://tomcat.apache.org/ The web site for this book can be found at the following URL: http://www.objecttraininggroup.com/dojobook 1. 5 Tutorial Step 1 Including Dojo 1. 5 Tutorial Step 1 Including Dojo The purpose of the. .. from the pull-down list.This step will require some additional scripts on the server to allow it to respond to these Ajax requests I’ve created some simple JavaServer Page (JSP) scripts on the server to allow the examples to work .The scripts are over-simplified but serve the purpose of demonstrating the features that are discussed in the tutorial 1. 3.4 Using Additional Specialized Dojo Widgets The fourth . and AJAX 18 9 10 .2 History of Dojo 19 1 10 .3 Purpose of Dojo 19 1 x Contents 10 .4 Description of Dojo 19 2 10 .5 What Problems Does Dojo Solve? 19 3 10 .6 Who Should Use Dojo? 19 4 10 .7 Licensing 19 5 10 .8. Competitors and Alternatives 19 5 10 .9 The Future of Dojo 19 7 11 Technical Description of Dojo 19 9 11 .1 What You Get in the Dojo Download 19 9 11 .2 Organization of Dojo Source Code 2 01 11. 2 .1 First-level. Processing the Form 14 1. 4 Getting and Running the Source Code 14 1. 5 Tutorial Step 1 Including Dojo 15 1. 5 .1 Download or Create the Source Files 15 1. 5.2 Include the Code for the Dojo Toolkit 19 1. 5.3

Ngày đăng: 12/08/2014, 16:21

TỪ KHÓA LIÊN QUAN