SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
1 / 38
ZF2rapidZF2rapid
Zend Framework 2 Anwendungen im HandumdrehenZend Framework 2 Anwendungen im Handumdrehen

Repository: https://github.com/RalfEggert/ipc2015-zf2rapidRepository: https://github.com/RalfEggert/ipc2015-zf2rapid
2 / 38
www.ralfeggert.dewww.ralfeggert.de
Über michÜber mich
Fragen an das PublikumFragen an das Publikum
33 // 3838
[b01][b01]
[B02][B02]
44 // 3838
ZF2rapid in a nutshellZF2rapid in a nutshell
5 / 38
ZFrapidZFrapid
http://zfrapid.org/
https://github.com/ZFrapid
ZF2 MVC
(ZF3 MVC)
(ZF3 Middleware)
ProjekteProjekte ModuleModule Code GenerierungCode Generierung
Routing & MapsRouting & Maps KonfigurationKonfiguration CRUDCRUD
6 / 38
[B05][B05][B04][B04][B03][B03]
[B08][B08][B07][B07][B06][B06]
ZF2rapid FeaturesZF2rapid Features
7 / 38
// Mit Git clonen und mit Composer installieren
$ cd /home/devhost/
$ git clone https://github.com/ZFrapid/zf2rapid.git zf2rapid
$ cd zf2rapid
$ composer install
// Lokale Installation testen
$ ./bin/zf2rapid.php
// Dynamischen Link erstellen
$ sudo ln -s /home/devhost/zf2rapid/bin/zf2rapid.php /usr/local/bin/zf2rapid
// Details zur Installation (auch unter Windows) unter
// https://github.com/ZFrapid/zf2rapid/blob/master/docs/installation.md
ZF2rapid InstallationZF2rapid Installation
[b03][b03]
88 // 3838
ProjekteProjekte
9 / 38
$ zf2rapid create-project --help
===========================================================================
Usage:
create-project [--workingPath=]
Arguments:
--workingPath= The path to work in; defaults to current working path
Help:
Create a new ZF2 project within the specified path
===========================================================================
$ cd /home/devhost/
$ zf2rapid create-project --workingPath=myproject
$ cd myproject/
Projekt anlegenProjekt anlegen
10 / 38
$ zf2rapid tool-config
{
"configFileFormat": "php",
"flagAddDocBlocks": "true",
"fileDocBlockText": "ZF2 Application built by ZF2rapid",
"fileDocBlockCopyright": "(c) 2015 John Doe",
"fileDocBlockLicense": "http://opensource.org/licenses/MIT MITLicense",
"namespaceController": "Controller",
"namespaceControllerPlugin": "ControllerPlugin",
"namespaceViewHelper": "ViewHelper",
"namespaceFilter": "ModelFilter",
"namespaceValidator": "ModelValidator",
"namespaceInputFilter": "ModelInputFilter",
"namespaceForm": "Form",
"namespaceHydrator": "ModelHydrator",
"namespaceEntity": "ModelEntity",
"namespaceTableGateway": "ModelTableGateway",
"namespaceRepository": "ModelRepository"
}
Projekt konfigurierenProjekt konfigurieren
[b04][b04]
1111 // 3838
ModuleModule
12 / 38
$ zf2rapid create-module --help
===========================================================================
Usage:
create-module <module> [--workingPath=] [--configFile=]
[--without-project] [--no-activation]
Arguments:
<module> The name of the module to create; mandatory
--workingPath= The path to work in; defaults to current working path
--configFile= Specify the configuration file to activate or
deactivate a module in; defaults to not bet set
--without-project Ignore if working path does not contain a ZF2 project;
defaults to current working path
--no-activation Prevent the activation of the new module (disabled by
default)
Help:
Create a new module within the specified path
===========================================================================
Modul anlegenModul anlegen
13 / 38
// Modul anlegen
$ zf2rapid create-module Shop
// Modul löschen
$ zf2rapid delete-module Shop
// Modul aktivieren
$ zf2rapid activate-module Shop
// Modul deaktivieren
$ zf2rapid deactivate-module Shop
// Konfigurationsdatei mit angeben
$ zf2rapid create-module Shop --configFile=development.config.php
// Modul unabhängig vom Zend Framework 2 Projekt anlegen
$ zf2rapid create-module Shop --without-project --workingPath=/some/where
Mit Modulen arbeitenMit Modulen arbeiten
[b00][b00]
1414 // 3838
Code anschauenCode anschauen
[b05][b05]
1515 // 3838
Code generierungCode generierung
16 / 38
$ zf2rapid create-controller --help
===========================================================================
Usage:
create-controller <module> <controller> [--workingPath=]
[--without-project] [--no-factory]
Arguments:
<module> The name of the module to create the controller in;
mandatory
<controller> The name of the controller to create; mandatory
--workingPath= The path to work in; defaults to current working path
--without-project Ignore if working path does not contain a ZF2 project;
defaults to current working path
--no-factory Prevent the creation of a factory for the new
controller
Help:
Create a new controller for module within the specified path
===========================================================================
Controller anlegenController anlegen
17 / 38
$ zf2rapid create-action --help
===========================================================================
Usage:
create-action <module> <controller> <action>
[--workingPath=] [--without-project]
Arguments:
<module> The name of the module to create the controller action
in; mandatory
<controller> The name of the controller to create an action for;
mandatory
<action> The name of the new action to create; mandatory
--workingPath= The path to work in; defaults to current working path
--without-project Ignore if working path does not contain a ZF2 project;
defaults to current working path
Help:
Create a new controller action for module within the specified path
===========================================================================
Action anlegenAction anlegen
18 / 38
$ zf2rapid create-view-helper --help
===========================================================================
Usage:
create-view-helper <module> <viewHelper> [--workingPath=]
[--without-project] [--no-factory]
Arguments:
<module> The name of the module to create the view helper in;
mandatory
<viewHelper> The name of the view helper to create; mandatory
--workingPath= The path to work in; defaults to current working path
--without-project Ignore if working path does not contain a ZF2 project;
defaults to current working path
--no-factory Prevent the creation of a factory for the new view
helper
Help:
Create a new view helper for module within the specified path
===========================================================================
View Helper anlegenView Helper anlegen
19 / 38
// Validator anlegen
$ zf2rapid create-validator Shop Basket
// Hydrator anlegen, der ClassMethods Hydrator erweitert
$ zf2rapid create-hydrator Shop Basket --baseHydrator=ClassMethods
// Formular anlegen
$ zf2rapid create-form Shop Basket
// Alle Module anzeigen
$ zf2rapid show-modules
// Alle Controller anzeigen
$ zf2rapid show-controllers
// Alle Aktionen anzeigen
$ zf2rapid show-actions
Weitere MöglichkeitenWeitere Möglichkeiten
[b00][b00]
2020 // 3838
Code anschauenCode anschauen
[b06][b06]
2121 // 3838
Routing & MapsRouting & Maps
22 / 38
// Routing anlegen
$ zf2rapid create-routing Shop
// Striktes Routing anlegen
$ zf2rapid create-routing Shop --strict
// Class Map generieren
$ zf2rapid generate-classmap Shop
// Template Map generieren
$ zf2rapid generate-templatemap Shop
Routing und Maps anlegenRouting und Maps anlegen
[b00][b00]
2323 // 3838
Code anschauenCode anschauen
[b00][b00]
2424 // 3838
Im Browser anschauenIm Browser anschauen
[b08][b08]
2525 // 3838
CRUDCRUD
26 / 38
DatenbankmodellDatenbankmodell
27 / 38
// Datei /config/autoload/development.php
return array(
'db' => array(
'driver' => 'pdo',
'dsn' => 'mysql:dbname=ipc2015.zf2rapid;host=localhost;
charset=utf8',
'user' => 'ipc2015',
'pass' => 'ipc2015',
),
);
// Datenbankverbindung prüfen
$ zf2rapid crud-check-db
// Datenbanktabellen anzeigen
$ zf2rapid crud-show-tables
CRUD Datenbank konfigurierenCRUD Datenbank konfigurieren
28 / 38
$ zf2rapid create-module BlogDomain --configFile=development.config.php
$ zf2rapid crud-create-model BlogDomain article,category,author
$ zf2rapid crud-create-model --help
===========================================================================
Usage:
crud-create-model <module> <tables> [--workingPath=]
Arguments:
<module> The name of the module to create the model classes in;
mandatory
<tables> The names of the database tables to create the model
classes for; mandatory
--workingPath= The path to work in; defaults to current working path
Help:
Create all model classes (entity, hydrator, table gateway, repository) for
a database table
===========================================================================
CRUD Model anlegenCRUD Model anlegen
[b00][b00]
2929 // 3838
Code anschauenCode anschauen
30 / 38
$ zf2rapid create-module AuthorAdmin --configFile=development.config.php
$ zf2rapid create-module CategoryAdmin --configFile=development.config.php
$ zf2rapid create-module ArticleAdmin --configFile=development.config.php
$ zf2rapid crud-create-application AuthorAdmin BlogDomain/AuthorEntity
$ zf2rapid crud-create-application CategoryAdmin BlogDomain/CategoryEntity
$ zf2rapid crud-create-application ArticleAdmin BlogDomain/ArticleEntity
$ zf2rapid crud-create-application --help
===========================================================================
Usage:
crud-create-application <module> <entity> [--workingPath=]
Arguments:
<module> The name of the module to create the application in;
<entity> The entity to create the application for with the format
ModuleName/EntityClassName; mandatory
--workingPath= The path to work in; defaults to current working path
Help:
Create application (controller, view) for a model entity
===========================================================================
CRUD Application anlegenCRUD Application anlegen
[b00][b00]
3131 // 3838
Code anschauenCode anschauen
[b00][b00]
3232 // 3838
Im Browser anschauenIm Browser anschauen
[b09][b09]
3333 // 3838
FinetuningFinetuning
[b10][b10]
3434 // 3838
Wichtige Warnung!Wichtige Warnung!
[b11][b11]
3535 // 3838
Testen, Bugs & FeaturesTesten, Bugs & Features
Fragen vom Publikum?Fragen vom Publikum?
3636 // 3838
[b12][b12]
3737 // 3838
DankeDanke
Für Ihre / Eure AufmerksamkeitFür Ihre / Eure Aufmerksamkeit

