Modular Programming with PHP 7

PHP 7 was released, bringing numerous improvements and new features:
• New version of the Zend Engine
• Improved performance (twice as fast as PHP 5.6)
• Significantly reduced memory usage
• Abstract Syntax Tree
• Consistent 64-bit support
• Improved exception hierarchy
• Many fatal errors converted to exceptions
• Secure random number generator
• Removed old and unsupported SAPIs and extensions
• The null coalescing operator
• Return and Scalar type declarations
Anonymous classes
• Zero cost asserts

Application frameworks are a collection of functions, classes, configurations, and conventions all designed to support the development of web applications, services, and APIs. Some applications are embracing an API first approach, whereas serverside REST and SOAP APIs are built via PHP, and client side in other technologies like JavaScript.
When building a web application, we usually have three obvious choices:
• We can build everything ourselves, from scratch. This way, our development process might be slow, but we can achieve architecture built entirely per our standards. Needless to say, this is a highly unproductive approach.
• We can use one of the existing frameworks. This way, our development process is fast, but we need to be happy that our application is built on top of other things.
• We can use one of the existing frameworks but also try to abstract it to the level where our application looks independent of it. This is a painful and slow approach, to say the least. It involves writing numerous adapters,
wrappers, interfaces, and so on.

The benefits of using frameworks outweigh the purity of doing it all from scratch. Frameworks are usually well supported and documented, which makes it easier for teams to catch up with libraries, project structure, conventions, and other things. When it comes to PHP frameworks, it is worth pointing out a few popular ones:
• Laravel: https://laravel.com
• Symfony: http://symfony.com
• Zend Framework: http://framework.zend.com
• CodeIgniter: https://www.codeigniter.com
• CakePHP: http://cakephp.org
• Slim: http://www.slimframework.com
• Yii: http://www.yiiframework.com
• Phalcon: https://phalconphp.com

Chapter 1: Ecosystem Overview
Getting ready for PHP 7
Scalar type hints
Return type hints
Anonymous classes
The Closure::call() method
Generator delegation
Generator return expressions
The null coalesce operator
The Spaceship operator
Throwables
The \ParseError
Level support for the dirname() function
The integer division function
Constant arrays
Uniform variable syntax
Secure random number generator
Filtered unserialize()
Context sensitive lexer
Group use declarations
Unicode enhancements
Assertions
Changes to the list() construct
Session options
Deprecated features
Frameworks
Laravel framework
Symfony
Zend Framework
CodeIgniter
CakePHP
Slim
Yii
Phalcon
Chapter 2: GoF Design Patterns
Creational patterns
Abstract factory pattern
Builder pattern
Factory method pattern
Prototype pattern
Singleton pattern
Structural patterns
Adapter pattern
Bridge pattern
Composite pattern
Decorator pattern
Facade pattern
Flyweight pattern
Proxy pattern
Behavioral patterns
Chain of responsibility pattern
Command pattern
Interpreter pattern
Iterator pattern
Mediator pattern
Memento pattern
Observer pattern
State pattern
Strategy pattern
Template pattern
Visitor pattern
Chapter 3: SOLID Design Principles
Single responsibility principle
Open/closed principle
Liskov substitution principle
Interface Segregation Principle
Dependency inversion principle
Chapter 4: Requirement Specification for a Modular
Web Shop App
Defining application requirements
Wireframing
Defining a technology stack
The Symfony framework
Foundation framework
Chapter 5: Symfony at a Glance
Installing Symfony
Creating a blank project
Using Symfony console
Controller
Routing
Templates
Forms
Configuring Symfony
The bundle system
Databases and Doctrine
Testing
Validation
Chapter 6: Building the Core Module
Requirements
Dependencies
Implementation
Configuring application-wide security
Unit testing
Functional testing
Chapter 7: Building the Catalog Module
Requirements
Dependencies
Implementation
Creating entities
Managing image uploads
Overriding core module services
Setting up a Category page
Setting up a Product page
Unit testing
Functional testing
Chapter 8: Building the Customer Module
Requirements
Dependencies
Implementation
Creating a customer entity
Modifying the security configuration
Extending the customer entity
Creating the orders service
Creating the customer menu service
Implementing the register process
Implementing the login process
Implementing the logout process
Managing forgotten passwords
Unit testing
Functional testing
Chapter 9: Building the Payment Module
Requirements
Dependencies
Implementation
Creating a card entity
Creating a card payment service
Creating a card payment controller and routes
Creating a check money payment service
Creating a check money payment controller and routes
Unit testing
Functional testing
Chapter 10: Building the Shipment Module
Requirements
Dependencies
Implementation
Creating a flat rate shipment service
Creating a flat rate shipment controller and routes
Creating a dynamic rate payment service
Creating a dynamic rate shipment controller and routes
Unit testing
Functional testing
Chapter 11: Building the Sales Module
Requirements
Dependencies
Implementation
Creating a Cart entity
Creating the cart item entity
Creating an Order entity
Creating a SalesOrderItem entity
Overriding the add_to_cart_url service
Overriding the checkout_menu service
Overriding the customer orders service
Overriding the bestsellers service
Creating the Cart page
Creating the Payment service
Creating the Shipment service
Creating the Checkout page
Creating the order success page
Creating a store manager dashboard
Unit testing
Functional testing
Chapter 12: Integrating and Distributing Modules
Understanding Git
Understanding GitHub
Understanding Composer
Understanding Packagist

Modular Programming with PHP 7

No comments:

Post a Comment