SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
Zend Framework 3Zend Framework 3
ReloadedReloaded

Repository: https://github.com/RalfEggert/ipc2015-zf3-reloadedRepository: https://github.com/RalfEggert/ipc2015-zf3-reloaded
1 / 61
[b01][b01]
2 / 61
www.ralfeggert.dewww.ralfeggert.de
Über michÜber mich
[B03][B03]
33 // 6161
[B03][B03]
44 // 6161
[B03][B03]
55 // 6161
[B03][B03]
66 // 6161
ZF1/ZF2 HistorieZF1/ZF2 Historie PHP Welt HEUTEPHP Welt HEUTE Ziele ZF3Ziele ZF3
Komponenten reloadedKomponenten reloaded ZendExpressiveZendExpressive ZF3 AusblickZF3 Ausblick
7 / 61
[B06][B06][B05][B05][B04]
[B09][B09][B08][B08][B07][B07]
AgendaAgenda
[B04]
88 // 6161
ZF1 / ZF2 HistorieZF1 / ZF2 Historie
[B03][B03]
99 // 6161
[B03][B03]
1010 // 6161
11 / 61
Zend Framework 1 und 2 HistorieZend Framework 1 und 2 Historie
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
Version 0.1
(02.03.2006)
Version 1.0
(30.06.2006)
Version 1.5
(17.03.2008)
Version 1.6
(02.09.2008)
Version 1.7
(17.11.2008)
Version 1.8
(30.04.2009)
Version 1.9
(31.07.2009)
Version 1.10
(27.01.2010)
Version 1.11
(02.11.2010)
Version 1.12
(27.08.2012)
Version 2.0
(04.09.2012)
Version 2.1
(30.01.2013)
Version 2.2
(15.05.2013)
Version 2.3
(12.03.2014)
Version 2.4
(31.03.2015)
Version 2.5
(30.06.2015)
12 / 61
Zend Framework 1Zend Framework 1
Erschienen: 2006
Letztes Update: 2015
Letzte Version: 1.12.16
1
Download Archiv
GitHub
https://github.com/zendframework/zf1
Enge
Kopplung
68
Komponenten
1
Repository
13 / 61
Zend Framework 2Zend Framework 2
Erschienen: 2012
Letztes Update: 2015
Letzte Version: 2.4.8
LTS bis: 2018
1
Download Archiv
GitHub
https://github.com/zendframework/zf2
Losere
Kopplung
49
Komponenten
1
Repository
viele
Packages
1414 // 6161
Zend Framework 2 Revolution→Zend Framework 2 Revolution→
[B10][B10]
1515 // 6161
Migration ZF1 ZF2 desaster→ →Migration ZF1 ZF2 desaster→ →
[B11][B11]
[B05][B05]
1616 // 6161
PHP Welt heutePHP Welt heute
1717 // 6161
PHP 7PHP 7
[B12][B12]
18 / 61
ComposerComposer
19 / 61
PHP FIGPHP FIG
PSR-7
PSR-4
PSR-2
PSR-0
2020 // 6161
PSR-7 HTTP Message InterfacesPSR-7 HTTP Message Interfaces
[B13][B13]
[B06][B06]
2121 // 6161
Ziele für Zend Framework 3Ziele für Zend Framework 3
2222 // 6161
Komponenten separierenKomponenten separieren
[B14][B14]
2323 // 6161
PerformancePerformance
[B15][B15]
2424 // 6161
UsabilityUsability
[B16][B16]
25 / 61
PSR-7 / MiddlewarePSR-7 / Middleware
[B17]
2626 // 6161
MigrationMigration
[B18][B18]
27 / 61
{
"name": "zendframework/zendframework",
"description": "Zend Framework 2",
"require": {
"php": ">=5.5",
"zendframework/zend-authentication": "~2.5.0",
"zendframework/zend-barcode": "~2.5.0",
"zendframework/zend-cache": "~2.5.0",
"zendframework/zend-captcha": "~2.5.0",
"zendframework/zend-code": "~2.5.0",
"zendframework/zend-config": "~2.5.0",
"zendframework/zend-console": "~2.5.0",
"zendframework/zend-crypt": "~2.5.0",
"zendframework/zend-db": "~2.5.0",
"zendframework/zend-debug": "~2.5.0",
[...]
}
}
Neue Composer.json (ZF 2.5)Neue Composer.json (ZF 2.5)
[B07][B07]
2828 // 6161
Komponenten reloadedKomponenten reloaded
29 / 61
ZendServiceManagerZendServiceManager
Container Interoperability
https://github.com/container-interop/container-interop
Einheitliche Interface
&
Wiederverwendbare
Factories
GitHub
https://github.com/zendframework/zend-servicemanager
Fast vollständig
Rückwärtskompatibel
Performance
4x schneller
Neue build() Methode
Factories per
Interface oder
Invokable
Migration-Guide:
11 DIN A4 Seiten
Service Identifier Best Practice:
class name resolution syntax
30 / 61
// ArticleEntity::class mit PHP 5.5 eingeführt
return [
'service_manager' => [
'invokables' => [
BlogEntityArticleEntity::class =>
BlogEntityArticleEntity::class,
],
'factories' => [
BlogTableArticleTable::class =>
BlogTableArticleTableFactory::class,
],
],
];
Best practice: Class Name resolutionBest practice: Class Name resolution
31 / 61
return [
'service_manager' => [
'invokables' => [
BlogEntityArticleEntity::class =>
BlogEntityArticleEntity::class,
],
],
];
$entity1 = $sm->get(BlogEntityArticleEntity::class);
$entity2 = $sm->get(BlogEntityArticleEntity::class);
var_dump($entity1 === $entity2); // prints "true"
$entity1 = $sm->build(BlogEntityArticleEntity::class);
$entity2 = $sm->build(BlogEntityArticleEntity::class);
var_dump($entity1 === $entity2); // prints "false"
Neue Build() MethodeNeue Build() Methode
32 / 61
ZendEventManagerZendEventManager
BC Break I:
Keine Überladung der
trigger() Methoden mehr
BC Break II:
Anhängen von Listener-
Aggregaten verändert
GitHub
https://github.com/zendframework/zend-eventmanager
Performance
4x bis 15x schneller
BC Break III:
GlobalEventManager &
StaticEventManager
entfernt
BC Break IV:
SharedEventManager
Einsatz verändert
Migration-Guide:
10 DIN A4 Seiten
33 / 61
// VORHER: Parameter konnten überladen werden
// $event => String, Array/Traversable ODER EventInterface
// $target => Callable, EventInterface ODER ein Value
// $argv => Callable, EventInterface ODER ein Array
// $callback => Callable ODER null
trigger($event, $target = null, $argv = [], $callback = null);
triggerUntil($event, $target = null, $argv = [], $callback = null);
// NACHHER: keine Parameter Überladung mehr
// $event => String
// $target => Value für Target
// $argv => Array mit Event Parametern
trigger($event, $target = null, $argv = []);
triggerUntil($callback, $event, $target = null, $argv = []);
Geänderte Trigger() MethodenGeänderte Trigger() Methoden
34 / 61
// VORHER: 3 Varianten
$eventManager = new EventManager();
$listenerAggregate = new MyListenerAggregate();
$eventManager->attach($listenerAggregate); // Variante 1
$eventManager->attachAggregate($listenerAggregate); // Variante 2
$listenerAggregate->attach($eventManager); // Variante 3
// NACHHER: 1 Variante
$eventManager = new EventManager();
$listenerAggregate = new MyListenerAggregate();
$listenerAggregate->attach($eventManager);
Aggregate AttachmentAggregate Attachment
35 / 61
ZendMVCZendMVC
Änderungen von
ZendServiceManager
übernommen
Änderungen von
ZendEventManager
übernommen
GitHub
https://github.com/zendframework/zend-mvc
Neuer
MiddlewareListener
Bleibt im Grund
unverändert
Refaktorierung
voraussichtlich abgeschlossen:
Anfang Dezember 2015
Migration-Guide:
2 DIN A4 Seiten
(bisher)
36 / 61
Neu: ZendDiactorosNeu: ZendDiactoros
»Diactoros« an epithet for
Hermes, meaning literally,
»the messenger.«
PHP FIG
(Framework Interop Group)
PSR-7
(HTTP Message Interfaces)
GitHub
https://github.com/zendframework/zend-diactoros
Serverseitige
Applikationen
HTTP
Clients
37 / 61
use ZendDiactorosRequest;
use ZendDiactorosUri;
// Create request
$request = new Request();
$request->withUri(new Uri('http://website.com'));
$request->withMethod('POST');
$request->withAddedHeader('Authorization', 'Bearer ' . $token);
$request->withAddedHeader('Content-Type', 'application/json');
$request->getBody()->write(json_encode($data));
// Send request to get response
$response = $client->send($request);
// Get data from response
$statusCode = $response->getStatusCode();
$reasonPhrase = $response->getReasonPhrase();
$headers = $response->getHeaders();
$body = $response->getBody();
ZendDiactoros HTTP ClientZendDiactoros HTTP Client
38 / 61
use ZendDiactorosServerRequestFactory;
use ZendDiactorosResponse;
// Create request from superglobals
$request = ServerRequestFactory::fromGlobals(
$_SERVER, $_GET, $_POST, $_COOKIE, $_FILES
);
// Get data from request
$uploadedFiles = $request->getUploadedFiles();
$queryParams = $request->getQueryParams();
// Create response and fill with data
$response = new Response();
$response->withHeader('Content-Type', 'application/json');
$response->withAddedHeader('X-Zend-Framework', 'Diactoros');
$response->getBody()->write(json_encode($data));
ZendDiactoros Server ApplikationZendDiactoros Server Applikation
39 / 61
Neu: ZendStratigilityNeu: ZendStratigility
»Stratigility« comes from
»Strata«, Latin for »layer«,
and »agility«.
Applikationen auf
Basis von Middleware
umsetzen
GitHub
https://github.com/zendframework/zend-stratigility
Request
Middleware
Response
Middleware
Pipeline
Setzt auf ZendDiactoros auf
Authentication
Middleware
Error
Handler
Middleware
40 / 61
use ZendStratigilityMiddlewarePipe;
// Create middleware pipe
$app = new MiddlewarePipe();
// Output homepage or delegate to next middleware
$app->pipe('/', function ($request, $response, $next) {
$path = $request->getUri()->getPath();
if (! in_array($path, ['/', ''], true)) {
return $next($request, $response);
}
return $response->end('Homepage!');
});
// Output foo page
$app->pipe('/foo', function ($request, $response, $next) {
return $response->end('FOO!');
});
ZendStratigility MiddlewareZendStratigility Middleware
41 / 61
use ZendStratigilityMiddlewarePipe;
use ZendDiactorosServer;
// Create middleware pipe
$app = new MiddlewarePipe();
// Create server
$server = Server::createServer(
$app, $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES
);
// Add middleware to pipe
$app->pipe([...]);
$app->pipe([...]);
$app->pipe([...]);
// Let the server listen
$server->listen();
ZendStratigility ServerZendStratigility Server
[B08][B08]
4242 // 6161
ZendExpressiveZendExpressive
4343 // 6161
MiddlewareMiddleware
[B19][B19]
4444 // 6161
Middleware ohne und mit PipeMiddleware ohne und mit Pipe
Client MIDDLEWARE
Request Response
Client Request Response
Middleware Middleware Middleware
Client
MWPIPE Client
45 / 61
ZendExpressiveZendExpressive
»Begin developing PSR-7
middleware applications
in minutes!«.
Mikroframework
für PSR-7 Middleware
Anwendungen
GitHub
https://github.com/zendframework/zend-expressive
Routing:
Aura.Router
FastRoute
ZendMvcRouter
Templating:
Plates
Twig
ZendView
Setzt auf ZendStratigility
und ZendDiactoros auf
Dependency Injection
Container:
ZendServiceManager
Pimple
Aura.Di
ErrorHandling:
Whoops
APIs
Komplexe Websites
Single Page Applikationen
Konsolenanwendungen
4646 // 6161
ZendExpressive Skeleton ApplicationZendExpressive Skeleton Application
https://github.com/zendframework/zend-expressive-skeletonhttps://github.com/zendframework/zend-expressive-skeleton
47 / 61
use ZendExpressiveAppFactory;
use ZendServiceManagerServiceManager;
require __DIR__ . '/../vendor/autoload.php';
$container = new ServiceManager();
$container->setFactory('HelloWorld', function ($container) {});
$container->setFactory('Ping', function ($container) {});
$app = AppFactory::create($container);
$app->get('/', 'HelloWorld');
$app->get('/ping', 'Ping');
$app->run();
Bootstrapping: einfachBootstrapping: einfach
48 / 61
require __DIR__ . '/../vendor/autoload.php';
$container = include __DIR__ . '/../config/services.php';
$app = $container->get('ZendExpressiveApplication');
$app->run();
Bootstrapping: mit KonfigurationBootstrapping: mit Konfiguration
49 / 61
// Datei /config/services.php
use ZendConfigFactory as ConfigFactory;
use ZendServiceManagerConfig;
use ZendServiceManagerServiceManager;
$config = ConfigFactory::fromFiles(
glob('config/autoload/{,*.}{global,local}.php', GLOB_BRACE)
);
$serviceManager = new ServiceManager(
new Config($config['services'])
);
$serviceManager->setService('config', $config);
return $serviceManager;
Ausgelagerte Konfiguration IAusgelagerte Konfiguration I
50 / 61
// Datei /config/autoload/global.php
return [
'routes' => [
[
'path' => '/',
'middleware' => 'ApplicationHelloWorld',
'allowed_methods' => [ 'GET' ],
],
],
'services => [
'invokables' => [
ApplicationHelloWorld::class =>
ApplicationHelloWorld::class,
],
'factories' => [
ZendExpressiveApplication::class =>
ZendExpressiveContainerApplicationFactory::class,
],
],
];
Ausgelagerte Konfiguration IIAusgelagerte Konfiguration II
51 / 61
// Datei /src/Application/HelloWorld.php
namespace Application;
class HelloWorld
{
public function __invoke($req, $res, $next)
{
$res->write('Hello, world!');
return $res;
}
}
HelloWorld MiddleWareHelloWorld MiddleWare
[b09][b09]
5252 // 6161
ZEND Framework 3 AusblickZEND Framework 3 Ausblick
53 / 61
Zend Framework 3Zend Framework 3
Erscheint:
Ende 2015 oder Anfang 2016
Kein vollständiges
Download Archiv
GitHub (voraussichtlich)
https://github.com/zendframework/zf3
Sehr lose
Kopplung
50+
Komponenten
50+
Repositories
Jede Komponente
besitzt eigene Tests und
Dokumentation
5454 // 6161
ZEND Framework 3 VariantenZEND Framework 3 Varianten
[B20][B20]
MVCMVC ExpressiveExpressive ApigilityApigility ZFConsoleZFConsole
[B03][B03]
5555 // 6161
[B03][B03]
5656 // 6161
Letzte Worte von MatthewLetzte Worte von Matthew
57 / 61
[b13]
Frameworks should be
an implementation detail!
Frameworks should get
out of the way of your code!
ZF3 is a Movement!
An end to framework silos!
Fragen vom Publikum?Fragen vom Publikum?
5858 // 6161
[b21][b21]
WerbungWerbung
59 / 61
[b13]
Heute: 17 Uhr
www.travello.de/#jobswww.travello.de/#jobs
Ab Frühjahr 2016:
www.ralfeggert.dewww.ralfeggert.de
[b22]
DankeDanke
Für Ihre / Eure AufmerksamkeitFür Ihre / Eure Aufmerksamkeit

