PHP 7 programming blueprints develop production-ready web applications with PHPBlueprints
Learn how to exploit the impressive power of PHP 7 with this collection of practical project blueprints ? begin building better applications for the web today! About This Book Don't just learn PHP 7 ? follow a diverse range of practical knowledge to get started quickly Take advantage of PHP 7...
Otros Autores: | , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, England :
Packt Publishing
2016.
|
Edición: | 1st edition |
Colección: | Community experience distilled.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630072006719 |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Authors
- About the Reviewer
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Create a User Profile System and use the Null Coalesce Operator
- The null coalesce operator
- Separation of Concerns
- Creating views
- Create a profile input form
- Admin system
- Summary
- Chapter 2: Build a Database Class and Simple Shopping Cart
- Building the database abstraction class
- Raw query method
- Create method
- Read method
- Select all method
- Delete method
- Update method
- first_of method
- last_of method
- iterate_over method
- searchString method
- Using the convert_to_json method to implement a simple API
- Shopping Cart
- Building the shopping items list
- Item template rendering function
- Adding checkboxes to the Shopping List page
- Cookies in PHP
- Building the Checkout page
- Thank you page
- Installing TCPDF
- Admin for managing purchases
- Summary
- Chapter 3: Building a Social Newsletter Service
- Authentication system
- Creating a social login for members
- Member dashboard
- Marketers dashboard
- Administration system for managing marketers
- Custom template for our newsletter
- Link tracking
- AJAX socket chat for support
- Introduction to socket.io
- Summary
- Chapter 4: Build a Simple Blog with Search Capability using Elasticsearch
- Creating the CRUD and admin system
- Seeding the post table
- What is Elasticsearch?
- Installing Elasticsearch and the PHP client
- Building a PHP Elasticsearch tool
- Adding documents to our Elasticsearch
- Querying Elasticsearch
- Installing Logstash
- Setting up the Logstash configuration
- Installing PHP Redis
- Encoding and decoding JSON messages
- Storing Apache logs in Elasticsearch
- Getting filtered data to display with Highcharts
- Dashboard app for viewing Elasticsearch logs.
- Simple search engine with result caching
- Cache basics
- Cache invalidation of Redis data
- Using browser localStorage as cache
- Working with streams
- Storing and searching XML documents using PHP
- Using Elasticsearch to search a social network database
- Displaying randomized search engine results
- Summary
- Chapter 5: Creating a RESTful Web Service
- RESTful basics
- REST architectures
- Common HTTP methods and response codes
- First steps with the Slim framework
- Installing Slim
- A small sample application
- Accepting URL parameters
- Accepting HTTP requests with a message body
- The PSR-7 standard
- Middleware
- Implementing the REST service
- Designing the service
- Bootstrapping the project
- Building the persistence layer with MongoDB
- Adding and retrieving users
- Listing and searching users
- Deleting profiles
- Validating input
- Streams and large files
- Profile image upload
- Using GridFS storage
- Summary
- Chapter 6: Building a Chat Application
- The WebSocket protocol
- First steps with Ratchet
- Architectural considerations
- Getting started
- Testing WebSocket applications
- Playing with the event loop
- Implementing the chat application
- Bootstrapping the project server-side
- Bootstrapping the HTML user interface
- Building a simple chat application
- Receiving messages
- Sending messages
- Testing the application
- Keeping the connection from timing out
- Deployment options
- Bridging Ratchet and PSR-7 applications
- Accessing your application via the web server
- Adding authentication
- Creating the login form
- Checking the authorization
- Connecting users and messages
- Summary
- Chapter 7: Building an Asynchronous Microservice Architecture
- The target architecture
- ZeroMQ patterns
- Request/reply pattern
- Publish/subscribe pattern
- Push/pull pattern.
- Bootstrapping the project
- Building the inventory service
- Getting started with ZeroMQ REQ/REP sockets
- Using JsonRPC for communication
- Making the inventory service multithreaded
- Building the checkout service
- Using react/zmq
- Working with promises
- Building the mailing service
- Building the shipping service
- PUSH/PULL for beginners
- Fan-out/fan-in
- Bridging ZeroMQ and HTTP
- Summary
- Chapter 8: Building a Parser and Interpreter for a Custom Language
- How interpreters and compilers work
- Languages and grammars
- Your first PEG parser
- Evaluating expressions
- Building an Abstract Syntax Tree
- Building a better interface
- Evaluating variables
- Adding logical expressions
- Comparisons
- The "and" and "or" operators
- Conditions
- Working with structured data
- Working with objects
- Optimizing the interpreter by adding a compiler
- Verifying performance improvements
- Summary
- Chapter 9: Reactive Extensions in PHP
- An introduction to observables
- Introduction to event loop and ReactiveX
- delay
- defer
- Scheduler
- recursive-scheduler
- map and flatMap
- reduce
- toArray
- merge
- do
- scan
- zip
- Parsing logs through a Reactive scheduler
- Event queues with ReactiveX
- Summary
- Index.