SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
Table of Contents

Preface                                                                    1
Chapter 1: AJAX and the Future of Web Applications                         7
 Delivering Functionality via the Web                                      8
  Advantages of Web Applications                                           9
 Building Websites Since 1990                                             10




                                                            d
  HTTP and HTML                                                           10
  PHP and Other Server-Side Technologies                                  11




                                                     re
  JavaScript and Other Client-Side Technologies                           12
  What's Been Missing?                                                    13
 Understanding AJAX                                                       14
                                             te
 Building a Simple Application with AJAX and PHP                          18
          Time for Action—Quickstart AJAX                                 21
 Summary                                                                  28
                                    is
Chapter 2: Client-Side Techniques with Smarter JavaScript                 29
 JavaScript and the Document Object Model                                 30
                     eg

          Time for Action—Playing with JavaScript and the DOM             32
 JavaScript Events and the DOM                                            33
          Time for Action—Using JavaScript Events and the DOM             35
 Even More DOM                                                            37
      nR



          Time for Action—Even More DOM                                   37
 JavaScript, DOM, and CSS                                                 39
          Time for Action—Working with CSS and JavaScript                 39
 Using the XMLHttpRequest Object                                          42
U




  Creating the XMLHttpRequest Object                                      43
     Creating Better Objects for Internet Explorer                        45
   Initiating Server Requests Using XMLHttpRequest                        46
   Handling Server Response                                               49
          Time for Action—Making Asynchronous Calls with XMLHttpRequest   50
Table of Contents

     Working with XML Structures                                                   55
           Time for Action—Making Asynchronous Calls with XMLHttpRequest and XML 55
      Handling More Errors and Throwing Exceptions                                 59
      Creating XML Structures                                                      63
     Summary                                                                       64
Chapter 3: Server-Side Techniques with PHP and MySQL                              65
     PHP and DOM                                                                   65
           Time for Action—Doing AJAX with PHP                                     66
     Passing Parameters and Handling PHP Errors                                    71
           Time for Action—Passing PHP Parameters and Error Handling               72




                                                               d
     Connecting to Remote Servers and JavaScript Security                          79
           Time for Action—Connecting to Remote Servers                            81




                                                    re
     Using a Proxy Server Script                                                   85
           Time for Action—Using a Proxy Server Script to Access Remote Servers    86
     A Framework for Making Repetitive Asynchronous Requests                       91
                                           te
           Time for Action—Implementing Repetitive Tasks                           93
     Working with MySQL                                                           101
      Creating Database Tables                                                    101
                                   is
      Manipulating Data                                                           104
      Connecting to Your Database and Executing Queries                           105
           Time for Action—Working with PHP and MySQL                             106
                       eg

     Wrapping Things Up and Laying Out the Structure                              109
           Time for Action—Building the Friendly Application                      112
     Summary                                                                      119
         nR



Chapter 4: AJAX Form Validation                                                   121
     Implementing AJAX Form Validation                                            122
       Thread-Safe AJAX                                                           125
           Time for Action—AJAX Form Validation                                   126
     Summary                                                                      144
U




Chapter 5: AJAX Chat                                                              145
     Introducing AJAX Chat                                                        145
     Implementing AJAX Chat                                                       147
           Time for Action—Ajax Chat                                              148
     Summary                                                                      164


ii
Table of Contents

Chapter 6: AJAX Suggest and Autocomplete                                  165
 Introducing AJAX Suggest and Autocomplete                                165
   Google Suggest                                                         166
 Implementing AJAX Suggest and Autocomplete                               167
       Time for Action—AJAX Suggest and Autocomplete                       168
 Summary                                                                  188
Chapter 7: AJAX Real-Time Charting with SVG                               189
 Implementing a Real-Time Chart with AJAX and SVG                         190
       Time for Action—Building the Real-Time SVG Chart                    193
 Summary                                                                  202




                                                          d
