Automate Hypermedia PHP REST API with Doctrine ORM - 008

Beachcasts Programming Videos
Beachcasts Programming Videos
1.5 هزار بار بازدید - 6 سال پیش - Automate Hypermedia (HAL) for a
Automate Hypermedia (HAL) for a PHP REST API in a Zend Expressive PHP project with Doctrine ORM. Includes adding pagination related links to web development. This method could be used for any PSR-7 PHP application. (see shortcuts below to key points) Adam Culp of Beachcasts php videos shows how to automate hypermedia creation using the expressive-hal component.

Later we will be introducing Zend Framework (Laminas Project) components, as well as components from other projects.

Next video in the series: Create Handler middleware in Zend Exp...
It is part of the playlist: PHP REST API Project with Zend Expres...

Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!

Key Topics:
- Using Expressive HAL component
- Automate Hypermedia creation
- Leverage Doctrine ORM Paginator for HAL creation

For a nice list of equipment I use in my studio, and to support the channel if you make any purchases (doesn't cost you a thing), visit my kit at kit.co: https://kit.co/beachcasts/beachcasts-...

Errata:
Technically, the AnnouncementsCollection is not an entity.
17.39 The use of route in the getHalMetadataMap() function is not for routing, and is instead what is used to generate URLs in HAL.

Code used in this, and in future videos in this series is located at: https://github.com/Beachcasts/doctrin...

Associated Links:
https://docs.zendframework.com/zend-e... - Site for Zend Expressive
https://docs.zendframework.com/zend-e... - Zend Expressive HAL Component
https://docs.zendframework.com/zend-e... - Automated HAL creation for Doctrine Paginator
https://getexpressive.org/ - Expressive main site
https://getlaminas.org/ - Laminas Project site
https://www.jetbrains.com/phpstorm/ - PhpStorm PHP IDE

Timeline:
00:00 Video Intro
03:46 Execute bash inside Docker container
05:18 Composer require the zend-expressive-hal package
07:42 Composer require zend-hydrator package
08:25 Confirm that ConfigProviders are added to config
10:30 Update route to use pagination as arguments in URL
12:45 Create a collection object extending the Doctrine Paginator
14:10 Update Expressive module ConfigProvider with the MetadataMap for zend-expressive-hal
18:25 Updating the ReadHandlerFactory to create needed HAL generator objects
21:46 Updating the ReadHandler to expect the HAL generator objects injected
24:35 Update the Handle method to create HAL
31:00 Creating the return that will contain the HAL

Other Beachcasts PHP tech videos you might find interesting:
Critical programming issues preventing a PHP 7 upgrade Critical programming issues preventin...
Behat for beginners functional REST API testing tutorial Behat for beginners functional REST A...
Doctrine ORM one-to-many bi-directional association Doctrine ORM one-to-many bi-direction...
PHP Mess Detector static analysis to find PHP code smells PHP Mess Detector static analysis to ...
Doctrine ORM one-to-many self-referencing association PHP DoctrineORM one-to-many self-refe...
10 reasons to become a consultant in a consulting business Top 10 Reasons To Be a Programming Co...
Zend Framework becomes Laminas project at Linux Foundation Zend Framework becomes Laminas projec...
10 bad things about consulting Top 10 bad things about consulting, w...
How to get lines of code in PHP PHPLoc Lines of code static analysis ...
Make a List handler middleware List handler middleware in Zend Expre...
Make a Delete handler middleware Delete handler middleware in Zend Exp...
Make an Update handler middleware Update handler middleware in Zend Exp...
Use UUID with Doctrine ORM for DB keys UUID with Doctrine ORM in Zend Expres...
Learn about Hypermedia and how to create it Creating Hypermedia (HAL) in PHP REST...
Doctrine ORM Paginator for PHP REST API Doctrine ORM Paginator in PHP REST AP...
Doctrine ORM Entity how to Create Doctrine ORM Entity and pagina...
Configure Doctrine ORM Configure Doctrine ORM and Dbal CLI w...
Create PHP middlware with Zend Expressive Create PHP middleware with Zend Expre...
Configure PhpStorm for PHP development with Docker PhpStorm setup for PHP web developmen...
Create PHP development environment with docker PHP web development environment with ...

Help through referrals:
Thinking of buying a Tesla electric vehicle? Use this referral link to also get six months of free Supercharging for both of us. Thank you. https://www.tesla.com/referral/tanya2...

I use TubeBuddy to help me manage my YouTube channel. If you're interested, click the following link to check it out. https://www.tubebuddy.com/beachcasts

Help support Doctrine ORM: https://www.doctrine-project.org/spon...

#hypermedia #ZendExpressive #Beachcasts
6 سال پیش در تاریخ 1397/11/24 منتشر شده است.
1,587 بـار بازدید شده
... بیشتر