SlideShare uma empresa Scribd logo
1 de 70
Baixar para ler offline
1 / 70
ZendExpressive 3
The Next Generation
2 / 70
Ralf Eggert
CEO Travello GmbH
PHP Developer
Alexa Champion
3 / 70
Some definitions
4 / 70
PSR
PHP Standards
Recommendations
By the PHP Framework
Interop Group
https://www.php-fig.org/
5 / 70
PSR-7
HTTP Message Interface
HTTP Request & Response,
Streams, Uris, Uploads
https://www.php-fig.org/psr/psr-7/
6 / 70
PSR-11
Container interface
Dependency Injection
Container
https://www.php-fig.org/psr/psr-11/
7 / 70
PSR-15
HTTP Server Request
Handlers
Request Handlers &
Middleware
https://www.php-fig.org/psr/psr-15/
8 / 70
Some questions
9 / 70
Question 1:
Who is using the Zend
Framework in general?
10 / 70
Question 2:
Who is using
ZendExpressive in
particular?
Which version? (1/2/3)
11 / 70
Question 3:
What kind of applications
have you built with
ZendExpressive so far?
12 / 70
From ZE1 to ZE3
13 / 70
28/01/2016
ZE1
Released
Focus PSR-7
14 / 70
28/01/2016 07/03/2017
ZE1
Released
Focus PSR-7
ZE2
Released
Focus PSR-11
15 / 70
28/01/2016 07/03/2017 16/03/2018
ZE1
Released
Focus PSR-7
ZE2
Released
Focus PSR-11
ZE3
Released
Focus PSR-15
16 / 70
28/01/2016 ??/??/201907/03/2017 16/03/2018
ZE1
Released
Focus PSR-7
ZE2
Released
Focus PSR-11
ZE3
Released
Focus PSR-15
ZE4
Released
Focus ???
17 / 70
28/01/2016 07/03/2017 16/03/2018
ZE1
Released
Focus PSR-7
ZE2
Released
Focus PSR-11
ZE3
Released
Focus PSR-15
Just kidding!
18 / 70
ZendExpressive 1
PSR-7 compatible
Middleware based
Microframework
Support for various router,
DI container and template
solutions
19 / 70
ZendExpressive 2
Added PSR-11 support,
programmatic pipelines,
improved error handling,
modular applications and
development tooling to the
mix.
20 / 70
ZendExpressive 3
Extended with PSR-15
support, requires PHP 7.1,
massive internal
refactoring and adds new
components for session,
CSRF, flash messages, etc.
21 / 70
ZendExpressive
Evolution
ZE1 ZE2 ZE3
Development
Focus
PSR-7 PSR-11 PSR-15
Minimal
PHP Version
5.6 or 7.0 5.6 or 7.0
7.1
(7.2 Support)
Highlight First release
Programmatic
pipelines
New components
22 / 70
From Actions to Handlers
23 / 70
namespace PizzaAction;
use PsrHttpMessageResponseInterface;
use PsrHttpMessageServerRequestInterface;
use PizzaModelRepositoryPizzaRepositoryInterface;
class ShowIntroAction
{
public function __invoke(
ServerRequestInterface $request, ResponseInterface $response,
callable $next = null
) {
$pizzas = $this->pizzaRepository->getPizzas();
return new HtmlResponse(
$this->renderer->render(
'pizza::intro', ['pizzas' => $pizzas]
)
);
}
}
ZE1
24 / 70
namespace PizzaAction;
use InteropHttpServerMiddlewareDelegateInterface;
use InteropHttpServerMiddlewareMiddlewareInterface as ServerMiddlewareInterface;
use PsrHttpMessageServerRequestInterface;
use PizzaModelRepositoryPizzaRepositoryInterface;
class ShowIntroAction implements ServerMiddlewareInterface
{
public function process(
ServerRequestInterface $request, DelegateInterface $delegate
) {
$pizzas = $this->pizzaRepository->getPizzas();
return new HtmlResponse(
$this->renderer->render(
'pizza::intro', ['pizzas' => $pizzas]
)
);
}
}
ZE2
25 / 70
namespace PizzaAction;
use PsrHttpMessageResponseInterface;
use PsrHttpMessageServerRequestInterface;
use PsrHttpServerRequestHandlerInterface;
use PizzaModelRepositoryPizzaRepositoryInterface;
class ShowIntroHandler implements RequestHandlerInterface
{
public function handle(
ServerRequestInterface $request
) : ResponseInterface {
$pizzas = $this->pizzaRepository->getPizzas();
return new HtmlResponse(
$this->renderer->render(
'pizza::intro', ['pizzas' => $pizzas]
)
);
}
}
ZE3
26 / 70
ZE3
Request Handlers
Evolved from ZE1 action
classes to ZE3 request
handlers
Implement PSR-15
interfaces now
Easy migration path
27 / 70
From configurable to
programmatic middleware
pipelines
28 / 70
// /config/autoload/middleware-pipeline.php
return [
'middleware_pipeline' => [
'always' => [
'middleware' => [
ServerUrlMiddleware::class,
],
'priority' => 10000,
],
'routing' => [
'middleware' => [
ApplicationFactory::ROUTING_MIDDLEWARE,
UrlHelperMiddleware::class,
ApplicationFactory::DISPATCH_MIDDLEWARE,
],
'priority' => 1,
],
'error' => [
'middleware' => [],
'error' => true,
'priority' => -10000,
],
],
];
ZE1
29 / 70
// /config/pipeline.php
$app->pipe(ErrorHandler::class);
$app->pipe(ServerUrlMiddleware::class);
$app->pipeRoutingMiddleware();
$app->pipe(ImplicitHeadMiddleware::class);
$app->pipe(ImplicitOptionsMiddleware::class);
$app->pipe(UrlHelperMiddleware::class);
$app->pipeDispatchMiddleware();
$app->pipe(NotFoundHandler::class);
ZE2
30 / 70
// /config/pipeline.php
return function (
Application $app, MiddlewareFactory $factory, ContainerInterface $container
) : void {
$app->pipe(ErrorHandler::class);
$app->pipe(ServerUrlMiddleware::class);
$app->pipe(RouteMiddleware::class);
$app->pipe(ImplicitHeadMiddleware::class);
$app->pipe(ImplicitOptionsMiddleware::class);
$app->pipe(MethodNotAllowedMiddleware::class);
$app->pipe(UrlHelperMiddleware::class);
$app->pipe(DispatchMiddleware::class);
$app->pipe(NotFoundHandler::class);
};
ZE3
31 / 70
// /module/Application/src/Config/PipelineDelegatorFactory.php
namespace ApplicationConfig;
class PipelineDelegatorFactory implements DelegatorFactoryInterface
{
public function __invoke(
ContainerInterface $container, $name, callable $callback, array $options = null
) {
$application = $callback();
$application->pipe(ErrorHandler::class);
$application->pipe(ServerUrlMiddleware::class);
$application->pipe(RouteMiddleware::class);
$application->pipe(ImplicitHeadMiddleware::class);
$application->pipe(ImplicitOptionsMiddleware::class);
$application->pipe(MethodNotAllowedMiddleware::class);
$application->pipe(UrlHelperMiddleware::class);
$application->pipe(DispatchMiddleware::class);
$application->pipe(NotFoundHandler::class);
return $application;
}
};
ZE3
32 / 70
ZE3 Middleware
Pipeline
Evolved from configuration
arrays to delegator factory
classes
Medium migration path
33 / 70
Evolving of the
pipeline middleware
34 / 70
namespace ZendExpressiveHelper;
use PsrHttpMessageResponseInterface;
use PsrHttpMessageServerRequestInterface;
use ZendExpressiveRouterRouteResult;
class UrlHelperMiddleware
{
public function __invoke(
ServerRequestInterface $request, ResponseInterface $response, callable $next
) {
$result = $request->getAttribute(RouteResult::class, false);
if ($result instanceof RouteResult) {
$this->helper->setRouteResult($result);
}
return $next($request, $response);
}
}
ZE1
35 / 70
namespace ZendExpressiveHelper;
use InteropHttpServerMiddlewareDelegateInterface;
use InteropHttpServerMiddlewareMiddlewareInterface as ServerMiddlewareInterface;
use PsrHttpMessageServerRequestInterface;
use ZendExpressiveRouterRouteResult;
class UrlHelperMiddleware implements ServerMiddlewareInterface
{
public function process(
ServerRequestInterface $request, DelegateInterface $delegate
) {
$result = $request->getAttribute(RouteResult::class, false);
if ($result instanceof RouteResult) {
$this->helper->setRouteResult($result);
}
return $delegate->process($request);
}
}
ZE2
36 / 70
namespace ZendExpressiveHelper;
use PsrHttpMessageResponseInterface;
use PsrHttpMessageServerRequestInterface;
use PsrHttpServerMiddlewareInterface;
use PsrHttpServerRequestHandlerInterface;
use ZendExpressiveRouterRouteResult;
class UrlHelperMiddleware implements MiddlewareInterface
{
public function process(
ServerRequestInterface $request, RequestHandlerInterface $handler
) : ResponseInterface {
$result = $request->getAttribute(RouteResult::class, false);
if ($result instanceof RouteResult) {
$this->helper->setRouteResult($result);
}
return $handler->handle($request);
}
}
ZE3
37 / 70
ZE3 Pipeline
Middleware
Evolved to full PSR-15
interface implementation
Easy migration path
38 / 70
Evolving of the
front controller
39 / 70
if (php_sapi_name() === 'cli-server'
&& is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))
) {
return false;
}
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
/** @var InteropContainerContainerInterface $container */
$container = require 'config/container.php';
/** @var ZendExpressiveApplication $app */
$app = $container->get(ZendExpressiveApplication::class);
$app->run();
ZE1
40 / 70
if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) {
return false;
}
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
call_user_func(function () {
/** @var PsrContainerContainerInterface $container */
$container = require 'config/container.php';
/** @var ZendExpressiveApplication $app */
$app = $container->get(ZendExpressiveApplication::class);
require 'config/pipeline.php';
require 'config/routes.php';
$app->run();
});
ZE2
41 / 70
if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) {
return false;
}
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
(function () {
/** @var PsrContainerContainerInterface $container */
$container = require 'config/container.php';
/** @var ZendExpressiveApplication $app */
$app = $container->get(ZendExpressiveApplication::class);
$factory = $container->get(ZendExpressiveMiddlewareFactory::class);
(require 'config/pipeline.php')($app, $factory, $container);
(require 'config/routes.php')($app, $factory, $container);
$app->run();
})();
ZE3
42 / 70
ZE3 Front
Controller
From polluting the global
namespace to self-called
anonymous function with
its own scope
Easy migration path
43 / 70
New ZE3 components
44 / 70
Authentication
Middleware for
Authentication with Basic
Auth, OAuth2, Session and
ZendAuthentication
45 / 70
Authorization
Middleware for
Authorization with
adapters for both RBAC
and ACL authorization
46 / 70
Session
Middleware with PSR-7
support, lazy sessions and
ext-session extension
47 / 70
CSRF
Middleware and guards for
Cross-Site Request Forgery
(CSRF) protection
48 / 70
Flash Messages
Middleware and support
for Flash Messages
49 / 70
HttpHandlerRunner
Utilities emitting PSR-7
responses and running
PSR-15 server request
handlers
50 / 70
Swoole
Expressive support for
Swoole, the PHP
asynchronous
programming framework
51 / 70
HAL JSON
Expressive support for
Hypertext Application
Language
(used by Apigility)
52 / 70
Problem details
Expressive support for
problem details format
(used by Apigility)
53 / 70
Components
More than 30 components
and helper repositories for
the ZendExpressive
cosmos so far
And don't forget the other
Zend Framework
components
54 / 70
Applications
55 / 70
Applications
Which kind of applications
can be build with
ZendExpressive?
56 / 70
Applications
Classical websites
57 / 70
Applications
Backends
58 / 70
Applications
RESTful APIs
59 / 70
Applications
Alexa Skills
60 / 70
phlexa
PHP Framework to build
voice applications for
Amazon Alexa
(built with ZE3)
https://www.phoice.tech/phlexa
61 / 70
Applications
So many opportunities!
What are you planning to
build next?
62 / 70
Migration to ZE3
63 / 70
Migration to ZE3
Migrate your actions to
handlers
(PSR-15 interfaces)
64 / 70
Migration to ZE3
Migrate to programmatic
middleware pipeline and
maybe even introduce a
delegator factory
65 / 70
Migration to ZE3
Migrate your pipeline
middleware classes
(PSR-15 interfaces)
66 / 70
Migration to ZE3
Check your current front
controller
67 / 70
Migration to ZE3
Start using the new
Expressive components
68 / 70
Conclusion
69 / 70
ZendExpressive 3
The Next Generation is
ready to start!
70 / 70
Thanks!
ralf@travello.de
https://www.travello.de