Repository: https://github.com/RalfEggert/ipc2015-zf3-reloadedRepository: https://github.com/RalfEggert/ipc2015-zf3-reloaded
Slides: http://de.slideshare.net/eggertralf/ipc2015-zf3-reloadedSlides: http://de.slideshare.net/eggertralf/ipc2015-zf3-reloaded
60 / 61
[b01][b01]
BildnachweisBildnachweis
[B00] Fotos von Ralf Eggert
[B01] Matrix http://el-sobreviviente.deviantart.com/art/Matrix-98173515 von El-Sobreviviente - CC-BY http://creativecommons.org/licenses/by/3.0/
[B02] Frontiers 2011 - Day 2 https://www.flickr.com/photos/frontiersofinteraction/5866676276/ von Frontiersofinteraction - CC-BY https://creativecommons.org/licenses/by/2.0/
[B03] Imgflip Meme Generator https://imgflip.com/memegenerator/Matrix-Morpheus von imgflip.com
[B04] Horloge retour vers le futur https://commons.wikimedia.org/wiki/File:Horloge_retour_vers_le_futur.jpg von Wikimedia - https://creativecommons.org/publicdomain/zero/1.0/
[B05] Earth https://stocksnap.io/photo/DUGHLO7780 von Jay Mantri - CC0 https://creativecommons.org/publicdomain/zero/1.0/deed.de
[B06] Darts https://www.flickr.com/photos/bogdansuditu/2377844553/ von Bogdan Suditu - CC-BY https://creativecommons.org/licenses/by/2.0/
[B07] Rainbow cubes with holes https://www.flickr.com/photos/generated/6313491064/ von Jared Tarbell - CC-BY https://creativecommons.org/licenses/by/2.0/
[B08] Dutch Winter-landscape https://www.flickr.com/photos/abstract-art-fons/8956994541/ von Fons Heijnsbroek - CC-BY https://creativecommons.org/licenses/by/2.0/
[B09] Mountain View https://www.flickr.com/photos/henry_hemming/13228460095/ von Henry Hemming - CC-BY https://creativecommons.org/licenses/by/2.0/
[B10] Che Guevera https://www.flickr.com/photos/hellosputnik/2102443979/ von sputnik - CC-BY https://creativecommons.org/licenses/by/2.0/
[B11] Rubber bands https://www.flickr.com/photos/mullica/5455794041/ von Robert Brenner - CC-BY https://creativecommons.org/licenses/by/2.0/
[B12] PHP 7 Elephpant http://devzone.zend.com/6541/zendcon-php-user-groups-and-free-elephpants/ von Zend Technologies
[B13] Pocket knife collection https://www.flickr.com/photos/alexkerhead/3646629009/ von alexkerhead - CC-BY https://creativecommons.org/licenses/by/2.0/
[B14] Apothecary Cabinet https://www.flickr.com/photos/12020006@N05/8359813920/ von tootsie8664 -- CC-BY https://creativecommons.org/licenses/by/2.0/
[B15] Porsche 911 GT3RS https://www.flickr.com/photos/gfreeman23/8450589227/ von Axion23 - CC-BY https://creativecommons.org/licenses/by/2.0/
[B16] xbox-pad-for-windows-01 https://www.flickr.com/photos/futurilla/4565559935/ von Futurilla - CC-BY https://creativecommons.org/licenses/by/2.0/
[B17] Domino https://www.flickr.com/photos/barryskeates/6803420982/ von Barry Skeates - CC-BY https://creativecommons.org/licenses/by/2.0/
[B18] Guidepost https://www.flickr.com/photos/mperich/5110059854/ von Matt Perich - CC-BY https://creativecommons.org/licenses/by/2.0/
[B19]Telephone operator https://www.flickr.com/photos/kibbe_museum/5576853477/ von Kibbe Museum -- CC-BY https://creativecommons.org/licenses/by/2.0/
[B20] Jars / Gläser https://www.flickr.com/photos/manoftaste-de/9303523676/ von Christian Schnettelker / www.manoftaste.de - CC-BY https://creativecommons.org/licenses/by/2.0/
[B21] Etech05: Audience https://www.flickr.com/photos/oreilly/6648470 von James Duncan Davidson - CC-BY https://creativecommons.org/licenses/by/2.0/
[B22] Jobs https://www.flickr.com/photos/jakerust/16844967041/ von www.gotcredit.com - CC-BY https://creativecommons.org/licenses/by/2.0/
ZFrapid Logo von Moritz Liebeknecht.
Alle weiteren Screenshots und Grafiken wurden von Ralf Eggert erstellt.
61 / 61

