
AJAX and PHP: Building Responsive Web Applications
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- Use better JavaScript code to enable powerful web features
- Leverage the power of PHP and MySQL to create powerful back-end functionality and make it work in harmony with the smart AJAX client
- Go through numerous case studies that demonstrate how to implement AJAX-enabled features in your site such as: real-time form validation, online chat, suggest & autocomplete, whiteboard, SVG realtime charting, whiteboard, web data grid, RSS reader, drag & drop
Book DescriptionAssuming a basic knowledge of PHP, XML, JavaScript and MySQL, this book will help you understand how the heart of AJAX beats and how the constituent technologies work together. After teaching the foundations, the book will walk you through numerous real-world case studies covering tasks you'll be likely to need for your own applications: Server-enabled form-validation page Online chat collaboration tool Customized type-ahead text entry solution Real-time charting using SVG Database-enabled, editable and customizable data grid RSS aggregator application A server-managed sortable list with drag&drop support using the script.aculo.us JavaScript toolkit The appendices guide you through installing your working environment, using powerful tools that enable debugging, improving, and profiling your code, working with XSLT and XPath. From the Author, Cristian Darie AJAX and PHP: Building Responsive Web Applications is mainly a book for beginners, but when designing its contents we tried to find the ideal blend of topics that would help both novice and experienced web developers make a big step forward. One customer was very kind to let us know, through a review, that we succeeded: "The theory behind all the technologies used is very clearly explained, without boring you with details about obvious things. Right from the first chapter you start learning by examples. The examples can be easily adapted to many web projects and they cover stuff that is both useful and fun." Here are a few examples of such "useful and fun" things that you can find in this book: details on using proxy scripts to work around the security measures in modern browsers client-side and server-side code that doesn't break when fed with special characters (such as What you will learn - Chapter 1: AJAX and The Future Of Web Applications is an initial incursion into the world of AJAX and the vast possibilities it opens up for web developers and companies, to offer a better experience to their users. In this chapter you ll also build your first AJAX-enabled web page, which will give you a first look of the component technologies. You can read this chapter in full, for free, here: http://ajaxphp.packtpub.com/1825_01_Final.pdf
- View AJAX and the Future of Web Applications Demo: http://ajaxphp.packtpub.com/ajax/quickstart/
- Chapter 2: Client-Side Techniques with Smarter JavaScript will guide you through the technologies you""ll use to build AJAX web clients, using JavaScript, DOM, the XMLHttpRequest object, and XML. While not being a complete tutorial for these technologies, you""ll be taken to the right track of using them together to build a solid foundation for your future applications.
- Chapter 3: Server-Side Techniques with PHP and MySQL completes the theory foundation by presenting how to create smart servers to interact with your AJAX client. You""ll learn various techniques for implementing common tasks, including handling security and error handling problems.
- Chapter 4: AJAX Form Validation guides you through creating a responsive, modern form with real-time validation based on server data. View AJAX Form Validation Demo: http://ajaxphp.packtpub.com/ajax/validate/
- Chapter 5: AJAX Chat presents a simple online chat that works exclusively using AJAX code, without Java applets, Flash code, or other specialized library, as most chat applications work these days. Chapter 5 has now been updated to cover JSON. You can read the chapter in full, for free, here: www.PacktPub.com/files/Ajax_Chat_and_JSON.pdf
- View AJAX Chat Demo: http://ajaxphp.packtpub.com/ajax/chat/
- Chapter 6: AJAX Suggest and Autocomplete builds a Google-suggest like feature, that helps you find PHP functions, and forward you to the official help page for the chosen function. View AJAX Suggest and Autocomplete demo: http://ajaxphp.packtpub.com/ajax/suggest/
- Chapter 7: SVG (Scalable Vector Graphics) is a text-based graphics language that can be used to draw shapes and text. (SVG is supported natively by Firefox 1.5, and requires a SVG plugin with other browsers). In this case study you learn how to implement a realtime charting solution with AJAX and SVG. View SVG Demo here: http://ajaxphp.packtpub.com/ajax/svg_chart/
- Chapter 8: AJAX Grid teaches you how to build powerful updatable data grid. You""ll learn how to parse XML documents using XSLT to generate the looks of your grid. View AJAX Grid Demo here: http://ajaxphp.packtpub.com/ajax/grid/
- Chapter 9: AJAX RSS Reader uses the SimpleXML PHP library, XML and XSLT, to build a simple RSS aggregator. View AJAX RSS Reader Demo here: http://ajaxphp.packtpub.com/ajax/rss_reader/
- Chapter 10: AJAX Drag and Drop is a demonstration of using the script.aculo.us framework to build a simple list of elements with drag&drop functionality.
- Appendix A: Configuring Your Working Environment teaches you how to install and configure the required software: Apache, PHP, MySQL, phpMyAdmin.
Who this book is forThis book is for web developers willing to build better web applications. A basic knowledge of PHP, XML, JavaScript and MySQL, or a strong will to learn-as-you-type, is assumed.
More details
Other editions
Additional editions

Content
- Intro
- AJAX and PHP
- Table of Contents
- AJAX and PHP
- Credits
- About the Authors
- About the Reviewers
- Preface
- What This Book Covers
- What You Need for This Book
- Conventions
- Reader Feedback
- Customer Support
- Downloading the Example Code for the Book
- Errata
- Questions
- 1. AJAX and the Future of Web Applications
- Delivering Functionality via the Web
- Advantages of Web Applications
- Building Websites Since 1990
- HTTP and HTML
- PHP and Other Server-Side Technologies
- JavaScript and Other Client-Side Technologies
- What's Been Missing?
- Understanding AJAX
- Building a Simple Application with AJAX and PHP
- Time for Action-Quickstart AJAX
- What Just Happened?
- Summary
- 2. Client-Side Techniques with Smarter JavaScript
- JavaScript and the Document Object Model
- Time for Action-Playing with JavaScript and the DOM
- What Just Happened?
- JavaScript Events and the DOM
- Time for Action-Using JavaScript Events and the DOM
- What Just Happened?
- Even More DOM
- Time for Action-Even More DOM
- What Just Happened?
- JavaScript, DOM, and CSS
- Time for Action-Working with CSS and JavaScript
- What Just Happened?
- Using the XMLHttpRequest Object
- Creating the XMLHttpRequest Object
- Creating Better Objects for Internet Explorer
- Initiating Server Requests Using XMLHttpRequest
- Handling Server Response
- Time for Action-Making Asynchronous Calls with XMLHttpRequest
- What Just Happened?
- Working with XML Structures
- Time for Action-Making Asynchronous Calls with XMLHttpRequest and XML
- What Just Happened?
- Handling More Errors and Throwing Exceptions
- Creating XML Structures
- Summary
- 3. Server-Side Techniqueswith PHP and MySQL
- PHP and DOM
- Time for Action-Doing AJAX with PHP
- What Just Happened?
- Passing Parameters and Handling PHP Errors
- Time for Action-Passing PHP Parameters and Error Handling
- What Just Happened?
- Connecting to Remote Servers and JavaScript Security
- Time for Action-Connecting to Remote Servers
- What Just Happened?
- Using a Proxy Server Script
- Time for Action-Using a Proxy Server Script to Access Remote Servers
- What Just Happened?
- A Framework for Making Repetitive Asynchronous Requests
- Time for Action-Implementing Repetitive Tasks
- What Just Happened?
- Working with MySQL
- Creating Database Tables
- Manipulating Data
- Connecting to Your Database and Executing Queries
- Time for Action-Working with PHP and MySQL
- What Just Happened?
- Wrapping Things Up and Laying Out the Structure
- Time for Action-Building the Friendly Application
- What Just Happened?
- Summary
- 4. AJAX Form Validation
- Implementing AJAX Form Validation
- Thread-Safe AJAX
- Time for Action-AJAX Form Validation
- What Just Happened?
- Summary
- 5. AJAX Chat
- Introducing AJAX Chat
- AJAX Chat Solutions
- Implementing AJAX Chat
- Time for Action-Ajax Chat
- What just happened?
- Summary
- 6. AJAX Suggest and Autocomplete
- Introducing AJAX Suggest and Autocomplete
- Google Suggest
- Implementing AJAX Suggest and Autocomplete
- Time for Action-
- AJAX Suggest and Autocomplete
- What Just Happened?
- Summary
- 7. AJAX Real-Time Charting with SVG
- Implementing a Real-Time Chart with AJAX and SVG
- Time for Action-Building the Real-Time SVG Chart
- What Just Happened?
- Summary
- 8. AJAX Grid
- Implementing the AJAX Grid Using Client-Side XSLT
- Time for Action-AJAX Grid
- What Just Happened?
- Summary
- 9. AJAX RSS Reader
- Working with RSS
- The RSS Document Structure
- Google Reader
- Implementing the AJAX RSS Reader
- Time for Action-Building the RSS Reader Application
- What Just Happened?
- Summary
- 10. AJAX Drag and Drop
- Using Drag and Drop on the Web
- Shopping Carts
- Sortable Lists
- Building the AJAX Drag-and-Drop Sortable List Application
- Time for Action-Task Management Application with AJAX
- What Just Happened?
- Summary
- A. Preparing Your Working Environment
- Preparing Your Windows Playground
- Installing Apache
- Installing MySQL
- Installing PHP
- Preparing Your *nix Playground
- Installing Apache
- Installing MySQL
- Installing PHP
- Installing phpMyAdmin
- Preparing the AJAX Database
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.