
PHP 7: Real World Application Development
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Content
- Cover
- Credits
- Preface
- Module 1: PHP 7 Programming Cookbook
- Chapter 1: Building a Foundation
- Introduction
- PHP 7 installation considerations
- Using the built-in PHP web server
- Defining a test MySQL database
- Installing PHPUnit
- Implementing class autoloading
- Hoovering a website
- Building a deep web scanner
- Creating a PHP 5 to PHP 7 code converter
- Chapter 2: Using PHP 7 High Performance Features
- Introduction
- Understanding the abstract syntax tree
- Understanding differences in parsing
- Understanding differences in foreach() handling
- Improving performance using PHP 7 enhancements
- Iterating through a massive file
- Uploading a spreadsheet into a database
- Recursive directory iterator
- Chapter 3: Working with PHP Functions
- Introduction
- Developing functions
- Hinting at data types
- Using return value data typing
- Using iterators
- Writing your own iterator using generators
- Chapter 4: Working with PHP Object-Oriented Programming
- Introduction
- Developing classes
- Extending classes
- Using static properties and methods
- Using namespaces
- Defining visibility
- Using interfaces
- Using traits
- Implementing anonymous classes
- Chapter 5: Interacting with a Database
- Introduction
- Using PDO to connect to a database
- Building an OOP SQL query builder
- Handling pagination
- Defining entities to match database tables
- Tying entity classes to RDBMS queries
- Embedding secondary lookups into query results
- Implementing jQuery DataTables PHP lookups
- Chapter 6: Building Scalable Websites
- Introduction
- Creating a generic form element generator
- Creating an HTML radio element generator
- Creating an HTML select element generator
- Implementing a form factory
- Chaining $_POST filters
- Chaining $_POST validators
- Tying validation to a form
- Chapter 7: Accessing Web Services
- Introduction
- Converting between PHP and XML
- Creating a simple REST client
- Creating a simple REST server
- Creating a simple SOAP client
- Creating a simple SOAP server
- Chapter 8: Working with Date/Time and International Aspects
- Introduction
- Using emoticons or emoji in a view script
- Converting complex characters
- Getting the locale from browser data
- Formatting numbers by locale
- Handling currency by locale
- Formatting date/time by locale
- Creating an HTML international calendar generator
- Building a recurring events generator
- Handling translation without gettext
- Chapter 9: Developing Middleware
- Introduction
- Authenticating with middleware
- Using middleware to implement access control
- Improving performance using the cache
- Implementing routing
- Making inter-framework system calls
- Using middleware to cross languages
- Chapter 10: Looking at Advanced Algorithms
- Introduction
- Using getters and setters
- Implementing a linked list
- Building a bubble sort
- Implementing a stack
- Building a binary search class
- Implementing a search engine
- Displaying a multi-dimensional array and accumulating totals
- Chapter 11: Implementing Software Design Patterns
- Introduction
- Creating an array to object hydrator
- Building an object to array hydrator
- Implementing a strategy pattern
- Defining a mapper
- Implementing object-relational mapping
- Implementing the Pub/Sub design pattern
- Chapter 12: Improving Web Security
- Introduction
- Filtering $_POST data
- Validating $_POST data
- Safeguarding the PHP session
- Securing forms with a token
- Building a secure password generator
- Safeguarding forms with a CAPTCHA
- Encrypting/decrypting without mcrypt
- Chapter 13: Best Practices, Testing, and Debugging
- Introduction
- Using Traits and Interfaces
- Universal exception handler
- Universal error handler
- Writing a simple test
- Writing a test suite
- Generating fake test data
- Customizing sessions using session_start parameters
- Chapter 14: Defining PSR-7 Classes
- Introduction
- Implementing PSR-7 value object classes
- Developing a PSR-7 Request class
- Defining a PSR-7 Response class
- Module 2: Learning PHP 7 High Performance
- Chapter 1: Setting Up the Environment
- Setting up Windows
- Setting up Debian or Ubuntu
- Setting up CentOS
- Setting up Vagrant
- Summary
- Chapter 2: New Features in PHP 7
- OOP features
- New operators
- Uniform variable syntax
- Miscellaneous features and changes
- Summary
- Chapter 3: Improving PHP 7 Application Performance
- NGINX and Apache
- HTTP server optimization
- HTTP persistent connection
- Content Delivery Network (CDN)
- CSS and JavaScript optimization
- Full page caching
- Varnish
- The infrastructure
- Summary
- Chapter 4: Improving Database Performance
- The MySQL database
- Storage engines
- The Percona Server - a fork of MySQL
- MySQL performance monitoring tools
- Percona XtraDB Cluster (PXC)
- Redis - the key-value cache store
- Memcached key-value cache store
- Summary
- Chapter 5: Debugging and Profiling
- Xdebug
- Profiling with Xdebug
- PHP DebugBar
- Summary
- Chapter 6: Stress/Load Testing PHP Applications
- Apache JMeter
- ApacheBench (ab)
- Siege
- Load testing real-world applications
- Summary
- Chapter 7: Best Practices in PHP Programming
- Coding styles
- Test-driven development (TDD)
- Design patterns
- Service-oriented architecture (SOA)
- Being object-oriented and reusable always
- PHP frameworks
- Version control system (VCS) and Git
- Deployment and Continuous Integration (CI)
- Summary
- Chapter 8: Tools to Make Life Easy
- Composer - A dependency manager for PHP
- Git - A version control system
- Grunt watch
- Summary
- Chapter 9: MVC and Frameworks
- The MVC design pattern
- Laravel
- Lumen
- Apigility
- Summary
- Module 3: Modernizing Legacy Applications in PHP
- Chapter 1: Legacy Applications
- The typical PHP application
- Legacy Frameworks
- Review and next steps
- Chapter 2: Prerequisites
- Revision control
- Test suite
- Review and next steps
- Chapter 3: Implement an Autoloader
- PSR-0
- A Single Location for Classes
- Using The __autoload() Function
- Common Questions
- Review and next steps
- Chapter 4: Consolidate Classes and Functions
- Consolidate Class Files
- Consolidate functions into class files
- Common Questions
- Review and next steps
- Chapter 5: Replace global With Dependency Injection
- Global Dependencies
- Common Questions
- Review and next steps
- Chapter 6: Replace new with Dependency Injection
- Embedded instantiation
- The replacement process
- Change instantiation calls
- Review and next steps
- Chapter 7: Write Tests
- Fighting test resistance
- The way of Testivus
- Review and next steps
- Chapter 8: Extract SQL statements to Gateways
- Embedded SQL Statements
- Review and next steps
- Chapter 9: Extract Domain Logic to Transactions
- Embedded Domain Logic
- The Extraction Process
- Review and next steps
- Chapter 10: Extract Presentation Logic to View Files
- Embedded presentation logic
- Review and next steps
- Chapter 11: Extract Action Logic to Controllers
- Embedded action logic
- Review and next steps
- Chapter 12: Replace Includes in Classes
- Embedded include Calls
- The Replacement process
- Review and next steps
- Chapter 13: Separate Public and Non-Public Resources
- Intermingled resources
- The separation process
- Common Questions
- Review and next steps
- Chapter 14: Decouple URL Paths from File Paths
- Coupled Paths
- Review and next steps
- Chapter 15: Remove Repeated Logic in Page Scripts
- Repeated logic
- Review and next steps
- Chapter 16: Add a Dependency Injection Container
- What is a Dependency Injection Container?
- Review and next steps
- Chapter 17: Conclusion
- Opportunities for improvement
- Conversion to Framework
- Review and next steps
- Appendix A: Typical Legacy Page Script
- Appendix B: Code before Gateways
- Appendix C: Code after Gateways
- Appendix D: Code after Transaction Scripts
- Appendix E: Code before Collecting Presentation Logic
- Appendix F: Code after Collecting Presentation Logic
- Appendix G: Code after Response View File
- Appendix H: Code after Controller Rearrangement
- Appendix I: Code after Controller Extraction
- Appendix J: Code after Controller Dependency Injection
- Bibliography
System requirements
File format: ePUB
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 (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
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.
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.