Chapter 8: AJAX Grid                                                      203




                                              re
 Implementing the AJAX Grid Using Client-Side XSLT                        204
       Time for Action—AJAX Grid                                           205
 Summary                                                                  221
                                      te
Chapter 9: AJAX RSS Reader                                                223
 Working with RSS                                                         223
                              is
   The RSS Document Structure                                             224
   Google Reader                                                          224
 Implementing the AJAX RSS Reader                                         225
                  eg

       Time for Action—Building the RSS Reader Application                 226
 Summary                                                                  236
Chapter 10: AJAX Drag and Drop                                            237
     nR



 Using Drag and Drop on the Web                                           237
  Shopping Carts                                                          237
  Sortable Lists                                                          238
 Building the AJAX Drag-and-Drop Sortable List Application                238
U




       Time for Action—Task Management Application with AJAX               241
 Summary                                                                  253
Appendix A: Preparing Your Working Environment                            255
 Preparing Your Windows Playground                                        256
   Installing Apache                                                      256
   Installing MySQL                                                       258
   Installing PHP                                                         259

                                                                              iii
Table of Contents

     Preparing Your *nix Playground        261
       Installing Apache                   261
       Installing MySQL                    261
       Installing PHP                      262
     Installing phpMyAdmin                 263
     Preparing the AJAX Database           264
Index                                      267




                                       d
                                      re
                                      te
                               is
                     eg
         nR
U




iv

Weitere ähnliche Inhalte

Andere mochten auch

Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, Makasar
Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, MakasarMateri Bupati Kaur Hermen Malik, Kedaulatan Pangan, Makasar
Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, MakasarDian Utama
 
Quist-Legacy Gen 1 kap 1
Quist-Legacy Gen 1 kap 1Quist-Legacy Gen 1 kap 1
Quist-Legacy Gen 1 kap 1Hikke
 
Product & service decisions
Product & service decisionsProduct & service decisions
Product & service decisionskierasafirah
 
Corema península ibérica
Corema península ibéricaCorema península ibérica
Corema península ibéricaPrego Alberto
 
Paparan pdt bedah desa kemenhub
Paparan pdt bedah desa kemenhubPaparan pdt bedah desa kemenhub
Paparan pdt bedah desa kemenhubDian Utama
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsKohei KaiGai
 

Andere mochten auch (10)

Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, Makasar
Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, MakasarMateri Bupati Kaur Hermen Malik, Kedaulatan Pangan, Makasar
Materi Bupati Kaur Hermen Malik, Kedaulatan Pangan, Makasar
 
Diapositivas amalia y lorena
Diapositivas amalia y lorenaDiapositivas amalia y lorena
Diapositivas amalia y lorena
 
Quist-Legacy Gen 1 kap 1
Quist-Legacy Gen 1 kap 1Quist-Legacy Gen 1 kap 1
Quist-Legacy Gen 1 kap 1
 
Bmthn1
Bmthn1Bmthn1
Bmthn1
 
Product & service decisions
Product & service decisionsProduct & service decisions
Product & service decisions
 
Corema península ibérica
Corema península ibéricaCorema península ibérica
Corema península ibérica
 
Paparan pdt bedah desa kemenhub
Paparan pdt bedah desa kemenhubPaparan pdt bedah desa kemenhub
Paparan pdt bedah desa kemenhub
 
MWP
MWPMWP
MWP
 
OPM
OPMOPM
OPM
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
 