Repository: https://github.com/RalfEggert/ipc2015-zf2rapidRepository: https://github.com/RalfEggert/ipc2015-zf2rapid
Slides: http://de.slideshare.net/eggertralf/ipc2015-zf2rapidSlides: http://de.slideshare.net/eggertralf/ipc2015-zf2rapid
BildnachweisBildnachweis
[B00] Fotos von Ralf Eggert
[B01] Frontiers 2011 - Day 2 https://www.flickr.com/photos/frontiersofinteraction/5866676276/ von Frontiersofinteraction - CC-BY https://creativecommons.org/licenses/by/2.0/
[B02] My nuts https://www.flickr.com/photos/lucasincas/6517703315/ von Lucas Incas - CC-BY https://creativecommons.org/licenses/by/2.0/
[B03] Harbourside Building Site 4 https://www.flickr.com/photos/matt_gibson/420273270/ von Matt Gibson - CC-BY https://creativecommons.org/licenses/by/2.0/
[B04] rainbow cubes with holes https://www.flickr.com/photos/generated/6313491064/ von Jared Tarbell - CC-BY https://creativecommons.org/licenses/by/2.0/
[B05] Monaco-14pt https://www.flickr.com/photos/polarity/3138680190/ von Robert Agthe - CC-BY https://creativecommons.org/licenses/by/2.0/
[B06] Scenic Route 207 Texas Plain Trail https://www.flickr.com/photos/mtsrs/2547608404/ von mtsrs - CC-BY https://creativecommons.org/licenses/by/2.0/
[B07] Molecular Bonds https://www.flickr.com/photos/pasukaru76/6978143982/ von Pascal - CC-BY https://creativecommons.org/licenses/by/2.0/
[B08] Fixing the database https://www.flickr.com/photos/dahlstroms/4140461901 von Håkan Dahlström - CC-BY https://creativecommons.org/licenses/by/2.0/
[B09] Swiss Army Knife https://www.flickr.com/photos/askdavetaylor/4261149346/ von Dave Taylor - CC-BY https://creativecommons.org/licenses/by/2.0/
[B10] Warning https://www.flickr.com/photos/thomasletholsen/9369862678/ von Thomas Leth-Olsen- CC-BY-SA https://creativecommons.org/licenses/by-sa/2.0/
[B11] Help wanted sign https://www.flickr.com/photos/andjohan/5644714850/ von Andreas Klinke Johannsen - CC-BY-SA https://creativecommons.org/licenses/by-sa/2.0/
[B12] Etech05: Audience https://www.flickr.com/photos/oreilly/6648470 von James Duncan Davidson - CC-BY https://creativecommons.org/licenses/by/2.0/
[B13] 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 wurden von Ralf Eggert erstellt.
38 / 38

