Expert PHP and MySQL: Application Design and Development

Book description

Expert PHP and MySQL takes you beyond learning syntax to showing you how to apply proven software development methods to building commerce-grade PHP and MySQL projects that will stand the test of time and reliably deliver on customer needs.

Developers of real-world applications face numerous problems that seem trivial on the surface, but really do take some skill to get right. Error handling is about more than just the mechanics in the PHP syntax, but also about handling MySQL errors, logging those errors, and about hiding information about application internals that error messages sometimes can expose.

Meet these challenges and more head-on! Author Marc Rochkind shows how to begin a project right, with a clear contract and set of written requirements. You'll learn about project organization, setting up a solid development environment, connecting with client personnel. Database design is essential, and Expert PHP and MySQL has you covered with guidance on creating a sound model and database, and on pushing functionality into the database as appropriate; not everything should be done in PHP.

Error handling is covered at both the PHP and MySQL levels. Application structure is covered. Guidance is provided on reporting. And finally there is conversion. In Expert PHP and MySQL you'll explore the following:

The popular and widely used combination of PHP and MySQL

  • Commercial-grade application of language and database features

  • Human factors such as planning and organization

  • Organizing a project to meet requirements and satisfy the customer

  • Structuring an application for efficient development and future modification

  • Coding PHP for productivity, reliability, security

  • Generating online, downloadable, and printed reports

  • Converting existing data to the new application

  • What you'll learn

  • Organize a project to meet requirements and satisfy the customer.

  • Structure an application for efficient development and future modification.

  • Design a database to model the business and support the application.

  • Code PHP for productivity, reliability, security.

  • Generate online, downloadable, and printed reports.

  • Convert existing data to the new application.

  • Who this book is for

    Expert PHP and MySQL is aimed at programmers competent in PHP and MySQL. Readers should know the mechanics of the language and the database, and have a desire to learn to build commercial systems that will stand the test of time and reliably deliver on customer needs.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. CHAPTER 1: Project Organization
      1. People Determine Success
      2. Projects Have Three Dimensions
      3. Requirements
      4. The Development Team
      5. The Schedule
      6. Why Projects Fail
      7. Managing the Project
      8. Dividing the Work
      9. The Workplace
      10. Issue Tracking
      11. Legal Matters
      12. Getting Paid
      13. Chapter Summary
    10. CHAPTER 2: Requirements
      1. Outline of the Requirements Document
      2. When the Requirements Change
      3. Use Cases
      4. Requirements War Stories
      5. Agile Requirements
      6. Chapter Summary
    11. CHAPTER 3: Platforms and Tools
      1. Client-Server Architecture
      2. Server Platform
      3. Client Platform
      4. Development Platform and Tools
      5. Hosting Alternatives
      6. Installing New Versions
      7. Chapter Summary
    12. CHAPTER 4: The Database
      1. Relational Databases
      2. SQL
      3. Entity-Relationship Modeling
      4. Physical Design
      5. Normalization
      6. Constraints
      7. Transactions
      8. Database Security
      9. Performance Optimization
      10. Do You Have a Good Database?
      11. Developing an Object-Relational Mapping Layer
      12. Chapter Summary
    13. CHAPTER 5: Application Structure
      1. Accessing MySQL from PHP
      2. PHP-Browser Interaction
      3. PHP Sessions
      4. A Page Framework
      5. Dealing with Relationships
      6. Chapter Summary
    14. CHAPTER 6: Security, Forms, and Error Handling
      1. PHP Security Overview
      2. Forms
      3. The User Table and Password Management
      4. Logging In and Handling Forgotten Passwords
      5. Changing a Password
      6. Using a YubiKey for 2FA Phase 2
      7. Error Handling
      8. Chapter Summary
    15. CHAPTER 7: Reports and Other Outputs
      1. Queries as Reports
      2. Role-Based Access Control
      3. The Report Class: HTML and CSV Output
      4. Generating PDFs from PHP
      5. The Report Class: PDF Output
      6. Using the Report Class to Build Reports
      7. A Generalized Reports Page
      8. Chapter Summary
    16. CHAPTER 8: Data Conversion
      1. Conversion in the Development Process
      2. Conversion Sources
      3. Generating Conversion Programs Automatically
      4. Dates, Times, and Character Conversion
      5. After Conversion
      6. Variant Names
      7. Chapter Summary
    17. Index

    Product information

    • Title: Expert PHP and MySQL: Application Design and Development
    • Author(s): Marc Rochkind
    • Release date: August 2013
    • Publisher(s): Apress
    • ISBN: 9781430260073