Colorless tip: This download has been corrected, please re-download this Chinese version of the tutorial. Sorry for the inconvenience caused to you!
Part 1 Rethinking Web Applications Chapter 1 A New Approach to Web Design 1.1 Why do you need Ajax rich client? 1.1.1 Comparing user experience 1.1.2 Network delay 1.1.3 Asynchronous interaction 1.1.4 Exclusive or transient usage patterns 1.1.5 Forget the Web 1.2 Four basic principles of Ajax 1.2.1 Applications, not content, are in the browser 1.2.2 The server delivers data rather than content 1.2.3 User interaction becomes smooth and continuous 1.2.4 Disciplined and serious programming 1.3 Ajax rich clients in the real world 1.3.1 Current situation 1.3.2 Google Maps 1.4 Alternatives to Ajax 1.4.1 Solution based on Macromedia Flash 1.4.2 Java Web Start and related technologies 1.5 Summary 1.6 Resources Chapter 2 Ajax Newbies Getting Started 2.1 Key elements of Ajax 2.2 Use JavaScript to improve user experience 2.3 Use CSS to define the appearance of your application 2.3.1 CSS selectors 2.3.2 CSS style properties 2.3.3 Simple CSS example 2.4 Organize views with DOM 2.4.1 Using JavaScript to manipulate DOM 2.4.2 Find DOM nodes 2.4.3 Create DOM nodes 2.4.4 Add styles to documents 2.4.5 Shortcut: Use the innerHTML attribute 2.5 Asynchronous loading of data using XML technology 2.5.1 IFrame 2.5.2 XMLDocument and XMLHttpRequest objects 2.5.3 Send request to server 2.5.4 Monitor requests using callback functions 2.5.5 Complete life cycle 2.6 How is Ajax different? 2.7 Summary 2.8 Resources Chapter 3 Putting Ajax in Order 3.1 From chaos to order 3.1.1 Patterns: Creating a Common Vocabulary 3.1.2 Refactoring and Ajax 3.1.3 Maintain balance 3.1.4 Reconstruction actual combat 3.2 Some case studies of small refactorings 3.2.1 Cross-browser inconsistency: Facade and Adapter modes 3.2.2 Management event processing function: Observer mode 3.2.3 Reuse user operation processing functions: Command mode 3.2.4 Maintaining a unique reference to a resource: Singleton pattern 3.3 Model-View-Controller 3.4 MVC on the Web server side 3.4.1 Ajax web server without patterns 3.4.2 Reconstruct the domain model 3.4.3 Separating content from presentation 3.5 Third-party libraries and frameworks 3.5.1 Cross-browser libraries 3.5.2 UI components and UI component suites 3.5.3 Application framework 3.6 Summary 3.7 Resources Part 2 Core Technology Chapter 4 Pages as Applications 4.1 A different type of MVC 4.1.1 Repeating the MVC pattern at different scales 4.1.2 Apply MVC on the browser side 4.2 Views in Ajax applications 4.2.1 Separating logic from views 4.2.2 Keep views and logic separated 4.3 Controllers in Ajax applications 4.3.1 Traditional JavaScript event handling functions 4.3.2 W3C event model 4.3.3 Implementing a flexible event model in JavaScript 4.4 Models in Ajax applications 4.4.1 Modeling business domains using JavaScript 4.4.2 Interacting with the server 4.5 Generating views from models 4.5.1 Reflection of JavaScript objects 4.5.2 Working with arrays and objects 4.5.3 Adding a controller 4.6 Summary 4.7 Resources Chapter 5 The role of the server 5.1 Working with the server 5.2 Writing server-side code 5.2.1 Popular implementation languages 5.2.2 N-tier architecture 5.2.3 Maintain client-side and server-side domain models 5.3 Big Picture: Universal Server-Side Design 5.3.1 Simple web server coding without using frames 5.3.2 Using Model2 workflow framework 5.3.3 Using component-based frameworks 5.3.4 Using service-oriented architecture 5.4 Details: exchanging data 5.4.1 Client-only interaction 5.4.2 Introducing the example of planet browser 5.4.3 Thinking from the perspective of a Web page: content-centered interaction 5.4.4 Thinking in terms of plug-ins: script-centric interaction 5.4.5 Thinking from an application perspective: data-centric interactions 5.5 Write data to the server 5.5.1 Using HTML forms 5.5.2 Using XMLHttpRequest object 5.5.3 Effectively manage user updates 5.6 Summary 5.7 Resources Part 3 Professional-Level Ajax Chapter 6 User Experience 6.1 Do the right thing: develop high-quality applications 6.1.1 Responsiveness 6.1.2 Robustness 6.1.3 Consistency 6.1.4 Simplicity 6.1.5 Put it into practice 6.2 Keep users informed 6.2.1 Handling responses to own requests 6.2.2 Handling updates submitted by other users 6.3 Designing a notification system for Ajax 6.3.1 Modeling notifications 6.3.2 Define user interface requirements 6.4 Implement notification framework 6.4.1 Display status bar icon 6.4.2 Display detailed notification information 6.4.3 Integration 6.5 Use the notification framework to handle network requests 6.6 Representing the timeliness of data 6.6.1 Define a simple highlight format 6.6.2 Highlighting with the Scriptaculous effects library 6.7 Summary 6.8 Resources Chapter 7 Security and Ajax 7.1 JavaScript and browser security 7.1.1 Introduction of source server policy 7.1.2 Ajax-related considerations 7.1.3 Subdomain issues 7.1.4 Cross-browser security 7.2 Communicating using remote services 7.2.1 Agent remote service 7.2.2 Using web services 7.3 Protection of confidential data 7.3.1 Middlemen 7.3.2 Use secure HTTP 7.3.3 Encrypting data using JavaScript over plain HTTP 7.4 Access strategy for Ajax data flow 7.4.1 Designing a secure web layer 7.4.2 Restricting access to web data 7.5 Summary 7.6 Resources Chapter 8 Performance 8.1 What is performance? 8.2 JavaScript execution speed 8.2.1 Measuring application time the hard way 8.2.2 Using Venkman Performance Analyzer 8.2.3 Optimize the execution speed of Ajax applications 8.3 JavaScript memory usage 8.3.1 Avoid memory leaks 8.3.2 Special considerations for Ajax 8.4 Design with performance in mind 8.4.1 Measuring memory usage 8.4.2 Simple example 8.4.3 Results: How to reduce memory usage by 150x 8.5 Summary 8.6 Resources Part 4 Ajax Case Study Chapter 9 Dynamic Double Combination Function 9.1 Double combination script 9.1.1 Limitations of client solutions 9.1.2 Limitations of server-side solutions 9.1.3 Ajax-based solutions 9.2 Client architecture 9.2.1 Design form 9.2.2 Designing client/server interactions 9.3 Server-side VB.NET implementation 9.3.1 Define XML response format 9.3.2 Writing server-side code 9.4 Display results 9.4.1 Traversing XML documents 9.4.2 Applying CSS 9.5 Advanced issues 9.5.1 Allow multiple selection queries 9.5.2 Expand the double combination into a triple combination 9.6 Refactoring 9.6.1 New and improved net.ContentLoader 9.6.2 Creating dual composite components 9.7 Summary Chapter 10 Pre-input prompts 10.1 10.1 Examine the application of pre-input prompts 10.1.3 10.1.1 Common features of pre-input prompts 10.1.4 10.1.2 Google Suggest 10.1.3 Practical development of Ajax pre-input prompts 10.2 Server-side framework: C# 10.2.1 Server and database 10.2.2 Testing server-side code 10.3 Client Framework 10.3.1 HTML 10.3.2 JavaScript 10.3.3 Accessing the server 10.4 Added functionality: multiple elements containing different queries 10.5 10.5 Refactoring 10.5.1 Day 1: Game plan for developing the TextSuggest component 10.5.2 Day 2: Creating TextSuggest – clear and configurable 10.5.3 Day 3: Activate Ajax 10.5.4 Day 4: Incident handling 10.5.5 Day 5: Prompt pop-up box UI 10.5.6 Reconstruction report 10.6 Summary Chapter 11 Enhanced Ajax Web Portal 11.1 The evolving portal 11.1.1 Traditional portal 11.1.2 Portals with rich user interfaces 11.2 Architecture of Ajax Portal using Java 11.3 Ajax login 11.3.1 User table 11.3.2 Server-side login code: implemented in Java 11.3.3 Client login framework 11.4 Implement DHTML window 11.4.1 Portal window database 11.4.2 Server-side code for portal windows 11.4.3 Add external JS library 11.5 Add Ajax automatic saving function 11.5.1 Modify the library code 11.5.2 Automatically save information to the database 11.6 Refactoring 11.6.1 Defining the constructor 11.6.2 Modify AjaxWindows.js library 11.6.3 Specify protal command 11.6.4 Performing Ajax processing 11.6.5 Refactoring report 11.7 Summary Chapter 12 Dynamic Search Using XSLT 12.1 Understanding search technology 12.1.1 Examining traditional search 12.1.2 Disadvantages of the Frame and Popup Approaches 12.1.3 Investigate dynamic search using Ajax and XSLT 12.1.4 Send results back to the client 12.2 Client code 12.2.1 Setting up the client 12.2.2 Starting the search process 12.3 Server-side PHP code 12.3.1Creating XML documents 12.3.2 Creating XSLT documents 12.4 Merging XSLT and XML documents 12.4.1 Using Microsoft IE 12.4.2 Using Mozilla 12.5 Complete search 12.5.1 Applying Cascading Style Sheets 12.5.2 Improving search 12.5.3 Deciding to use XSLT 12.5.4 Overcoming the shortcomings of Ajax bookmark support 12.6 Refactoring 12.6.1 XSLTHelper 12.6.2 Dynamic search component 12.6.3 Refactoring report 12.7 Summary Chapter 13 Using AJAX to create stand-alone applications 13.1 Reading information from outside 13.1.1 Finding XML feeds 13.1.2 RSS structure 13.2 Create rich user interfaces 13.2.1 Process 13.2.2 HTML frames without tables 13.2.3 Use CSS method for typesetting 13.3 Loading RSS feeds 13.3.1 Global scope 13.3.2 Ajax preloading function 13.4 Add rich gradient effects 13.4.1 Cross-browser opacity rules 13.4.2 Implementing fade-in/fade-out gradients 13.4.3 Integrating JavaScript timer 13.5 Additional functions 13.5.1 Inserting additional feeds 13.5.2 Integrated skip and pause functions 13.6 Avoid project constraints 13.6.1 Overcoming Mozilla’s security limitations 13.6.2 Modify the scope of application 13.7 Refactoring 13.7.1 RSS reader model 13.7.2 RSS Reader View 13.7.3 RSS Reader Controller 13.7.4 Refactoring report 13.8 Summary Appendix A Ajax Toolbox A.1 Choose the right toolset to work smarter A.1.1 Get the right tools A.1.2 Create your own tools A.1.3 Maintenance tool box A.2 Editors and IDEs A.2.1 What functionality is needed in a code editor A.2.2 Current tools A.3 Debugger A.3.1 Why use a debugger A.3.2 JavaScript debugger A.3.3 HTTP debugger A.3.4 Create your own cross-browser output console A.4 DOM Inspector A.4.1 Using the Mozilla DOM Inspector A.4.2 IE’s DOM inspector A.5 Install Firefox extension A.6 Resources Appendix B JavaScript for Object-Oriented Programmers B.1 JavaScript is not Java B.2 Objects in JavaScript B.2.1 Create an object that works out of the box (ad hoc) B.2.2 Constructors, classes and prototypes B.2.3 Extending built-in classes B.2.4 Prototype inheritance B.2.5 Reflection of JavaScript objects B.2.6 Interfaces and "duck typing" B.3 Methods and functions B.3.1 Functions are first-class citizens B.3.2 Attaching functions to objects B.3.3 Borrowing functions from other objects B.3.4 Ajax event handling and function context B.3.5 Closures in JavaScript B.4 Summary