Ajax and php building responsive web applications (2006)

  • 1. Table of Contents Preface 1 Chapter 1: AJAX and the Future of Web Applications 7 Delivering Functionality via the Web 8 Advantages of Web Applications 9 Building Websites Since 1990 10 d HTTP and HTML 10 PHP and Other Server-Side Technologies 11 re JavaScript and Other Client-Side Technologies 12 What's Been Missing? 13 Understanding AJAX 14 te Building a Simple Application with AJAX and PHP 18 Time for Action—Quickstart AJAX 21 Summary 28 is Chapter 2: Client-Side Techniques with Smarter JavaScript 29 JavaScript and the Document Object Model 30 eg Time for Action—Playing with JavaScript and the DOM 32 JavaScript Events and the DOM 33 Time for Action—Using JavaScript Events and the DOM 35 Even More DOM 37 nR Time for Action—Even More DOM 37 JavaScript, DOM, and CSS 39 Time for Action—Working with CSS and JavaScript 39 Using the XMLHttpRequest Object 42 U Creating the XMLHttpRequest Object 43 Creating Better Objects for Internet Explorer 45 Initiating Server Requests Using XMLHttpRequest 46 Handling Server Response 49 Time for Action—Making Asynchronous Calls with XMLHttpRequest 50
  • 2. Table of Contents Working with XML Structures 55 Time for Action—Making Asynchronous Calls with XMLHttpRequest and XML 55 Handling More Errors and Throwing Exceptions 59 Creating XML Structures 63 Summary 64 Chapter 3: Server-Side Techniques with PHP and MySQL 65 PHP and DOM 65 Time for Action—Doing AJAX with PHP 66 Passing Parameters and Handling PHP Errors 71 Time for Action—Passing PHP Parameters and Error Handling 72 d Connecting to Remote Servers and JavaScript Security 79 Time for Action—Connecting to Remote Servers 81 re Using a Proxy Server Script 85 Time for Action—Using a Proxy Server Script to Access Remote Servers 86 A Framework for Making Repetitive Asynchronous Requests 91 te Time for Action—Implementing Repetitive Tasks 93 Working with MySQL 101 Creating Database Tables 101 is Manipulating Data 104 Connecting to Your Database and Executing Queries 105 Time for Action—Working with PHP and MySQL 106 eg Wrapping Things Up and Laying Out the Structure 109 Time for Action—Building the Friendly Application 112 Summary 119 nR Chapter 4: AJAX Form Validation 121 Implementing AJAX Form Validation 122 Thread-Safe AJAX 125 Time for Action—AJAX Form Validation 126 Summary 144 U Chapter 5: AJAX Chat 145 Introducing AJAX Chat 145 Implementing AJAX Chat 147 Time for Action—Ajax Chat 148 Summary 164 ii
  • 3. Table of Contents Chapter 6: AJAX Suggest and Autocomplete 165 Introducing AJAX Suggest and Autocomplete 165 Google Suggest 166 Implementing AJAX Suggest and Autocomplete 167 Time for Action—AJAX Suggest and Autocomplete 168 Summary 188 Chapter 7: AJAX Real-Time Charting with SVG 189 Implementing a Real-Time Chart with AJAX and SVG 190 Time for Action—Building the Real-Time SVG Chart 193 Summary 202 d Chapter 8: AJAX Grid 203 re Implementing the AJAX Grid Using Client-Side XSLT 204 Time for Action—AJAX Grid 205 Summary 221 te Chapter 9: AJAX RSS Reader 223 Working with RSS 223 is The RSS Document Structure 224 Google Reader 224 Implementing the AJAX RSS Reader 225 eg Time for Action—Building the RSS Reader Application 226 Summary 236 Chapter 10: AJAX Drag and Drop 237 nR Using Drag and Drop on the Web 237 Shopping Carts 237 Sortable Lists 238 Building the AJAX Drag-and-Drop Sortable List Application 238 U Time for Action—Task Management Application with AJAX 241 Summary 253 Appendix A: Preparing Your Working Environment 255 Preparing Your Windows Playground 256 Installing Apache 256 Installing MySQL 258 Installing PHP 259 iii
  • 4. Table of Contents Preparing Your *nix Playground 261 Installing Apache 261 Installing MySQL 261 Installing PHP 262 Installing phpMyAdmin 263 Preparing the AJAX Database 264 Index 267 d re te is eg nR U iv