Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery

Book description

Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery is a guide for intermediate- to advanced-level web developers looking to take the next leap forward in website and app development: realtime.

With Realtime Web Apps, you'll be able to quickly get up to speed on what HTML5 WebSocket does, how it is going to affect the future of the web as we know it, and—thanks to Pusher's simple API—start developing your first realtime app today.

Using a practical approach, Realtime Web Apps will guide you through building your first app using HTML5, CSS3, jQuery, and Pusher. After your initial introduction to the technologies used in the book, you'll immediately jump into the process of creating a realtime Q&A app that will work on desktop browsers as well as mobile phones (including iOS and Android).

In addition to learning realtime development strategies, you'll also learn progressive development strategies including responsive CSS3 layouts, AJAX development with jQuery, and more.

The future of the web is realtime. Grab your hoverboard.

  • Introduces you to the revolutionary capabilities of the HTML5 WebSocket API

  • Gets you started with WebSocket immediately using the super-simple Pusher API

  • Walks you through the development of a real-life realtime web app

  • Gets you working with responsive layouts, jQuery, and AJAX development

  • What you'll learn

  • Familiarize yourself with what "realtime" means and how it changes the web as we know it.

  • Learn how to utilize responsive web design and jQuery to create a single web app instead of multiple platform-specific applications.

  • Get up and running with the Pusher API to start developing realtime apps today.

  • Build a web app back-end with PHP and MySQL.

  • Integrate AJAX and realtime interactivity into your web app.

  • Use OAuth 2.0 to allow users to log in to your app (including Facebook and Twitter OAuth).

  • Who this book is for

    Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery is for the beginning- to intermediate-level web developer who is ready to usher in the next era of web apps. It's for those whose time is precious, but have a need to implement realtime functionality into their projects. Realtime Web Apps is written for—and by—geeks who love to expand their skillset but don't have weeks to dedicate to learning how to implement new technology. It's the perfect tool for busy web professionals who need to get up to speed with the latest the web has to offer quickly and in such a way that it's immediately applicable to their projects.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Authors
    6. Acknowledgments
    7. Introduction
    8. PART I: Getting Familiar with the Required Technologies
      1. CHAPTER 1: What Is Realtime?
        1. The Evolution of Media
        2. The Solution: WebSockets
        3. Why Bother Learning about Realtime Web Technologies?
        4. Using Realtime Web Technologies in Your Apps Now
        5. Summary
      2. CHAPTER 2: The Tools
        1. What Are We Building?
        2. Choosing Our Tools
        3. Summary
      3. CHAPTER 3: Pusher
        1. A Brief History of Pusher
        2. Why Use Pusher?
        3. Pusher Terminology
        4. Getting Started with Pusher
        5. Using Pusher to Send Events
        6. Debugging Your Pusher Application
        7. Summary
    9. PART II: Planning the App
      1. CHAPTER 4: Choosing Web Apps Over Native Apps
        1. Why Does It Matter?
        2. Factors to Consider
        3. Choosing Based on Requirements
        4. Summary
      2. CHAPTER 5: Determining the App’s Functionality and Structure
        1. What Does the App Do?
        2. What Doesn’t the App Do?
        3. What Roles Will Users Play?
        4. Front-End Planning
        5. Back-End Planning
        6. Putting Everything Together in a Wireframe
        7. Summary
    10. PART III: Building the Basics
      1. CHAPTER 6: Designing the App
        1. Setting Goals for the Design
        2. Defining the Color Palette
        3. Choosing Fonts
        4. Designing the Common Site Elements
        5. Designing the Home View
        6. Designing the Room View(s)
        7. Smaller Screen Layouts (and Why You’re Not Designing Them Here)
        8. Summary
      2. CHAPTER 7: Creating HTML and CSS Markup
        1. Starting with the Basics: Setting Up an HTML5 Document
        2. Getting Fonts Ready to Go
        3. Common Elements
        4. Developing the Home Page View
        5. Developing the Active Room View for Attendees
        6. Developing the Closed Room View for Attendees
        7. Developing the Room View for Presenters
        8. Summary
      3. CHAPTER 8: Building the Back End: Part 1
        1. Rolling Your Own Simple MVC Framework
        2. Adding the Header and Footer Markup
        3. Building the Home Page
        4. Adding an Error Handler
        5. Building the Database
        6. Handling Form Submissions
        7. Summary
      4. CHAPTER 9: Building the Back-End: Part 2
        1. Building the Questions
        2. Building the Rooms
        3. Testing it All Out
        4. Summary
      5. CHAPTER 10: Implementing Realtime Events and jQuery Effects
        1. Adding the Required Credentials and Libraries
        2. Implementing Realtime on the Back End
        3. Implementing Realtime on the Front End
        4. Adding Effects
        5. Summary
      6. APPENDIX A: OAuth
        1. What Is OAuth?
        2. How OAuth Works
        3. Why OAuth Is Better Than Building a Login System
    11. Index

    Product information

    • Title: Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery
    • Author(s): Jason Lengstorf, Phil Leggetter
    • Release date: April 2013
    • Publisher(s): Apress
    • ISBN: 9781430246206