Mais conteúdo relacionado

Mais procurados

I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlordsheumann
 
Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)James Titcumb
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLitecharsbar
 
2016年のPerl (Long version)
2016年のPerl (Long version)2016年のPerl (Long version)
2016年のPerl (Long version)charsbar
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPANcharsbar
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPGuilherme Blanco
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & ToolsIan Barber
 
Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013trexy
 
Introducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyIntroducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyNikhil Mungel
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf Conference
 
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...dantleech
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS charsbar
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Eric Hogue
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)James Titcumb
 
Utility Modules That You Should Know About
Utility Modules That You Should Know AboutUtility Modules That You Should Know About
Utility Modules That You Should Know Aboutjoshua.mcadams
 

Mais procurados (20)

I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLite
 
2016年のPerl (Long version)
2016年のPerl (Long version)2016年のPerl (Long version)
2016年のPerl (Long version)
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPAN
 
TRunner
TRunnerTRunner
TRunner
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013
 
Introducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyIntroducing Command Line Applications with Ruby
Introducing Command Line Applications with Ruby
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Gevent rabbit rpc
Gevent rabbit rpcGevent rabbit rpc
Gevent rabbit rpc
 
Cooking pies with Celery
Cooking pies with CeleryCooking pies with Celery
Cooking pies with Celery
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Utility Modules That You Should Know About
Utility Modules That You Should Know AboutUtility Modules That You Should Know About
Utility Modules That You Should Know About
 

