首頁(yè) > 計(jì)算機(jī)網(wǎng)絡(luò) > 編程語(yǔ)言與程序設(shè)計(jì) > Building RESTful Web Services with PHP 7
舉報(bào)

會(huì)員
Building RESTful Web Services with PHP 7
最新章節(jié):
What's next
ThisbookisforPHPdeveloperswhowishtolearnabouttheRESTarchitecturetobeabletobuildandconsumeRESTAPIsintheirapplications.
最新章節(jié)
- What's next
- Summary
- Shared library or common code
- Asynchronous communication
- Synchronous communication
- Inter-services communication
品牌:中圖公司
上架時(shí)間:2021-07-02 18:58:15
出版社:Packt Publishing
本書(shū)數(shù)字版權(quán)由中圖公司提供,并由其授權(quán)上海閱文信息技術(shù)有限公司制作發(fā)行
- What's next 更新時(shí)間:2021-07-03 00:02:54
- Summary
- Shared library or common code
- Asynchronous communication
- Synchronous communication
- Inter-services communication
- Deployments
- Implementation
- Dynamic log levels
- Track chain of requests
- Logs should be searchable
- Logs should be centralized
- Debugging and fault-finding
- Performance
- Infrastructure maintenance
- Challenges of micro-services
- Team structure
- How it is different from SOA
- Parallelization
- Replaceability
- Resilience
- Technology diversity
- Scalability
- Maintenance and debugging
- Motivation towards microservices
- How to divide an application into microservices?
- Introducing Microservices
- Microservices
- More resources
- Summary
- Other test cases
- API tests for post resource
- Writing test cases
- Configuring the API suite
- Creating the API suite
- tests/_support/Helper/{suite-name}.php
- tests/_support/{suite-name}Tester.php
- tests/_support/_generated/{suite-name}TesterActions.php
- tests/{suite-name}.suite.yml
- tests/{suite-name}/
- Setup and understanding the structure
- CodeCeption introduction
- Testing frameworks
- What type of testing will we do?
- Integration testing
- Functional testing
- Acceptance testing
- Unit testing
- Types of testing
- The need for automated tests
- API Testing – Guards on the Gates
- Summary
- SSL certificate different options
- Encryption
- Using transformers
- Understanding and setting transformers
- Transformers
- Refresh token
- Invalidate token
- Log in
- Authentication
- Simpler way through Lumen JWT authentication integration package
- The Manual way
- JWT Auth setup
- Authentication and middleware
- Responses
- Internal requests
- Rate limiting
- API versioning
- Simplifying routes
- Installation and configuration
- Dingo simplifying RESTful API development
- Improving RESTful Web Services
- Summary
- Comment Resource Implementation
- Other missing elements
- User authentication
- /api/posts/1 with the DELETE method
- /api/posts/1 with the PATCH/PUT method
- /api/posts/1 with the GET method
- /api/posts with the POST method
- /api/posts with GET method
- Validation and negative cases?
- What we are missing?
- Controller Implementation
- Eloquent relationships
- Creating models
- Eloquent ORM (model layer)
- REST resource
- Lumen routes
- Writing the first controller
- Writing RESTful web service endpoints
- Writing migrations
- Setting up the database
- Configuration
- Installing Lumen
- Unit testing
- Database migration and seeding
- Eloquent ORM
- Validation
- HTTP responses
- Service Container and Dependency Injection
- Middle-wares
- Router
- Separate configurations
- A Good Structure
- What exactly Lumen provides
- How Lumen is different from Laravel
- What Lumen has in common with Laravel
- What Lumen provides
- Why Lumen?
- Why micro-framework?
- Introducing Lumen
- Illuminating RESTful Web Services with Lumen
- Summary
- Example
- Composer for creating a project
- Example
- Composer as an auto-loader
- The composer.lock
- The scripts
- The autoload and autoload-dev
- The require-dev object
- The require object
- The composer.json in detail
- Installing using composer.json
- Installing packages
- Composer as a dependency manager
- Usage of Composer
- Global Installation
- Installation on Linux/Unix/OS X
- Installation on Windows
- Installation
- Introduction to Composer
- Load and Resolve with Composer an Evolutionary
- Summary
- Available reusable code
- Input validation
- Restricting allowable verbs
- Insecure direct object reference
- Public API endpoints
- Public and private endpoints
- Limited scope access token
- Access token expiration
- Not passing an access token in the URL
- Securing an API key/token
- Use of HTTPS
- Common security threats in RESTful web services
- What is Auth middleware?
- Securing API endpoints
- Security
- DB fields abstraction
- Meta information missing
- Handling 404 and other errors
- Input validation
- Should write tests
- Separate Configurations from Implementation
- Usage of OOP
- Incomplete router
- Missing query builder layer
- Structural and design flaws
- Finding problems in the current code
- Reviewing Design Flaws and Security Threats
- Summary
- Proper 404 pages
- Solution
- Authentication
- Solution
- Validation
- Visible flaws
- To do
- REST client
- Creating blog post endpoints
- Code sync
- Router class
- DB class
- Common components
- Code structure
- Creating a RESTful API's endpoint
- Blog post comments schema
- Blog post table schema
- SQL for users table
- Blog user/author table schema
- Creating a database schema
- Creating a REST API for a blog in PHP
- Creating RESTful Endpoints
- Summary
- More resources
- Multi-catch exception handling
- Support for keys in list()
- Symmetric array destructuring
- Nullable types
- PHP7.1
- Errors and exceptions
- Closure::call()
- Anonymous classes
- Generator delegation
- Generator return expression
- What are generators?
- Generator-related features
- Group use declarations
- Spaceship operator
- Null coalescing operator
- Return type declaration
- Scalar type declaration
- PHP7 To Code It Better
- Summary
- More resources
- Listing all comments for a particular post
- Deleting a post comment
- Updating a comment
- Reading a comment
- Creating the post's comment
- Endpoints
- Requirements
- Blog post comments
- Listing all blog posts
- Delete blog post
- Updating blog post
- Reading blog post
- Creating blog post
- Endpoints
- Requirements
- Blog post
- Case study - RESTful web service endpoints for a blog
- Response codes
- Response type
- HTTP response
- Idempotent and non-idempotent methods
- Safe/unsafe HTTP methods
- Nature of HTTP methods
- REST versus SOAP
- Why RESTful web services?
- Delete operation
- Update operation
- READ operation
- Create operation
- List operation
- HTTP verbs and URL structure
- Conventions of RESTful web services
- RESTful web services
- Layered system
- Code on demand (optional)
- Hypermedia as the engine of application state (HATEOAS)
- Self-descriptive messages
- Manipulation of resources through representations
- Resource identification
- Uniform interface
- Cache-able
- Stateless
- Client server
- REST architecture
- Why a web service?
- Web services
- RESTful Web Services Introduction and Motivation
- Questions
- Piracy
- Errata
- Downloading the example code
- Reader feedback
- Conventions
- Who this book is for
- What you need for this book
- What this book covers
- Preface
- Customer Feedback
- Why subscribe?
- www.PacktPub.com
- About the Reviewer
- About the Author
- Credits
- Building RESTful Web Services with PHP 7
- Copyright
- Title Page
- cover
- cover
- Title Page
- Copyright
- Building RESTful Web Services with PHP 7
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Why subscribe?
- Customer Feedback
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Downloading the example code
- Errata
- Piracy
- Questions
- RESTful Web Services Introduction and Motivation
- Web services
- Why a web service?
- REST architecture
- Client server
- Stateless
- Cache-able
- Uniform interface
- Resource identification
- Manipulation of resources through representations
- Self-descriptive messages
- Hypermedia as the engine of application state (HATEOAS)
- Code on demand (optional)
- Layered system
- RESTful web services
- Conventions of RESTful web services
- HTTP verbs and URL structure
- List operation
- Create operation
- READ operation
- Update operation
- Delete operation
- Why RESTful web services?
- REST versus SOAP
- Nature of HTTP methods
- Safe/unsafe HTTP methods
- Idempotent and non-idempotent methods
- HTTP response
- Response type
- Response codes
- Case study - RESTful web service endpoints for a blog
- Blog post
- Requirements
- Endpoints
- Creating blog post
- Reading blog post
- Updating blog post
- Delete blog post
- Listing all blog posts
- Blog post comments
- Requirements
- Endpoints
- Creating the post's comment
- Reading a comment
- Updating a comment
- Deleting a post comment
- Listing all comments for a particular post
- More resources
- Summary
- PHP7 To Code It Better
- Scalar type declaration
- Return type declaration
- Null coalescing operator
- Spaceship operator
- Group use declarations
- Generator-related features
- What are generators?
- Generator return expression
- Generator delegation
- Anonymous classes
- Closure::call()
- Errors and exceptions
- PHP7.1
- Nullable types
- Symmetric array destructuring
- Support for keys in list()
- Multi-catch exception handling
- More resources
- Summary
- Creating RESTful Endpoints
- Creating a REST API for a blog in PHP
- Creating a database schema
- Blog user/author table schema
- SQL for users table
- Blog post table schema
- Blog post comments schema
- Creating a RESTful API's endpoint
- Code structure
- Common components
- DB class
- Router class
- Code sync
- Creating blog post endpoints
- REST client
- To do
- Visible flaws
- Validation
- Solution
- Authentication
- Solution
- Proper 404 pages
- Summary
- Reviewing Design Flaws and Security Threats
- Finding problems in the current code
- Structural and design flaws
- Missing query builder layer
- Incomplete router
- Usage of OOP
- Separate Configurations from Implementation
- Should write tests
- Input validation
- Handling 404 and other errors
- Meta information missing
- DB fields abstraction
- Security
- Securing API endpoints
- What is Auth middleware?
- Common security threats in RESTful web services
- Use of HTTPS
- Securing an API key/token
- Not passing an access token in the URL
- Access token expiration
- Limited scope access token
- Public and private endpoints
- Public API endpoints
- Insecure direct object reference
- Restricting allowable verbs
- Input validation
- Available reusable code
- Summary
- Load and Resolve with Composer an Evolutionary
- Introduction to Composer
- Installation
- Installation on Windows
- Installation on Linux/Unix/OS X
- Global Installation
- Usage of Composer
- Composer as a dependency manager
- Installing packages
- Installing using composer.json
- The composer.json in detail
- The require object
- The require-dev object
- The autoload and autoload-dev
- The scripts
- The composer.lock
- Composer as an auto-loader
- Example
- Composer for creating a project
- Example
- Summary
- Illuminating RESTful Web Services with Lumen
- Introducing Lumen
- Why micro-framework?
- Why Lumen?
- What Lumen provides
- What Lumen has in common with Laravel
- How Lumen is different from Laravel
- What exactly Lumen provides
- A Good Structure
- Separate configurations
- Router
- Middle-wares
- Service Container and Dependency Injection
- HTTP responses
- Validation
- Eloquent ORM
- Database migration and seeding
- Unit testing
- Installing Lumen
- Configuration
- Setting up the database
- Writing migrations
- Writing RESTful web service endpoints
- Writing the first controller
- Lumen routes
- REST resource
- Eloquent ORM (model layer)
- Creating models
- Eloquent relationships
- Controller Implementation
- What we are missing?
- Validation and negative cases?
- /api/posts with GET method
- /api/posts with the POST method
- /api/posts/1 with the GET method
- /api/posts/1 with the PATCH/PUT method
- /api/posts/1 with the DELETE method
- User authentication
- Other missing elements
- Comment Resource Implementation
- Summary
- Improving RESTful Web Services
- Dingo simplifying RESTful API development
- Installation and configuration
- Simplifying routes
- API versioning
- Rate limiting
- Internal requests
- Responses
- Authentication and middleware
- JWT Auth setup
- The Manual way
- Simpler way through Lumen JWT authentication integration package
- Authentication
- Log in
- Invalidate token
- Refresh token
- Transformers
- Understanding and setting transformers
- Using transformers
- Encryption
- SSL certificate different options
- Summary
- API Testing – Guards on the Gates
- The need for automated tests
- Types of testing
- Unit testing
- Acceptance testing
- Functional testing
- Integration testing
- What type of testing will we do?
- Testing frameworks
- CodeCeption introduction
- Setup and understanding the structure
- tests/{suite-name}/
- tests/{suite-name}.suite.yml
- tests/_support/_generated/{suite-name}TesterActions.php
- tests/_support/{suite-name}Tester.php
- tests/_support/Helper/{suite-name}.php
- Creating the API suite
- Configuring the API suite
- Writing test cases
- API tests for post resource
- Other test cases
- Summary
- More resources
- Microservices
- Introducing Microservices
- How to divide an application into microservices?
- Motivation towards microservices
- Maintenance and debugging
- Scalability
- Technology diversity
- Resilience
- Replaceability
- Parallelization
- How it is different from SOA
- Team structure
- Challenges of micro-services
- Infrastructure maintenance
- Performance
- Debugging and fault-finding
- Logs should be centralized
- Logs should be searchable
- Track chain of requests
- Dynamic log levels
- Implementation
- Deployments
- Inter-services communication
- Synchronous communication
- Asynchronous communication
- Shared library or common code
- Summary
- What's next 更新時(shí)間:2021-07-03 00:02:54