Más contenido relacionado

La actualidad más candente

Wie Software-Generatoren die Welt verändern können - Herbstcampus12
Wie Software-Generatoren die Welt verändern können - Herbstcampus12Wie Software-Generatoren die Welt verändern können - Herbstcampus12
Wie Software-Generatoren die Welt verändern können - Herbstcampus12Stephan Hochdörfer
 
Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014Martin Alfke
 
Celery - eine asynchrone Task Queue (nicht nur) für Django
Celery - eine asynchrone Task Queue (nicht nur) für DjangoCelery - eine asynchrone Task Queue (nicht nur) für Django
Celery - eine asynchrone Task Queue (nicht nur) für DjangoMarkus Zapke-Gründemann
 
Einstieg in Xpath für SEO (Campixx2021)
Einstieg in Xpath für SEO (Campixx2021)Einstieg in Xpath für SEO (Campixx2021)
Einstieg in Xpath für SEO (Campixx2021)Sebastian Adler
 
AdvancedTdd
AdvancedTddAdvancedTdd
AdvancedTddjlink
 
Request Lifecycle im Zend Framework
Request Lifecycle im Zend FrameworkRequest Lifecycle im Zend Framework
Request Lifecycle im Zend FrameworkMayflower GmbH
 
Celery eine asynchrone task queue (nicht nur) für django
Celery   eine asynchrone task queue (nicht nur) für djangoCelery   eine asynchrone task queue (nicht nur) für django
Celery eine asynchrone task queue (nicht nur) für djangoMarkus Zapke-Gründemann
 