Semelhante a Zend/Expressive 3 – The Next Generation

Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...King Foo
 
Criando uma API com Zend Expressive 3
Criando uma API com Zend Expressive 3Criando uma API com Zend Expressive 3
Criando uma API com Zend Expressive 3Juciellen Cabrera
 
REST more with json-api and fractal
REST more with json-api and fractalREST more with json-api and fractal
REST more with json-api and fractalBoyan Yordanov
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)James Titcumb
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasyJBug Italy
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5Darren Craig
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
 
Future of HTTP in CakePHP
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHPmarkstory
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Zend by Rogue Wave Software
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Elena Kolevska
 
Server Side Swift with Swag
Server Side Swift with SwagServer Side Swift with Swag
Server Side Swift with SwagJens Ravens
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsMichael Peacock
 

Semelhante a Zend/Expressive 3 – The Next Generation (20)

Zend Expressive 3 e PSR-15
Zend Expressive 3 e PSR-15Zend Expressive 3 e PSR-15
Zend Expressive 3 e PSR-15
 
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
 
Criando uma API com Zend Expressive 3
Criando uma API com Zend Expressive 3Criando uma API com Zend Expressive 3
Criando uma API com Zend Expressive 3
 
REST more with json-api and fractal
REST more with json-api and fractalREST more with json-api and fractal
REST more with json-api and fractal
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Future of HTTP in CakePHP
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHP
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
 