Contenu connexe

Tendances

Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1
Shinya Ohyanagi
 

Tendances (20)

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)
 
Zend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next GenerationZend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next Generation
 
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014
 
Continuous testing In PHP
Continuous testing In PHPContinuous testing In PHP
Continuous testing In PHP
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証
 
Publishing a Perl6 Module
Publishing a Perl6 ModulePublishing a Perl6 Module
Publishing a Perl6 Module
 
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
 
Learning Dtrace
Learning DtraceLearning Dtrace
Learning Dtrace
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and co
 
Better detection of what modules are used by some Perl 5 code
Better detection of what modules are used by some Perl 5 codeBetter detection of what modules are used by some Perl 5 code
Better detection of what modules are used by some Perl 5 code
 
PHP Performance SfLive 2010
PHP Performance SfLive 2010PHP Performance SfLive 2010
PHP Performance SfLive 2010
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLite
 
Catch a spider monkey
Catch a spider monkeyCatch a spider monkey
Catch a spider monkey
 
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
 
soscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profitsoscon2018 - Tracing for fun and profit
soscon2018 - Tracing for fun and profit
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
OSDC 2014: Ole Michaelis & Sönke Rümpler: Make it SOLID - Software Architectu...
 

Similaire à IPC 2015 ZF2rapid

Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
Nuvole
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
Roland Bouman
 