Welches Webframework passt zu mir? (WJAX)
Welches Webframework passt zu mir? (WJAX)Welches Webframework passt zu mir? (WJAX)
Welches Webframework passt zu mir? (WJAX)Alexander Casall
 
Angular von 0 auf 100
Angular von 0 auf 100Angular von 0 auf 100
Angular von 0 auf 100Yvette Teiken
 
Why websecurity sucks
Why websecurity sucksWhy websecurity sucks
Why websecurity sucksThaDafinser
 
Enterprise Java Batch mit Spring
Enterprise Java Batch mit SpringEnterprise Java Batch mit Spring
Enterprise Java Batch mit Springdenschu
 

La actualidad más candente (15)

Wie Software-Generatoren die Welt verändern können - Herbstcampus12
Wie Software-Generatoren die Welt verändern können - Herbstcampus12Wie Software-Generatoren die Welt verändern können - Herbstcampus12
Wie Software-Generatoren die Welt verändern können - Herbstcampus12
 
Testing tools
Testing toolsTesting tools
Testing tools
 
Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014
 
Celery - eine asynchrone Task Queue (nicht nur) für Django
Celery - eine asynchrone Task Queue (nicht nur) für DjangoCelery - eine asynchrone Task Queue (nicht nur) für Django
Celery - eine asynchrone Task Queue (nicht nur) für Django
 
Einstieg in Xpath für SEO (Campixx2021)
Einstieg in Xpath für SEO (Campixx2021)Einstieg in Xpath für SEO (Campixx2021)
Einstieg in Xpath für SEO (Campixx2021)
 
Mvc public
Mvc publicMvc public
Mvc public
 
AdvancedTdd
AdvancedTddAdvancedTdd
AdvancedTdd
 
Request Lifecycle im Zend Framework
Request Lifecycle im Zend FrameworkRequest Lifecycle im Zend Framework
Request Lifecycle im Zend Framework
 
Rack-Middleware
Rack-MiddlewareRack-Middleware
Rack-Middleware
 
Celery eine asynchrone task queue (nicht nur) für django
Celery   eine asynchrone task queue (nicht nur) für djangoCelery   eine asynchrone task queue (nicht nur) für django
Celery eine asynchrone task queue (nicht nur) für django
 
Welches Webframework passt zu mir? (WJAX)
Welches Webframework passt zu mir? (WJAX)Welches Webframework passt zu mir? (WJAX)
Welches Webframework passt zu mir? (WJAX)
 
Symfony2
Symfony2Symfony2
Symfony2
 
Angular von 0 auf 100
Angular von 0 auf 100Angular von 0 auf 100
Angular von 0 auf 100
 
Why websecurity sucks
Why websecurity sucksWhy websecurity sucks
Why websecurity sucks
 
Enterprise Java Batch mit Spring
Enterprise Java Batch mit SpringEnterprise Java Batch mit Spring
Enterprise Java Batch mit Spring
 

Destacado

Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterRalf Eggert
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Adam Culp
 
IPC 2015 ZF2rapid
IPC 2015 ZF2rapidIPC 2015 ZF2rapid
IPC 2015 ZF2rapidRalf Eggert
 
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
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with ExpressiveElton Minetto
 
Apigility reloaded
Apigility reloadedApigility reloaded
Apigility reloadedRalf Eggert
 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an apiMichelangelo van Dam
 
PHPunconf14: Apigility Einführung
PHPunconf14: Apigility EinführungPHPunconf14: Apigility Einführung
PHPunconf14: Apigility EinführungRalf Eggert
 
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Ralf Eggert
 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me laterMichelangelo van Dam
 

Destacado (12)

Zend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiterZend\Expressive - höher, schneller, weiter
Zend\Expressive - höher, schneller, weiter
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2
 