What's new with PHP7
What's new with PHP7What's new with PHP7
What's new with PHP7
 
Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5
 
Server Side Swift with Swag
Server Side Swift with SwagServer Side Swift with Swag
Server Side Swift with Swag
 
Silex Cheat Sheet
Silex Cheat SheetSilex Cheat Sheet
Silex Cheat Sheet
 
Silex Cheat Sheet
Silex Cheat SheetSilex Cheat Sheet
Silex Cheat Sheet
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friends
 
Intro to PSGI and Plack
Intro to PSGI and PlackIntro to PSGI and Plack
Intro to PSGI and Plack
 

Mais de Ralf Eggert

ChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heuteChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heuteRalf Eggert
 
Der ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 EditionDer ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 EditionRalf Eggert
 
PHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickelnPHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickelnRalf Eggert
 
Alexa, what's next?
Alexa, what's next?Alexa, what's next?
Alexa, what's next?Ralf Eggert
 
Alexa, wohin geht die Reise
Alexa, wohin geht die ReiseAlexa, wohin geht die Reise
Alexa, wohin geht die ReiseRalf Eggert
 
8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface Meetup8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface MeetupRalf Eggert
 
Alexa Skill Maintenance
Alexa Skill MaintenanceAlexa Skill Maintenance
Alexa Skill MaintenanceRalf Eggert
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu LaminasRalf Eggert
 
Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?Ralf Eggert
 
Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100Ralf Eggert
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu LaminasRalf Eggert
 
