Learn PHP 7: Object-Oriented Modular Programming using HTML5, CSS3, JavaScript, XML, JSON, and MySQL

Book description

This new book on PHP 7 introduces writing solid, secure, object-oriented code in the new PHP 7, carefully presented in a well-paced, clear fashion. In Learn PHP 7, programming examples take advantage of the newest PHP features, including enhanced password encryption using password_hash. This book takes a learn-by-doing approach, providing you with complete coding examples.

"Do It" exercises in each chapter provide the opportunity to make adjustments to the example code. The end of chapter programming exercises allow you to develop your own applications using the algorithms demonstrated in the chapter. You will experience the creation of a complete three-tier application using a natural process of building and testing modules within each tier.

Each tier is logically and physically separated using object-oriented and dependency injection techniques, thus allowing independent tiers that can be updated with little or no effect on the other tiers. In addition to teaching good programming practices through OOP, there is a strong emphasis on creating secure code. As each chapter is completed, the reader is provide the opportunity to design and create an application reinforcing the concepts learned.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. Acknowledgments
  8. Introduction
  9. Chapter 1: An Introduction to PHP 7
    1. Chapter Objectives/Student Learning Outcomes
    2. PHP 5.5+, PHP 7+, and PHP.NET
      1. PHP 5.6+ and PHP 7+
      2. Do It
    3. PHP, JavaScript, CSS, HTML, and Apache Web Server
      1. Do It
    4. PHP, Apache, and MySQL
      1. Do It
    5. Putting it All Together—PHP, Apache, and MySQL
      1. EasyPHP
      2. XAMPP
      3. Microsoft Internet Information Server
      4. Do It
    6. Testing Your Environment
      1. Testing Your Administration Environment
      2. Do It
      3. Testing Your PHP Environment
      4. EasyPHP’s Code Classroom
      5. Do It
    7. Alias Directories
      1. Do It
    8. Notepad++, Editors, and Code Testers
      1. Notepad++
      2. Other Editors
      3. Do It
    9. Chapter Terms
    10. Chapter Questions and Projects
  10. Chapter 2: Interfaces, Platforms, Containers, and Three-Tier Programming
    1. Chapter Objectives/Student Learning Outcomes
    2. PHP Platforms and Containers
      1. PHP PC Applications
      2. PHP Smart Phone Applications
      3. PHP Facebook and Other Social Applications
      4. Do It
      5. PHP, AJAX, and CSS—Web Applications
      6. PHP, AJAX, and CSS—Smart Phone Web Applications
    3. PHP Three-Tier Architecture
      1. Do It
      2. Interface Tier
      3. Do It
      4. Business Rules Tier
      5. Do It
      6. Data Tier
      7. Do It
      8. Putting It All Together
      9. Case Study
      10. Do It
    4. MVC and Dependency Injection
    5. Chapter Terms
    6. Chapter Questions and Projects
  11. Chapter 3: Modular Programming
    1. Chapter Objectives/Student Learning Outcomes
    2. PHP Libraries, Extensions, Classes, and Objects
    3. PHP Extensions
      1. Classes and Objects
    4. Creating a PHP Class
      1. Do It
    5. Return Method
      1. Do It
    6. Set Methods
      1. Do It
    7. Get Methods
      1. Do It
    8. Constructor Method
      1. Do It
    9. Chapter Terms
    10. Chapter Questions and Projects
  12. Chapter 4: Secured User Interfaces
    1. Chapter Objectives/Student Learning Outcomes
    2. Secured User Interaction
    3. HTML5 Form Validation
      1. Do It
    4. JavaScript Validation
      1. Do It
    5. PHP Filtering
      1. Do It
    6. Additional HTML Input Security
      1. HTML5 Select List Box and Radio Buttons
      2. Do It
      3. Validating Input with an XML File
    7. Dependency Injection
      1. Do It
    8. Chapter Terms
    9. Chapter Questions and Projects
  13. Chapter 5: Handling and Logging Exceptions
    1. Chapter Objectives/Student Learning Outcomes
    2. Handling Exceptions
      1. Do It
    3. Exception and Error Handling vs. If/Else Conditions
      1. Do It
    4. Logging Exceptions
      1. Do It
    5. Reading Log and Text Files
      1. Do It
    6. Chapter Terms
    7. Chapter Questions and Projects
  14. Chapter 6: Data Objects
    1. Chapter Objectives/Student Learning Outcomes
    2. The Data Class
    3. JSON Data
    4. MySQL Data
      1. Do It
    5. Backup and Recovery
    6. JSON Backup and Recovery
    7. MySQL Backup and Recovery
      1. Do It
    8. Connecting the Data Tier
      1. Do It
    9. Chapter Terms
    10. Chapter Questions and Projects
  15. Chapter 7: Authentication
    1. Chapter Objectives/Student Learning Outcomes
    2. Verification and Sessions
    3. JSON Data
    4. MySQL Data
      1. Do It
    5. Registration
    6. JSON Data
    7. MySQL Data
    8. Logging In
    9. JSON Data
    10. MySQL Data
    11. Change Password
    12. JSON Data
    13. MySQL Data
    14. Do It
    15. Chapter Terms
    16. Chapter Questions and Projects
  16. Chapter 8: Multifunctional Interfaces
    1. Chapter Objectives/Student Learning Outcomes
    2. The Complete Application
    3. Data Handling Using JavaScript
      1. Do It
    4. Updating, Deleting, and Inserting in the Interface Tier
      1. Do It
    5. Updating, Deleting, and Inserting in the Business Rules Tier
      1. Do It
    6. Final Touches
      1. Do It
    7. ABC Canine Shelter Reservation System Logical Design
      1. Limitations
    8. Chapter Terms
      1. Chapter Questions and Projects
  17. Index

Product information

  • Title: Learn PHP 7: Object-Oriented Modular Programming using HTML5, CSS3, JavaScript, XML, JSON, and MySQL
  • Author(s):
  • Release date: December 2015
  • Publisher(s): Apress
  • ISBN: 9781484217306