Similaire à IPC 2015 ZF2rapid (20)

Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015
 
Zend
ZendZend
Zend
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free Migration
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2
 
Automating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyondAutomating Drupal Development: Makefiles, features and beyond
Automating Drupal Development: Makefiles, features and beyond
 
Gdb basics for my sql db as (openfest 2017) final
Gdb basics for my sql db as (openfest 2017) finalGdb basics for my sql db as (openfest 2017) final
Gdb basics for my sql db as (openfest 2017) final
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
 
Michal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle BuildsMichal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle Builds
 
Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and BeyondDrupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
Drupal Day 2012 - Automating Drupal Development: Make!les, Features and Beyond
 
Introduction to Zend framework
Introduction to Zend framework Introduction to Zend framework
Introduction to Zend framework
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework Foundations
 
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, OracleXPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
 
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
 

Plus de Ralf Eggert

Plus 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
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
"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 ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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...
 

IPC 2015 ZF2rapid

  • 1. 1 / 38 ZF2rapidZF2rapid Zend Framework 2 Anwendungen im HandumdrehenZend Framework 2 Anwendungen im Handumdrehen  Repository: https://github.com/RalfEggert/ipc2015-zf2rapidRepository: https://github.com/RalfEggert/ipc2015-zf2rapid
  • 3. Fragen an das PublikumFragen an das Publikum 33 // 3838 [b01][b01]
  • 4. [B02][B02] 44 // 3838 ZF2rapid in a nutshellZF2rapid in a nutshell
  • 6. ProjekteProjekte ModuleModule Code GenerierungCode Generierung Routing & MapsRouting & Maps KonfigurationKonfiguration CRUDCRUD 6 / 38 [B05][B05][B04][B04][B03][B03] [B08][B08][B07][B07][B06][B06] ZF2rapid FeaturesZF2rapid Features
  • 7. 7 / 38 // Mit Git clonen und mit Composer installieren $ cd /home/devhost/ $ git clone https://github.com/ZFrapid/zf2rapid.git zf2rapid $ cd zf2rapid $ composer install // Lokale Installation testen $ ./bin/zf2rapid.php // Dynamischen Link erstellen $ sudo ln -s /home/devhost/zf2rapid/bin/zf2rapid.php /usr/local/bin/zf2rapid // Details zur Installation (auch unter Windows) unter // https://github.com/ZFrapid/zf2rapid/blob/master/docs/installation.md ZF2rapid InstallationZF2rapid Installation
  • 9. 9 / 38 $ zf2rapid create-project --help =========================================================================== Usage: create-project [--workingPath=] Arguments: --workingPath= The path to work in; defaults to current working path Help: Create a new ZF2 project within the specified path =========================================================================== $ cd /home/devhost/ $ zf2rapid create-project --workingPath=myproject $ cd myproject/ Projekt anlegenProjekt anlegen
  • 10. 10 / 38 $ zf2rapid tool-config { "configFileFormat": "php", "flagAddDocBlocks": "true", "fileDocBlockText": "ZF2 Application built by ZF2rapid", "fileDocBlockCopyright": "(c) 2015 John Doe", "fileDocBlockLicense": "http://opensource.org/licenses/MIT MITLicense", "namespaceController": "Controller", "namespaceControllerPlugin": "ControllerPlugin", "namespaceViewHelper": "ViewHelper", "namespaceFilter": "ModelFilter", "namespaceValidator": "ModelValidator", "namespaceInputFilter": "ModelInputFilter", "namespaceForm": "Form", "namespaceHydrator": "ModelHydrator", "namespaceEntity": "ModelEntity", "namespaceTableGateway": "ModelTableGateway", "namespaceRepository": "ModelRepository" } Projekt konfigurierenProjekt konfigurieren
  • 12. 12 / 38 $ zf2rapid create-module --help =========================================================================== Usage: create-module <module> [--workingPath=] [--configFile=] [--without-project] [--no-activation] Arguments: <module> The name of the module to create; mandatory --workingPath= The path to work in; defaults to current working path --configFile= Specify the configuration file to activate or deactivate a module in; defaults to not bet set --without-project Ignore if working path does not contain a ZF2 project; defaults to current working path --no-activation Prevent the activation of the new module (disabled by default) Help: Create a new module within the specified path =========================================================================== Modul anlegenModul anlegen
  • 13. 13 / 38 // Modul anlegen $ zf2rapid create-module Shop // Modul löschen $ zf2rapid delete-module Shop // Modul aktivieren $ zf2rapid activate-module Shop // Modul deaktivieren $ zf2rapid deactivate-module Shop // Konfigurationsdatei mit angeben $ zf2rapid create-module Shop --configFile=development.config.php // Modul unabhängig vom Zend Framework 2 Projekt anlegen $ zf2rapid create-module Shop --without-project --workingPath=/some/where Mit Modulen arbeitenMit Modulen arbeiten
  • 14. [b00][b00] 1414 // 3838 Code anschauenCode anschauen
  • 15. [b05][b05] 1515 // 3838 Code generierungCode generierung
  • 16. 16 / 38 $ zf2rapid create-controller --help =========================================================================== Usage: create-controller <module> <controller> [--workingPath=] [--without-project] [--no-factory] Arguments: <module> The name of the module to create the controller in; mandatory <controller> The name of the controller to create; mandatory --workingPath= The path to work in; defaults to current working path --without-project Ignore if working path does not contain a ZF2 project; defaults to current working path --no-factory Prevent the creation of a factory for the new controller Help: Create a new controller for module within the specified path =========================================================================== Controller anlegenController anlegen
  • 17. 17 / 38 $ zf2rapid create-action --help =========================================================================== Usage: create-action <module> <controller> <action> [--workingPath=] [--without-project] Arguments: <module> The name of the module to create the controller action in; mandatory <controller> The name of the controller to create an action for; mandatory <action> The name of the new action to create; mandatory --workingPath= The path to work in; defaults to current working path --without-project Ignore if working path does not contain a ZF2 project; defaults to current working path Help: Create a new controller action for module within the specified path =========================================================================== Action anlegenAction anlegen
  • 18. 18 / 38 $ zf2rapid create-view-helper --help =========================================================================== Usage: create-view-helper <module> <viewHelper> [--workingPath=] [--without-project] [--no-factory] Arguments: <module> The name of the module to create the view helper in; mandatory <viewHelper> The name of the view helper to create; mandatory --workingPath= The path to work in; defaults to current working path --without-project Ignore if working path does not contain a ZF2 project; defaults to current working path --no-factory Prevent the creation of a factory for the new view helper Help: Create a new view helper for module within the specified path =========================================================================== View Helper anlegenView Helper anlegen
  • 19. 19 / 38 // Validator anlegen $ zf2rapid create-validator Shop Basket // Hydrator anlegen, der ClassMethods Hydrator erweitert $ zf2rapid create-hydrator Shop Basket --baseHydrator=ClassMethods // Formular anlegen $ zf2rapid create-form Shop Basket // Alle Module anzeigen $ zf2rapid show-modules // Alle Controller anzeigen $ zf2rapid show-controllers // Alle Aktionen anzeigen $ zf2rapid show-actions Weitere MöglichkeitenWeitere Möglichkeiten
  • 20. [b00][b00] 2020 // 3838 Code anschauenCode anschauen
  • 21. [b06][b06] 2121 // 3838 Routing & MapsRouting & Maps
  • 22. 22 / 38 // Routing anlegen $ zf2rapid create-routing Shop // Striktes Routing anlegen $ zf2rapid create-routing Shop --strict // Class Map generieren $ zf2rapid generate-classmap Shop // Template Map generieren $ zf2rapid generate-templatemap Shop Routing und Maps anlegenRouting und Maps anlegen
  • 23. [b00][b00] 2323 // 3838 Code anschauenCode anschauen
  • 24. [b00][b00] 2424 // 3838 Im Browser anschauenIm Browser anschauen
  • 27. 27 / 38 // Datei /config/autoload/development.php return array( 'db' => array( 'driver' => 'pdo', 'dsn' => 'mysql:dbname=ipc2015.zf2rapid;host=localhost; charset=utf8', 'user' => 'ipc2015', 'pass' => 'ipc2015', ), ); // Datenbankverbindung prüfen $ zf2rapid crud-check-db // Datenbanktabellen anzeigen $ zf2rapid crud-show-tables CRUD Datenbank konfigurierenCRUD Datenbank konfigurieren
  • 28. 28 / 38 $ zf2rapid create-module BlogDomain --configFile=development.config.php $ zf2rapid crud-create-model BlogDomain article,category,author $ zf2rapid crud-create-model --help =========================================================================== Usage: crud-create-model <module> <tables> [--workingPath=] Arguments: <module> The name of the module to create the model classes in; mandatory <tables> The names of the database tables to create the model classes for; mandatory --workingPath= The path to work in; defaults to current working path Help: Create all model classes (entity, hydrator, table gateway, repository) for a database table =========================================================================== CRUD Model anlegenCRUD Model anlegen
  • 29. [b00][b00] 2929 // 3838 Code anschauenCode anschauen
  • 30. 30 / 38 $ zf2rapid create-module AuthorAdmin --configFile=development.config.php $ zf2rapid create-module CategoryAdmin --configFile=development.config.php $ zf2rapid create-module ArticleAdmin --configFile=development.config.php $ zf2rapid crud-create-application AuthorAdmin BlogDomain/AuthorEntity $ zf2rapid crud-create-application CategoryAdmin BlogDomain/CategoryEntity $ zf2rapid crud-create-application ArticleAdmin BlogDomain/ArticleEntity $ zf2rapid crud-create-application --help =========================================================================== Usage: crud-create-application <module> <entity> [--workingPath=] Arguments: <module> The name of the module to create the application in; <entity> The entity to create the application for with the format ModuleName/EntityClassName; mandatory --workingPath= The path to work in; defaults to current working path Help: Create application (controller, view) for a model entity =========================================================================== CRUD Application anlegenCRUD Application anlegen
  • 31. [b00][b00] 3131 // 3838 Code anschauenCode anschauen
  • 32. [b00][b00] 3232 // 3838 Im Browser anschauenIm Browser anschauen
  • 34. [b10][b10] 3434 // 3838 Wichtige Warnung!Wichtige Warnung!
  • 35. [b11][b11] 3535 // 3838 Testen, Bugs & FeaturesTesten, Bugs & Features
  • 36. Fragen vom Publikum?Fragen vom Publikum? 3636 // 3838 [b12][b12]
  • 37. 3737 // 3838 DankeDanke Für Ihre / Eure AufmerksamkeitFür Ihre / Eure Aufmerksamkeit  Repository: https://github.com/RalfEggert/ipc2015-zf2rapidRepository: https://github.com/RalfEggert/ipc2015-zf2rapid Slides: http://de.slideshare.net/eggertralf/ipc2015-zf2rapidSlides: http://de.slideshare.net/eggertralf/ipc2015-zf2rapid
  • 38. BildnachweisBildnachweis [B00] Fotos von Ralf Eggert [B01] Frontiers 2011 - Day 2 https://www.flickr.com/photos/frontiersofinteraction/5866676276/ von Frontiersofinteraction - CC-BY https://creativecommons.org/licenses/by/2.0/ [B02] My nuts https://www.flickr.com/photos/lucasincas/6517703315/ von Lucas Incas - CC-BY https://creativecommons.org/licenses/by/2.0/ [B03] Harbourside Building Site 4 https://www.flickr.com/photos/matt_gibson/420273270/ von Matt Gibson - CC-BY https://creativecommons.org/licenses/by/2.0/ [B04] rainbow cubes with holes https://www.flickr.com/photos/generated/6313491064/ von Jared Tarbell - CC-BY https://creativecommons.org/licenses/by/2.0/ [B05] Monaco-14pt https://www.flickr.com/photos/polarity/3138680190/ von Robert Agthe - CC-BY https://creativecommons.org/licenses/by/2.0/ [B06] Scenic Route 207 Texas Plain Trail https://www.flickr.com/photos/mtsrs/2547608404/ von mtsrs - CC-BY https://creativecommons.org/licenses/by/2.0/ [B07] Molecular Bonds https://www.flickr.com/photos/pasukaru76/6978143982/ von Pascal - CC-BY https://creativecommons.org/licenses/by/2.0/ [B08] Fixing the database https://www.flickr.com/photos/dahlstroms/4140461901 von Håkan Dahlström - CC-BY https://creativecommons.org/licenses/by/2.0/ [B09] Swiss Army Knife https://www.flickr.com/photos/askdavetaylor/4261149346/ von Dave Taylor - CC-BY https://creativecommons.org/licenses/by/2.0/ [B10] Warning https://www.flickr.com/photos/thomasletholsen/9369862678/ von Thomas Leth-Olsen- CC-BY-SA https://creativecommons.org/licenses/by-sa/2.0/ [B11] Help wanted sign https://www.flickr.com/photos/andjohan/5644714850/ von Andreas Klinke Johannsen - CC-BY-SA https://creativecommons.org/licenses/by-sa/2.0/ [B12] Etech05: Audience https://www.flickr.com/photos/oreilly/6648470 von James Duncan Davidson - CC-BY https://creativecommons.org/licenses/by/2.0/ [B13] 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 wurden von Ralf Eggert erstellt. 38 / 38