1st Edition

Dynamic Web Programming and HTML5

By Paul S. Wang Copyright 2013
    664 Pages 272 B/W Illustrations
    by Chapman & Hall

    664 Pages
    by Chapman & Hall

    With organizations and individuals increasingly dependent on the Web, the need for competent, well-trained Web developers and maintainers is growing. Helping readers master Web development, Dynamic Web Programming and HTML5 covers specific Web programming languages, APIs, and coding techniques and provides an in-depth understanding of the underlying concepts, theory, and principles. The author leads readers through page structuring, page layout/styling, user input processing, dynamic user interfaces, database-driven websites, and mobile website development.

    After an overview of the Web and Internet, the book focuses on the new HTML5 and its associated open Web platform standards. It covers the HTML5 markup language and DOM, new elements for structuring Web documents and forms, CSS3, and important JavaScript APIs associated with HTML5. Moving on to dynamic page generation and server-side programming with PHP, the text discusses page templates, form processing, session control, user login, database access, and server-side HTTP requests. It also explores more advanced topics such as XML and PHP/MySQL.

    Suitable for a one- or two-semester course at the advanced undergraduate or beginning graduate level, this comprehensive and up-to-date guide helps readers learn modern Web technologies and their practical applications. Numerous examples illustrate how the programming techniques and other elements work together to achieve practical goals.

    Online Resource
    Encouraging hands-on practice, the book’s companion website at http://dwp.sofpower.com helps readers gain experience with the technologies and techniques involved in building good sites. Maintained by the author, the site offers:

    • Live examples organized by chapter and cross-referenced in the text
    • Programs from the text bundled in a downloadable code package
    • Searchable index and appendices
    • Ample resource listings and information updates

    The Web: An Overview
    Web Is Part of the Internet
    IP Addresses and Domain Names
    Web Clients and Servers
    URLs
    Handling Different Content Types
    HTML and HTML5
    Webpage Styling
    Web Hosting
    Web Servers
    Domain Registration
    DNS
    Dynamic Generation of Webpages
    Database Access
    Client-Side Scripting
    Document Object Model
    Hypertext Transfer Protocol
    Web Development
    For More Information

    Webpage Markup with HTML5
    HTML5 Page Structure
    Creating a Webpage
    HTML5 Elements and Entities
    The Evolution of HTML
    HTML5 Features and Advantages
    Webpage Syntax
    HTML5 Core Attributes
    Webpage Architecture
    Headings and Paragraphs
    White Space and Line Wrapping
    Phrasing Elements
    Webpage Presentation Styles
    Itemized Lists
    List Styles
    Links in Webpages
    Navbars
    Pictures and Images in Webpages
    Figures
    Image Encoding Formats
    Image Maps
    Webpage Layout
    Debugging and Validation

    Audio, Video, and More HTML5
    Audio for the Web
    Playing Video
    Embedding Media
    Tables
    Using Tables for Page Layout
    Pagewide Style with body
    HTML5 Entities
    Webpage Character Encoding
    Numeric and Named Character References
    Metadata and Head Elements
    Subordinate Webpages with iframe
    Website File Organization
    Internationalization

    Styling with CSS
    CSS Basics
    Whole-Page Styling
    Centering and Indenting
    Centered Page Layout
    Multicolumn Layout
    CSS Selectors
    Link Styles
    Conflicting Rules
    Style Properties
    Webpage Layout with CSS
    A Vertical Navbar
    Page Formatting Model
    Margin, Border, and Padding
    Preformatted Content
    Controlling Content Overflow
    Styled Buttons
    Drop Shadows
    Borders by Custom Images
    Background Colors and Images
    Color Gradient
    Browser Support for CSS
    At-Rules
    Explicit Element Positioning
    CSS-Generated Content
    Translucent Callout via CSS
    Understanding the Cascade
    Additional Style Features
    For More Information

    Forms, PHP, and Form Processing
    A Simple Form
    Basic Input Elements
    Text Input
    Input in Standard Formats
    User Choices and Selections
    Form Submission
    File Uploading
    Other input Elements
    Layout and Styling of Forms
    CSS for Form Presentation
    Forms and HTTP
    HTTP Message Format
    Formdata Security and HTTPS
    Form Processing Overview
    PHP Scripting Overview
    An Introduction to PHP
    Strings in PHP
    Arrays in PHP
    Getting Started with Form Processing
    Form Processing Example: Club Membership
    HTTP Request Data Exposed
    Processing File Upload

    Dynamic User Interface with JavaScript
    About JavaScript
    Getting Started with JavaScript
    Placing JavaScript in Webpages
    Image Rollovers
    Image Preloading
    Presenting a Slide Show
    JavaScript Arrays
    A Conversion Calculator
    Audio/Video Control
    Pull-down Menus
    CSS Transitions
    Menu Fade-in and Fade-out
    Animated Pull-down Menu
    Sliding Menus for a Left Navbar
    Using Windows
    JavaScript Language Basics
    JavaScript Form Checking
    Smooth Scrolling Text
    Animation with CSS
    Transform with CSS
    Events and Event Objects
    Testing and Debugging
    For More Information

    HTML5 DOM and APIs
    What Is DOM?
    Browser Support of DOM
    HTML5 DOM API Overview
    Putting DOM to Work
    Node API
    DOM Tree Depth-First Traversal
    The DOM HTMLElement Interface
    HTMLElement Fields and Methods
    Document and HTMLDocument Interfaces
    Generating New Content
    A Smart Form
    Client-Side Data Sorting
    A Better User Interface for File/Image Upload
    TicTacToe with Drag-and-Drop
    Tower of Hanoi
    DnD Local Files
    Canvas Element and API
    For More Information

    Server-Side Programming with PHP
    Page Templates
    PHP Functions
    Form Generation and Processing
    File I/O in PHP
    PHP Error Reporting and Debugging
    Login with Basic Authentication
    Session Control
    Crazy Pizza Shop
    Security Code Verification
    Login Sessions
    Image Manipulation
    Providing Content Management
    HTML5 contenteditable API
    Updating the AMP
    PHP Classes and Objects
    System Calls and Script Security
    For More Information

    Database-Driven Websites
    What Is a Database?
    Relational Databases
    SQL: Structured Query Language
    SQL Queries
    Creating Tables
    CREATE TABLE Queries
    MySQL Data Types
    PHP Database Access
    User Authentication Using Database
    INSERT and DELETE Queries
    Database Supporting Product Orders
    Displaying Shopping Carts
    Handling Query Results and Errors
    Receiving Payments
    Prepared Statements
    Guarding against SQL Injection
    The phpMyAdmin Tool
    PHP Built-in Database System
    For More Information

    Web Hosting: Apache, PHP, and MySQL
    What Is a Web Server?
    URL and URI
    Request Processing
    Response and Content Types
    Apache Web Server
    Accessing Linux Server Host
    Linux Files Access Control
    Running Apache on Linux
    Apache Run-Time Configuration
    Apache Web Access Control
    Requiring Passwords
    How HTTP Basic Authentication Works
    How HTTP Digest Authentication Works
    Password Encryption
    Automatic File Deflation
    URI to Document Space Mapping
    Virtual Hosting
    Installing Apache with Package Management
    Manual Installation of Apache
    SSL/TLS
    PHP Module for Apache
    Testing PHP
    PHP Configuration
    HTTP Caching
    MySQL
    Installing phpMyAdmin
    Installing MySQL
    Linux Package Management
    For More Information

    XML, AJAX, and Web Services
    What Is XML?
    XML Document Format
    News Syndication Formats
    Browser Display of XML Documents
    Transforming XML Documents with XSL
    Named Templates and Template Calls
    XML Processing in PHP
    XPath
    AJAX
    Soup of the Day
    AJAX GET and POST Requests
    Web Services
    Accessing Web Services from PHP
    Address Verification Web Service
    AJAX: Form Address Verification
    AJAX File Upload
    XML Namespaces
    For More Information

    SVG and MathML
    Including SVG and MathML in HTML5
    SVG
    SVG Markers, Patterns, and Transforms
    SVG Animation
    SVG User Interaction and Scripting
    Knocking Balls Simulation
    SVG versus HTML5 Canvas
    MathML
    Infix to MathML Conversion
    MathML for Mathematics Education
    Combining SVG with MathML
    For More Information

    HTML5 and Mobile Websites
    Mobile Web Browsing
    Mobile Website Strategies
    Mobile Layout and Navigation
    CSS Media Queries
    Mobile Webpages
    The Viewport
    Automatic Redirection to Mobile Site
    Touch Swipe Slide Show
    Taking Advantage of the Smartphone
    Conversion to Mobile
    Webapps
    Mobile Site Testing and Debugging
    For More Information

    Bibliography

    Index

    A Summary and Exercises appear at the end of each chapter.

    Biography

    Paul S. Wang is a professor emeritus of computer science at Kent State University. A leading expert in symbolic and algebraic computation (SAC) and web-based mathematics education (WME), Dr. Wang has conducted over 40 research projects funded by government and industry. In 2001, he received the Ohio Governor's Award for University Faculty Entrepreneurship. His main research interests include polynomial algorithms, parallel and distributed SAC, Internet-accessible mathematical computation, and enabling technologies for web-based mathematics education. He earned a Ph.D. from MIT.

    "How do you teach web development for any type of device, and what do you include? What do you use for instructional materials? Where do you begin if you want to teach yourself? This book is where you start. It is suitable for instruction at the upper-division undergraduate level or the first-year of graduate school, as well as for self-study. The scope of topics is broad, including Hypertext Markup Language (HTML) and HTML5, cascading style sheets (CSS), the document object model (DOM), JavaScript, PHP programming, MySQL database support, Apache web hosting, Extensible Markup Language (XML), Ajax, scalable vector graphics (SVG) and MathML, and mobile device computing. This is an ambitious list of topics to cover in a little over 600 pages. Fortunately, it looks like the author succeeded in his goal."
    —Computing Reviews, March 2014