Alexa for Hospitality
Alexa for HospitalityAlexa for Hospitality
Alexa for HospitalityRalf Eggert
 
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...Ralf Eggert
 
Fortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche SprachanwendungenFortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche SprachanwendungenRalf Eggert
 
Die sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice ProjekteDie sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice ProjekteRalf Eggert
 
Künstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und WirklichkeitKünstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und WirklichkeitRalf Eggert
 
Multi-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon AlexaMulti-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon AlexaRalf Eggert
 
Mein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein BackendMein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein BackendRalf Eggert
 
Sieben Tipps für den Voice Commerce mit PHP
Sieben Tipps für den Voice Commerce mit PHPSieben Tipps für den Voice Commerce mit PHP
Sieben Tipps für den Voice Commerce mit PHPRalf Eggert
 

Mais de Ralf Eggert (20)

ChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heuteChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heute
 
Der ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 EditionDer ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 Edition
 
PHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickelnPHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickeln
 
Alexa, what's next?
Alexa, what's next?Alexa, what's next?
Alexa, what's next?
 
Alexa, wohin geht die Reise
Alexa, wohin geht die ReiseAlexa, wohin geht die Reise
Alexa, wohin geht die Reise
 
8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface Meetup8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface Meetup
 
Welcome Bixby
Welcome BixbyWelcome Bixby
Welcome Bixby
 
Alexa Skill Maintenance
Alexa Skill MaintenanceAlexa Skill Maintenance
Alexa Skill Maintenance
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu Laminas
 
Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?
 
Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu Laminas
 
Alexa for Hospitality
Alexa for HospitalityAlexa for Hospitality
Alexa for Hospitality
 
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
 
Fortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche SprachanwendungenFortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche Sprachanwendungen
 
Die sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice ProjekteDie sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice Projekte
 
Künstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und WirklichkeitKünstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und Wirklichkeit
 
Multi-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon AlexaMulti-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon Alexa
 
Mein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein BackendMein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein Backend
 
Sieben Tipps für den Voice Commerce mit PHP
Sieben Tipps für den Voice Commerce mit PHPSieben Tipps für den Voice Commerce mit PHP
Sieben Tipps für den Voice Commerce mit PHP
 

Último

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 