IPC 2015 ZF2rapid
IPC 2015 ZF2rapidIPC 2015 ZF2rapid
IPC 2015 ZF2rapid
 
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)
 
Creating an API with Expressive
Creating an API with ExpressiveCreating an API with Expressive
Creating an API with Expressive
 
Apigility reloaded
Apigility reloadedApigility reloaded
Apigility reloaded
 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an api
 
PHPunconf14: Apigility Einführung
PHPunconf14: Apigility EinführungPHPunconf14: Apigility Einführung
PHPunconf14: Apigility Einführung
 
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
Framework Auswahlkriterin, PHP Unconference 2009 in Hamburg
 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me later
 
The road to php 7.1
The road to php 7.1The road to php 7.1
The road to php 7.1
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 

Similar a IPC 2015 Zend Framework 3 Reloaded

Microservices mit Rust
Microservices mit RustMicroservices mit Rust
Microservices mit RustJens Siebert
 
Die nächsten 100 Microservices
Die nächsten 100 MicroservicesDie nächsten 100 Microservices
Die nächsten 100 MicroservicesQAware GmbH
 
Praesentation TYPO3Camp Berlin Speed mit Extbase
Praesentation TYPO3Camp Berlin Speed mit ExtbasePraesentation TYPO3Camp Berlin Speed mit Extbase
Praesentation TYPO3Camp Berlin Speed mit ExtbaseStefan Frömken
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...gedoplan
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...gedoplan
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenWalter Ebert
 
Entwicklungsumgebungen mit Vagrant
Entwicklungsumgebungen mit VagrantEntwicklungsumgebungen mit Vagrant
Entwicklungsumgebungen mit VagrantB1 Systems GmbH
 
Middleware Anwendungen mit dem Zend Framework 3
Middleware Anwendungen mit dem Zend Framework 3Middleware Anwendungen mit dem Zend Framework 3
Middleware Anwendungen mit dem Zend Framework 3Ralf Eggert
 
Agiles Modellieren mit Domain Specific Languages
Agiles Modellieren mit Domain Specific LanguagesAgiles Modellieren mit Domain Specific Languages
Agiles Modellieren mit Domain Specific LanguagesDominik Hirt
 
Production-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenProduction-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenAndré Goliath
 
Versionskontrolle in Machine-Learning-Projekten
Versionskontrolle in Machine-Learning-ProjektenVersionskontrolle in Machine-Learning-Projekten
Versionskontrolle in Machine-Learning-Projektencusy GmbH
 
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware Monitoring
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware MonitoringOSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware Monitoring
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware MonitoringNETWAYS
 
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-Monitorings
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-MonitoringsOSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-Monitorings
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-MonitoringsNETWAYS
 
.NET Summit 2016 in München: ASP.NET Core 1
.NET Summit 2016 in München: ASP.NET Core 1.NET Summit 2016 in München: ASP.NET Core 1
.NET Summit 2016 in München: ASP.NET Core 1Manfred Steyer
 
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...NETWAYS
 
Migration zum Zend Framework 3
Migration zum Zend Framework 3Migration zum Zend Framework 3
Migration zum Zend Framework 3Ralf Eggert
 
Backend-Services mit Rust
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit RustJens Siebert
 

Similar a IPC 2015 Zend Framework 3 Reloaded (20)

Microservices mit Rust
Microservices mit RustMicroservices mit Rust
Microservices mit Rust
 
Die nächsten 100 Microservices
Die nächsten 100 MicroservicesDie nächsten 100 Microservices
Die nächsten 100 Microservices
 
Praesentation TYPO3Camp Berlin Speed mit Extbase
Praesentation TYPO3Camp Berlin Speed mit ExtbasePraesentation TYPO3Camp Berlin Speed mit Extbase
Praesentation TYPO3Camp Berlin Speed mit Extbase
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrieren
 
Einführung in Docker
Einführung in DockerEinführung in Docker
Einführung in Docker
 
Entwicklungsumgebungen mit Vagrant
Entwicklungsumgebungen mit VagrantEntwicklungsumgebungen mit Vagrant
Entwicklungsumgebungen mit Vagrant
 
Einführung in Puppet
Einführung in PuppetEinführung in Puppet
Einführung in Puppet
 
Middleware Anwendungen mit dem Zend Framework 3
Middleware Anwendungen mit dem Zend Framework 3Middleware Anwendungen mit dem Zend Framework 3
Middleware Anwendungen mit dem Zend Framework 3
 
Agiles Modellieren mit Domain Specific Languages
Agiles Modellieren mit Domain Specific LanguagesAgiles Modellieren mit Domain Specific Languages
Agiles Modellieren mit Domain Specific Languages
 
Production-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenProduction-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 Wochen
 
Versionskontrolle in Machine-Learning-Projekten
Versionskontrolle in Machine-Learning-ProjektenVersionskontrolle in Machine-Learning-Projekten
Versionskontrolle in Machine-Learning-Projekten
 
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware Monitoring
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware MonitoringOSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware Monitoring
OSMC 2016 - Hello Redfish, Goodbye IPMI - The future of Hardware Monitoring
 
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-Monitorings
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-MonitoringsOSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-Monitorings
OSMC 2016 | Hello Redfish, goodbye IPMI - Die Zukunft des Hardware-Monitorings
 
Web Entwicklung mit PHP - Teil 1
Web Entwicklung mit PHP - Teil 1Web Entwicklung mit PHP - Teil 1
Web Entwicklung mit PHP - Teil 1
 
.NET Summit 2016 in München: ASP.NET Core 1
.NET Summit 2016 in München: ASP.NET Core 1.NET Summit 2016 in München: ASP.NET Core 1
.NET Summit 2016 in München: ASP.NET Core 1
 
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
OSDC 2013 | Enterprise open source virtualization with oVirt and RHEV by René...
 
Migration zum Zend Framework 3
Migration zum Zend Framework 3Migration zum Zend Framework 3
Migration zum Zend Framework 3
 
Backend-Services mit Rust
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit Rust
 

Más 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
 
Zend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next GenerationZend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next GenerationRalf Eggert
 

Más 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
 
Zend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next GenerationZend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next Generation
 

IPC 2015 Zend Framework 3 Reloaded

  • 1. Zend Framework 3Zend Framework 3 ReloadedReloaded  Repository: https://github.com/RalfEggert/ipc2015-zf3-reloadedRepository: https://github.com/RalfEggert/ipc2015-zf3-reloaded 1 / 61 [b01][b01]
  • 7. ZF1/ZF2 HistorieZF1/ZF2 Historie PHP Welt HEUTEPHP Welt HEUTE Ziele ZF3Ziele ZF3 Komponenten reloadedKomponenten reloaded ZendExpressiveZendExpressive ZF3 AusblickZF3 Ausblick 7 / 61 [B06][B06][B05][B05][B04] [B09][B09][B08][B08][B07][B07] AgendaAgenda
  • 8. [B04] 88 // 6161 ZF1 / ZF2 HistorieZF1 / ZF2 Historie
  • 11. 11 / 61 Zend Framework 1 und 2 HistorieZend Framework 1 und 2 Historie 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 Version 0.1 (02.03.2006) Version 1.0 (30.06.2006) Version 1.5 (17.03.2008) Version 1.6 (02.09.2008) Version 1.7 (17.11.2008) Version 1.8 (30.04.2009) Version 1.9 (31.07.2009) Version 1.10 (27.01.2010) Version 1.11 (02.11.2010) Version 1.12 (27.08.2012) Version 2.0 (04.09.2012) Version 2.1 (30.01.2013) Version 2.2 (15.05.2013) Version 2.3 (12.03.2014) Version 2.4 (31.03.2015) Version 2.5 (30.06.2015)
  • 12. 12 / 61 Zend Framework 1Zend Framework 1 Erschienen: 2006 Letztes Update: 2015 Letzte Version: 1.12.16 1 Download Archiv GitHub https://github.com/zendframework/zf1 Enge Kopplung 68 Komponenten 1 Repository
  • 13. 13 / 61 Zend Framework 2Zend Framework 2 Erschienen: 2012 Letztes Update: 2015 Letzte Version: 2.4.8 LTS bis: 2018 1 Download Archiv GitHub https://github.com/zendframework/zf2 Losere Kopplung 49 Komponenten 1 Repository viele Packages
  • 14. 1414 // 6161 Zend Framework 2 Revolution→Zend Framework 2 Revolution→ [B10][B10]
  • 15. 1515 // 6161 Migration ZF1 ZF2 desaster→ →Migration ZF1 ZF2 desaster→ → [B11][B11]
  • 16. [B05][B05] 1616 // 6161 PHP Welt heutePHP Welt heute
  • 17. 1717 // 6161 PHP 7PHP 7 [B12][B12]
  • 19. 19 / 61 PHP FIGPHP FIG PSR-7 PSR-4 PSR-2 PSR-0
  • 20. 2020 // 6161 PSR-7 HTTP Message InterfacesPSR-7 HTTP Message Interfaces [B13][B13]
  • 21. [B06][B06] 2121 // 6161 Ziele für Zend Framework 3Ziele für Zend Framework 3
  • 22. 2222 // 6161 Komponenten separierenKomponenten separieren [B14][B14]
  • 25. 25 / 61 PSR-7 / MiddlewarePSR-7 / Middleware [B17]
  • 27. 27 / 61 { "name": "zendframework/zendframework", "description": "Zend Framework 2", "require": { "php": ">=5.5", "zendframework/zend-authentication": "~2.5.0", "zendframework/zend-barcode": "~2.5.0", "zendframework/zend-cache": "~2.5.0", "zendframework/zend-captcha": "~2.5.0", "zendframework/zend-code": "~2.5.0", "zendframework/zend-config": "~2.5.0", "zendframework/zend-console": "~2.5.0", "zendframework/zend-crypt": "~2.5.0", "zendframework/zend-db": "~2.5.0", "zendframework/zend-debug": "~2.5.0", [...] } } Neue Composer.json (ZF 2.5)Neue Composer.json (ZF 2.5)
  • 28. [B07][B07] 2828 // 6161 Komponenten reloadedKomponenten reloaded
  • 29. 29 / 61 ZendServiceManagerZendServiceManager Container Interoperability https://github.com/container-interop/container-interop Einheitliche Interface & Wiederverwendbare Factories GitHub https://github.com/zendframework/zend-servicemanager Fast vollständig Rückwärtskompatibel Performance 4x schneller Neue build() Methode Factories per Interface oder Invokable Migration-Guide: 11 DIN A4 Seiten Service Identifier Best Practice: class name resolution syntax
  • 30. 30 / 61 // ArticleEntity::class mit PHP 5.5 eingeführt return [ 'service_manager' => [ 'invokables' => [ BlogEntityArticleEntity::class => BlogEntityArticleEntity::class, ], 'factories' => [ BlogTableArticleTable::class => BlogTableArticleTableFactory::class, ], ], ]; Best practice: Class Name resolutionBest practice: Class Name resolution
  • 31. 31 / 61 return [ 'service_manager' => [ 'invokables' => [ BlogEntityArticleEntity::class => BlogEntityArticleEntity::class, ], ], ]; $entity1 = $sm->get(BlogEntityArticleEntity::class); $entity2 = $sm->get(BlogEntityArticleEntity::class); var_dump($entity1 === $entity2); // prints "true" $entity1 = $sm->build(BlogEntityArticleEntity::class); $entity2 = $sm->build(BlogEntityArticleEntity::class); var_dump($entity1 === $entity2); // prints "false" Neue Build() MethodeNeue Build() Methode
  • 32. 32 / 61 ZendEventManagerZendEventManager BC Break I: Keine Überladung der trigger() Methoden mehr BC Break II: Anhängen von Listener- Aggregaten verändert GitHub https://github.com/zendframework/zend-eventmanager Performance 4x bis 15x schneller BC Break III: GlobalEventManager & StaticEventManager entfernt BC Break IV: SharedEventManager Einsatz verändert Migration-Guide: 10 DIN A4 Seiten
  • 33. 33 / 61 // VORHER: Parameter konnten überladen werden // $event => String, Array/Traversable ODER EventInterface // $target => Callable, EventInterface ODER ein Value // $argv => Callable, EventInterface ODER ein Array // $callback => Callable ODER null trigger($event, $target = null, $argv = [], $callback = null); triggerUntil($event, $target = null, $argv = [], $callback = null); // NACHHER: keine Parameter Überladung mehr // $event => String // $target => Value für Target // $argv => Array mit Event Parametern trigger($event, $target = null, $argv = []); triggerUntil($callback, $event, $target = null, $argv = []); Geänderte Trigger() MethodenGeänderte Trigger() Methoden
  • 34. 34 / 61 // VORHER: 3 Varianten $eventManager = new EventManager(); $listenerAggregate = new MyListenerAggregate(); $eventManager->attach($listenerAggregate); // Variante 1 $eventManager->attachAggregate($listenerAggregate); // Variante 2 $listenerAggregate->attach($eventManager); // Variante 3 // NACHHER: 1 Variante $eventManager = new EventManager(); $listenerAggregate = new MyListenerAggregate(); $listenerAggregate->attach($eventManager); Aggregate AttachmentAggregate Attachment
  • 35. 35 / 61 ZendMVCZendMVC Änderungen von ZendServiceManager übernommen Änderungen von ZendEventManager übernommen GitHub https://github.com/zendframework/zend-mvc Neuer MiddlewareListener Bleibt im Grund unverändert Refaktorierung voraussichtlich abgeschlossen: Anfang Dezember 2015 Migration-Guide: 2 DIN A4 Seiten (bisher)
  • 36. 36 / 61 Neu: ZendDiactorosNeu: ZendDiactoros »Diactoros« an epithet for Hermes, meaning literally, »the messenger.« PHP FIG (Framework Interop Group) PSR-7 (HTTP Message Interfaces) GitHub https://github.com/zendframework/zend-diactoros Serverseitige Applikationen HTTP Clients
  • 37. 37 / 61 use ZendDiactorosRequest; use ZendDiactorosUri; // Create request $request = new Request(); $request->withUri(new Uri('http://website.com')); $request->withMethod('POST'); $request->withAddedHeader('Authorization', 'Bearer ' . $token); $request->withAddedHeader('Content-Type', 'application/json'); $request->getBody()->write(json_encode($data)); // Send request to get response $response = $client->send($request); // Get data from response $statusCode = $response->getStatusCode(); $reasonPhrase = $response->getReasonPhrase(); $headers = $response->getHeaders(); $body = $response->getBody(); ZendDiactoros HTTP ClientZendDiactoros HTTP Client
  • 38. 38 / 61 use ZendDiactorosServerRequestFactory; use ZendDiactorosResponse; // Create request from superglobals $request = ServerRequestFactory::fromGlobals( $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES ); // Get data from request $uploadedFiles = $request->getUploadedFiles(); $queryParams = $request->getQueryParams(); // Create response and fill with data $response = new Response(); $response->withHeader('Content-Type', 'application/json'); $response->withAddedHeader('X-Zend-Framework', 'Diactoros'); $response->getBody()->write(json_encode($data)); ZendDiactoros Server ApplikationZendDiactoros Server Applikation
  • 39. 39 / 61 Neu: ZendStratigilityNeu: ZendStratigility »Stratigility« comes from »Strata«, Latin for »layer«, and »agility«. Applikationen auf Basis von Middleware umsetzen GitHub https://github.com/zendframework/zend-stratigility Request Middleware Response Middleware Pipeline Setzt auf ZendDiactoros auf Authentication Middleware Error Handler Middleware
  • 40. 40 / 61 use ZendStratigilityMiddlewarePipe; // Create middleware pipe $app = new MiddlewarePipe(); // Output homepage or delegate to next middleware $app->pipe('/', function ($request, $response, $next) { $path = $request->getUri()->getPath(); if (! in_array($path, ['/', ''], true)) { return $next($request, $response); } return $response->end('Homepage!'); }); // Output foo page $app->pipe('/foo', function ($request, $response, $next) { return $response->end('FOO!'); }); ZendStratigility MiddlewareZendStratigility Middleware
  • 41. 41 / 61 use ZendStratigilityMiddlewarePipe; use ZendDiactorosServer; // Create middleware pipe $app = new MiddlewarePipe(); // Create server $server = Server::createServer( $app, $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES ); // Add middleware to pipe $app->pipe([...]); $app->pipe([...]); $app->pipe([...]); // Let the server listen $server->listen(); ZendStratigility ServerZendStratigility Server
  • 44. 4444 // 6161 Middleware ohne und mit PipeMiddleware ohne und mit Pipe Client MIDDLEWARE Request Response Client Request Response Middleware Middleware Middleware Client MWPIPE Client
  • 45. 45 / 61 ZendExpressiveZendExpressive »Begin developing PSR-7 middleware applications in minutes!«. Mikroframework für PSR-7 Middleware Anwendungen GitHub https://github.com/zendframework/zend-expressive Routing: Aura.Router FastRoute ZendMvcRouter Templating: Plates Twig ZendView Setzt auf ZendStratigility und ZendDiactoros auf Dependency Injection Container: ZendServiceManager Pimple Aura.Di ErrorHandling: Whoops APIs Komplexe Websites Single Page Applikationen Konsolenanwendungen
  • 46. 4646 // 6161 ZendExpressive Skeleton ApplicationZendExpressive Skeleton Application https://github.com/zendframework/zend-expressive-skeletonhttps://github.com/zendframework/zend-expressive-skeleton
  • 47. 47 / 61 use ZendExpressiveAppFactory; use ZendServiceManagerServiceManager; require __DIR__ . '/../vendor/autoload.php'; $container = new ServiceManager(); $container->setFactory('HelloWorld', function ($container) {}); $container->setFactory('Ping', function ($container) {}); $app = AppFactory::create($container); $app->get('/', 'HelloWorld'); $app->get('/ping', 'Ping'); $app->run(); Bootstrapping: einfachBootstrapping: einfach
  • 48. 48 / 61 require __DIR__ . '/../vendor/autoload.php'; $container = include __DIR__ . '/../config/services.php'; $app = $container->get('ZendExpressiveApplication'); $app->run(); Bootstrapping: mit KonfigurationBootstrapping: mit Konfiguration
  • 49. 49 / 61 // Datei /config/services.php use ZendConfigFactory as ConfigFactory; use ZendServiceManagerConfig; use ZendServiceManagerServiceManager; $config = ConfigFactory::fromFiles( glob('config/autoload/{,*.}{global,local}.php', GLOB_BRACE) ); $serviceManager = new ServiceManager( new Config($config['services']) ); $serviceManager->setService('config', $config); return $serviceManager; Ausgelagerte Konfiguration IAusgelagerte Konfiguration I
  • 50. 50 / 61 // Datei /config/autoload/global.php return [ 'routes' => [ [ 'path' => '/', 'middleware' => 'ApplicationHelloWorld', 'allowed_methods' => [ 'GET' ], ], ], 'services => [ 'invokables' => [ ApplicationHelloWorld::class => ApplicationHelloWorld::class, ], 'factories' => [ ZendExpressiveApplication::class => ZendExpressiveContainerApplicationFactory::class, ], ], ]; Ausgelagerte Konfiguration IIAusgelagerte Konfiguration II
  • 51. 51 / 61 // Datei /src/Application/HelloWorld.php namespace Application; class HelloWorld { public function __invoke($req, $res, $next) { $res->write('Hello, world!'); return $res; } } HelloWorld MiddleWareHelloWorld MiddleWare
  • 52. [b09][b09] 5252 // 6161 ZEND Framework 3 AusblickZEND Framework 3 Ausblick
  • 53. 53 / 61 Zend Framework 3Zend Framework 3 Erscheint: Ende 2015 oder Anfang 2016 Kein vollständiges Download Archiv GitHub (voraussichtlich) https://github.com/zendframework/zf3 Sehr lose Kopplung 50+ Komponenten 50+ Repositories Jede Komponente besitzt eigene Tests und Dokumentation
  • 54. 5454 // 6161 ZEND Framework 3 VariantenZEND Framework 3 Varianten [B20][B20] MVCMVC ExpressiveExpressive ApigilityApigility ZFConsoleZFConsole
  • 57. Letzte Worte von MatthewLetzte Worte von Matthew 57 / 61 [b13] Frameworks should be an implementation detail! Frameworks should get out of the way of your code! ZF3 is a Movement! An end to framework silos!
  • 58. Fragen vom Publikum?Fragen vom Publikum? 5858 // 6161 [b21][b21]
  • 59. WerbungWerbung 59 / 61 [b13] Heute: 17 Uhr www.travello.de/#jobswww.travello.de/#jobs Ab Frühjahr 2016: www.ralfeggert.dewww.ralfeggert.de [b22]
  • 60. DankeDanke Für Ihre / Eure AufmerksamkeitFür Ihre / Eure Aufmerksamkeit  Repository: https://github.com/RalfEggert/ipc2015-zf3-reloadedRepository: https://github.com/RalfEggert/ipc2015-zf3-reloaded Slides: http://de.slideshare.net/eggertralf/ipc2015-zf3-reloadedSlides: http://de.slideshare.net/eggertralf/ipc2015-zf3-reloaded 60 / 61 [b01][b01]
  • 61. BildnachweisBildnachweis [B00] Fotos von Ralf Eggert [B01] Matrix http://el-sobreviviente.deviantart.com/art/Matrix-98173515 von El-Sobreviviente - CC-BY http://creativecommons.org/licenses/by/3.0/ [B02] Frontiers 2011 - Day 2 https://www.flickr.com/photos/frontiersofinteraction/5866676276/ von Frontiersofinteraction - CC-BY https://creativecommons.org/licenses/by/2.0/ [B03] Imgflip Meme Generator https://imgflip.com/memegenerator/Matrix-Morpheus von imgflip.com [B04] Horloge retour vers le futur https://commons.wikimedia.org/wiki/File:Horloge_retour_vers_le_futur.jpg von Wikimedia - https://creativecommons.org/publicdomain/zero/1.0/ [B05] Earth https://stocksnap.io/photo/DUGHLO7780 von Jay Mantri - CC0 https://creativecommons.org/publicdomain/zero/1.0/deed.de [B06] Darts https://www.flickr.com/photos/bogdansuditu/2377844553/ von Bogdan Suditu - CC-BY https://creativecommons.org/licenses/by/2.0/ [B07] Rainbow cubes with holes https://www.flickr.com/photos/generated/6313491064/ von Jared Tarbell - CC-BY https://creativecommons.org/licenses/by/2.0/ [B08] Dutch Winter-landscape https://www.flickr.com/photos/abstract-art-fons/8956994541/ von Fons Heijnsbroek - CC-BY https://creativecommons.org/licenses/by/2.0/ [B09] Mountain View https://www.flickr.com/photos/henry_hemming/13228460095/ von Henry Hemming - CC-BY https://creativecommons.org/licenses/by/2.0/ [B10] Che Guevera https://www.flickr.com/photos/hellosputnik/2102443979/ von sputnik - CC-BY https://creativecommons.org/licenses/by/2.0/ [B11] Rubber bands https://www.flickr.com/photos/mullica/5455794041/ von Robert Brenner - CC-BY https://creativecommons.org/licenses/by/2.0/ [B12] PHP 7 Elephpant http://devzone.zend.com/6541/zendcon-php-user-groups-and-free-elephpants/ von Zend Technologies [B13] Pocket knife collection https://www.flickr.com/photos/alexkerhead/3646629009/ von alexkerhead - CC-BY https://creativecommons.org/licenses/by/2.0/ [B14] Apothecary Cabinet https://www.flickr.com/photos/12020006@N05/8359813920/ von tootsie8664 -- CC-BY https://creativecommons.org/licenses/by/2.0/ [B15] Porsche 911 GT3RS https://www.flickr.com/photos/gfreeman23/8450589227/ von Axion23 - CC-BY https://creativecommons.org/licenses/by/2.0/ [B16] xbox-pad-for-windows-01 https://www.flickr.com/photos/futurilla/4565559935/ von Futurilla - CC-BY https://creativecommons.org/licenses/by/2.0/ [B17] Domino https://www.flickr.com/photos/barryskeates/6803420982/ von Barry Skeates - CC-BY https://creativecommons.org/licenses/by/2.0/ [B18] Guidepost https://www.flickr.com/photos/mperich/5110059854/ von Matt Perich - CC-BY https://creativecommons.org/licenses/by/2.0/ [B19]Telephone operator https://www.flickr.com/photos/kibbe_museum/5576853477/ von Kibbe Museum -- CC-BY https://creativecommons.org/licenses/by/2.0/ [B20] Jars / Gläser https://www.flickr.com/photos/manoftaste-de/9303523676/ von Christian Schnettelker / www.manoftaste.de - CC-BY https://creativecommons.org/licenses/by/2.0/ [B21] Etech05: Audience https://www.flickr.com/photos/oreilly/6648470 von James Duncan Davidson - CC-BY https://creativecommons.org/licenses/by/2.0/ [B22] Jobs https://www.flickr.com/photos/jakerust/16844967041/ von www.gotcredit.com - CC-BY https://creativecommons.org/licenses/by/2.0/ ZFrapid Logo von Moritz Liebeknecht. Alle weiteren Screenshots und Grafiken wurden von Ralf Eggert erstellt. 61 / 61