Último (20)

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Zend/Expressive 3 – The Next Generation

  • 1. 1 / 70 ZendExpressive 3 The Next Generation
  • 2. 2 / 70 Ralf Eggert CEO Travello GmbH PHP Developer Alexa Champion
  • 3. 3 / 70 Some definitions
  • 4. 4 / 70 PSR PHP Standards Recommendations By the PHP Framework Interop Group https://www.php-fig.org/
  • 5. 5 / 70 PSR-7 HTTP Message Interface HTTP Request & Response, Streams, Uris, Uploads https://www.php-fig.org/psr/psr-7/
  • 6. 6 / 70 PSR-11 Container interface Dependency Injection Container https://www.php-fig.org/psr/psr-11/
  • 7. 7 / 70 PSR-15 HTTP Server Request Handlers Request Handlers & Middleware https://www.php-fig.org/psr/psr-15/
  • 8. 8 / 70 Some questions
  • 9. 9 / 70 Question 1: Who is using the Zend Framework in general?
  • 10. 10 / 70 Question 2: Who is using ZendExpressive in particular? Which version? (1/2/3)
  • 11. 11 / 70 Question 3: What kind of applications have you built with ZendExpressive so far?
  • 12. 12 / 70 From ZE1 to ZE3
  • 14. 14 / 70 28/01/2016 07/03/2017 ZE1 Released Focus PSR-7 ZE2 Released Focus PSR-11
  • 15. 15 / 70 28/01/2016 07/03/2017 16/03/2018 ZE1 Released Focus PSR-7 ZE2 Released Focus PSR-11 ZE3 Released Focus PSR-15
  • 16. 16 / 70 28/01/2016 ??/??/201907/03/2017 16/03/2018 ZE1 Released Focus PSR-7 ZE2 Released Focus PSR-11 ZE3 Released Focus PSR-15 ZE4 Released Focus ???
  • 17. 17 / 70 28/01/2016 07/03/2017 16/03/2018 ZE1 Released Focus PSR-7 ZE2 Released Focus PSR-11 ZE3 Released Focus PSR-15 Just kidding!
  • 18. 18 / 70 ZendExpressive 1 PSR-7 compatible Middleware based Microframework Support for various router, DI container and template solutions
  • 19. 19 / 70 ZendExpressive 2 Added PSR-11 support, programmatic pipelines, improved error handling, modular applications and development tooling to the mix.
  • 20. 20 / 70 ZendExpressive 3 Extended with PSR-15 support, requires PHP 7.1, massive internal refactoring and adds new components for session, CSRF, flash messages, etc.
  • 21. 21 / 70 ZendExpressive Evolution ZE1 ZE2 ZE3 Development Focus PSR-7 PSR-11 PSR-15 Minimal PHP Version 5.6 or 7.0 5.6 or 7.0 7.1 (7.2 Support) Highlight First release Programmatic pipelines New components
  • 22. 22 / 70 From Actions to Handlers
  • 23. 23 / 70 namespace PizzaAction; use PsrHttpMessageResponseInterface; use PsrHttpMessageServerRequestInterface; use PizzaModelRepositoryPizzaRepositoryInterface; class ShowIntroAction { public function __invoke( ServerRequestInterface $request, ResponseInterface $response, callable $next = null ) { $pizzas = $this->pizzaRepository->getPizzas(); return new HtmlResponse( $this->renderer->render( 'pizza::intro', ['pizzas' => $pizzas] ) ); } } ZE1
  • 24. 24 / 70 namespace PizzaAction; use InteropHttpServerMiddlewareDelegateInterface; use InteropHttpServerMiddlewareMiddlewareInterface as ServerMiddlewareInterface; use PsrHttpMessageServerRequestInterface; use PizzaModelRepositoryPizzaRepositoryInterface; class ShowIntroAction implements ServerMiddlewareInterface { public function process( ServerRequestInterface $request, DelegateInterface $delegate ) { $pizzas = $this->pizzaRepository->getPizzas(); return new HtmlResponse( $this->renderer->render( 'pizza::intro', ['pizzas' => $pizzas] ) ); } } ZE2
  • 25. 25 / 70 namespace PizzaAction; use PsrHttpMessageResponseInterface; use PsrHttpMessageServerRequestInterface; use PsrHttpServerRequestHandlerInterface; use PizzaModelRepositoryPizzaRepositoryInterface; class ShowIntroHandler implements RequestHandlerInterface { public function handle( ServerRequestInterface $request ) : ResponseInterface { $pizzas = $this->pizzaRepository->getPizzas(); return new HtmlResponse( $this->renderer->render( 'pizza::intro', ['pizzas' => $pizzas] ) ); } } ZE3
  • 26. 26 / 70 ZE3 Request Handlers Evolved from ZE1 action classes to ZE3 request handlers Implement PSR-15 interfaces now Easy migration path
  • 27. 27 / 70 From configurable to programmatic middleware pipelines
  • 28. 28 / 70 // /config/autoload/middleware-pipeline.php return [ 'middleware_pipeline' => [ 'always' => [ 'middleware' => [ ServerUrlMiddleware::class, ], 'priority' => 10000, ], 'routing' => [ 'middleware' => [ ApplicationFactory::ROUTING_MIDDLEWARE, UrlHelperMiddleware::class, ApplicationFactory::DISPATCH_MIDDLEWARE, ], 'priority' => 1, ], 'error' => [ 'middleware' => [], 'error' => true, 'priority' => -10000, ], ], ]; ZE1
  • 29. 29 / 70 // /config/pipeline.php $app->pipe(ErrorHandler::class); $app->pipe(ServerUrlMiddleware::class); $app->pipeRoutingMiddleware(); $app->pipe(ImplicitHeadMiddleware::class); $app->pipe(ImplicitOptionsMiddleware::class); $app->pipe(UrlHelperMiddleware::class); $app->pipeDispatchMiddleware(); $app->pipe(NotFoundHandler::class); ZE2
  • 30. 30 / 70 // /config/pipeline.php return function ( Application $app, MiddlewareFactory $factory, ContainerInterface $container ) : void { $app->pipe(ErrorHandler::class); $app->pipe(ServerUrlMiddleware::class); $app->pipe(RouteMiddleware::class); $app->pipe(ImplicitHeadMiddleware::class); $app->pipe(ImplicitOptionsMiddleware::class); $app->pipe(MethodNotAllowedMiddleware::class); $app->pipe(UrlHelperMiddleware::class); $app->pipe(DispatchMiddleware::class); $app->pipe(NotFoundHandler::class); }; ZE3
  • 31. 31 / 70 // /module/Application/src/Config/PipelineDelegatorFactory.php namespace ApplicationConfig; class PipelineDelegatorFactory implements DelegatorFactoryInterface { public function __invoke( ContainerInterface $container, $name, callable $callback, array $options = null ) { $application = $callback(); $application->pipe(ErrorHandler::class); $application->pipe(ServerUrlMiddleware::class); $application->pipe(RouteMiddleware::class); $application->pipe(ImplicitHeadMiddleware::class); $application->pipe(ImplicitOptionsMiddleware::class); $application->pipe(MethodNotAllowedMiddleware::class); $application->pipe(UrlHelperMiddleware::class); $application->pipe(DispatchMiddleware::class); $application->pipe(NotFoundHandler::class); return $application; } }; ZE3
  • 32. 32 / 70 ZE3 Middleware Pipeline Evolved from configuration arrays to delegator factory classes Medium migration path
  • 33. 33 / 70 Evolving of the pipeline middleware
  • 34. 34 / 70 namespace ZendExpressiveHelper; use PsrHttpMessageResponseInterface; use PsrHttpMessageServerRequestInterface; use ZendExpressiveRouterRouteResult; class UrlHelperMiddleware { public function __invoke( ServerRequestInterface $request, ResponseInterface $response, callable $next ) { $result = $request->getAttribute(RouteResult::class, false); if ($result instanceof RouteResult) { $this->helper->setRouteResult($result); } return $next($request, $response); } } ZE1
  • 35. 35 / 70 namespace ZendExpressiveHelper; use InteropHttpServerMiddlewareDelegateInterface; use InteropHttpServerMiddlewareMiddlewareInterface as ServerMiddlewareInterface; use PsrHttpMessageServerRequestInterface; use ZendExpressiveRouterRouteResult; class UrlHelperMiddleware implements ServerMiddlewareInterface { public function process( ServerRequestInterface $request, DelegateInterface $delegate ) { $result = $request->getAttribute(RouteResult::class, false); if ($result instanceof RouteResult) { $this->helper->setRouteResult($result); } return $delegate->process($request); } } ZE2
  • 36. 36 / 70 namespace ZendExpressiveHelper; use PsrHttpMessageResponseInterface; use PsrHttpMessageServerRequestInterface; use PsrHttpServerMiddlewareInterface; use PsrHttpServerRequestHandlerInterface; use ZendExpressiveRouterRouteResult; class UrlHelperMiddleware implements MiddlewareInterface { public function process( ServerRequestInterface $request, RequestHandlerInterface $handler ) : ResponseInterface { $result = $request->getAttribute(RouteResult::class, false); if ($result instanceof RouteResult) { $this->helper->setRouteResult($result); } return $handler->handle($request); } } ZE3
  • 37. 37 / 70 ZE3 Pipeline Middleware Evolved to full PSR-15 interface implementation Easy migration path
  • 38. 38 / 70 Evolving of the front controller
  • 39. 39 / 70 if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)) ) { return false; } chdir(dirname(__DIR__)); require 'vendor/autoload.php'; /** @var InteropContainerContainerInterface $container */ $container = require 'config/container.php'; /** @var ZendExpressiveApplication $app */ $app = $container->get(ZendExpressiveApplication::class); $app->run(); ZE1
  • 40. 40 / 70 if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) { return false; } chdir(dirname(__DIR__)); require 'vendor/autoload.php'; call_user_func(function () { /** @var PsrContainerContainerInterface $container */ $container = require 'config/container.php'; /** @var ZendExpressiveApplication $app */ $app = $container->get(ZendExpressiveApplication::class); require 'config/pipeline.php'; require 'config/routes.php'; $app->run(); }); ZE2
  • 41. 41 / 70 if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) { return false; } chdir(dirname(__DIR__)); require 'vendor/autoload.php'; (function () { /** @var PsrContainerContainerInterface $container */ $container = require 'config/container.php'; /** @var ZendExpressiveApplication $app */ $app = $container->get(ZendExpressiveApplication::class); $factory = $container->get(ZendExpressiveMiddlewareFactory::class); (require 'config/pipeline.php')($app, $factory, $container); (require 'config/routes.php')($app, $factory, $container); $app->run(); })(); ZE3
  • 42. 42 / 70 ZE3 Front Controller From polluting the global namespace to self-called anonymous function with its own scope Easy migration path
  • 43. 43 / 70 New ZE3 components
  • 44. 44 / 70 Authentication Middleware for Authentication with Basic Auth, OAuth2, Session and ZendAuthentication
  • 45. 45 / 70 Authorization Middleware for Authorization with adapters for both RBAC and ACL authorization
  • 46. 46 / 70 Session Middleware with PSR-7 support, lazy sessions and ext-session extension
  • 47. 47 / 70 CSRF Middleware and guards for Cross-Site Request Forgery (CSRF) protection
  • 48. 48 / 70 Flash Messages Middleware and support for Flash Messages
  • 49. 49 / 70 HttpHandlerRunner Utilities emitting PSR-7 responses and running PSR-15 server request handlers
  • 50. 50 / 70 Swoole Expressive support for Swoole, the PHP asynchronous programming framework
  • 51. 51 / 70 HAL JSON Expressive support for Hypertext Application Language (used by Apigility)
  • 52. 52 / 70 Problem details Expressive support for problem details format (used by Apigility)
  • 53. 53 / 70 Components More than 30 components and helper repositories for the ZendExpressive cosmos so far And don't forget the other Zend Framework components
  • 55. 55 / 70 Applications Which kind of applications can be build with ZendExpressive?
  • 60. 60 / 70 phlexa PHP Framework to build voice applications for Amazon Alexa (built with ZE3) https://www.phoice.tech/phlexa
  • 61. 61 / 70 Applications So many opportunities! What are you planning to build next?
  • 63. 63 / 70 Migration to ZE3 Migrate your actions to handlers (PSR-15 interfaces)
  • 64. 64 / 70 Migration to ZE3 Migrate to programmatic middleware pipeline and maybe even introduce a delegator factory
  • 65. 65 / 70 Migration to ZE3 Migrate your pipeline middleware classes (PSR-15 interfaces)
  • 66. 66 / 70 Migration to ZE3 Check your current front controller
  • 67. 67 / 70 Migration to ZE3 Start using the new Expressive components
  • 69. 69 / 70 ZendExpressive 3 The Next Generation is ready to start!