SlideShare a Scribd company logo
1 of 45
Download to read offline
Zend Framework 2
quick start
by Enrico Zimuel (enrico@zend.com)

Senior Software Engineer
Zend Framework Core Team
Zend Technologies Ltd




ZFConf – 21th April 2012 Moscow
                                     © All rights reserved. Zend Technologies, Inc.
About me

                     • Enrico Zimuel (@ezimuel)
                     • Software Engineer since 1996
                            – Assembly x86, C/C++, Java, Perl, PHP
                     • Enjoying PHP since 1999
                     • PHP Engineer at Zend since 2008
                     • Zend Framework Core Team from
                                  2011
                     • B.Sc. Computer Science and
                                  Economics from University of
                                  Pescara (Italy)




           © All rights reserved. Zend Technologies, Inc.
Summary

●   Overview of ZF2
●   The new autoloading system
●   Dependency Injection
●   Event manager
●   The new MVC
●   Quick start: ZendSkeletonApplication
●   Package system
●   From ZF1 to ZF2

                    © All rights reserved. Zend Technologies, Inc.
ZF2 key features

●   New architecture (MVC, Di, Events)
●   Requirement: PHP 5.3
●   No more CLA (Contributor License Agreement)
●   Git (GitHub) instead of SVN
●   Better performance
●   Module management
●   Packaging system



                    © All rights reserved. Zend Technologies, Inc.
A new core

●   The ZF1 way:
       ▶   Singleton, Registry, and
             Hard-Coded Dependencies
●   The ZF2 approach:
       ▶   Aspect Oriented Design
             and Dependency Injection




                     © All rights reserved. Zend Technologies, Inc.
New architectural approach

●   Methodologies used in the development
      – Decoupling (ZendDi)
      – Event driven (ZendEventManager)
      – Standard interfaces (ZendStdlib)
●   Take advantage of PHP 5.3
       ▶   Namespace
       ▶   Lambda Functions and Closures
       ▶   Better performance


                     © All rights reserved. Zend Technologies, Inc.
Autoloading




  © All rights reserved. Zend Technologies, Inc.
Autoloading

●   No more require_once calls!
●   Multiple approaches:
      – ZF1-style include_path autoloader
      – Per-namespace/prefix autoloading
      – Class-map autoloading




                   © All rights reserved. Zend Technologies, Inc.
Classmap generator

●   How to generate the .classmap.php?
     We provided a command line tool:
     bin/classmap_generator.php
●   Usage is trivial:

    $ cd your/library
    $ php /path/to/classmap_generator.php -w

●   Class-Map will be created in .classmap.php




                        © All rights reserved. Zend Technologies, Inc.
Performance improvement

●   Class-Maps show a 25% improvement on the
      ZF1 autoloader when no acceleration is
      present
       ▶   60-85% improvements when an opcode cache
           is in place!

●   Pairing namespaces/prefixes with specific
     paths shows >10% gains with no
     acceleration
       ▶   40% improvements when an opcode cache is in
           place!

Note: The new autoloading system of ZF2 has been ported to ZF 1.12


                        © All rights reserved. Zend Technologies, Inc.
Dependency
 Injection



  © All rights reserved. Zend Technologies, Inc.
Dependency injection

●   How to manage dependencies between
    objects?
●   Dependency injection (Di) is
    a design pattern whose
    purpose is to reduce the
    coupling between software
    components




                                                        It's time for your dependency injection!

                 © All rights reserved. Zend Technologies, Inc.
Di by construct

        Without Di                                                 With Di (construct)

class Foo {                                                    class Foo {
  protected $bar;                                                 protected $bar;
  …                                                               …
  public function __construct() {                                 public function
    $this->bar= new Bar();                                          __construct(Bar $bar) {
  }                                                                  $this->bar = $bar;
  …                                                               }
}                                                                 …
                                                               }


 Cons:                                                              Pros:
 Difficult to test                                                  Easy to test
 No isolation                                                       Decoupling
 Difficult to reuse code                                            Flexible architecture
                           © All rights reserved. Zend Technologies, Inc.
Di by setter


class Foo
{
   protected $bar;
   …
   public function setBar(Bar $bar)
   {
      $this->bar = $bar;
   }
   …
}




                 © All rights reserved. Zend Technologies, Inc.
ZendDi

 ●   Supports the 3 different injection patterns:
       – Constructor
       – Interface
       – Setter
 ●   Implements a Di Container:
       – Manage the dependencies using configuration
           and annotation
       – Provide a compiler to autodiscover classes in a
            path and create the class definitions, for
            dependencies


                       © All rights reserved. Zend Technologies, Inc.
Sample definition

 $definition = array(
     'Foo' => array(
         'setBar' => array(
             'bar' => array(
                 'type'      => 'Bar',
                 'required' => true,
             ),
         ),
     ),
 );




                     © All rights reserved. Zend Technologies, Inc.
Using the Di container

 use ZendDiDi,
     ZendDiConfiguration;

 $di     = new Di;
 $config = new Configuration(array(
     'definition' => array('class' => $definition)
 ));
 $config->configure($di);

 $foo = $di->get('Foo'); // contains Bar!




                    © All rights reserved. Zend Technologies, Inc.
Di by annotation

namespace Example {
   use ZendDiDefinitionAnnotation as Di;

    class Foo {
       public $bam;
       /**
         * @DiInject()
         */
       public function setBar(Bar $bar){
            $this->bar = $bar;
       }
    }

    class Bar {
    }
}


                     © All rights reserved. Zend Technologies, Inc.
Di by annotation (2)


$compiler = new ZendDiDefinitionCompilerDefinition();
$compiler->addDirectory('File path of Foo and Bar');
$compiler->compile();

$definitions = new ZendDiDefinitionList($compiler);
$di = new ZendDiDi($definitions);

$baz = $di->get('ExampleFoo'); // contains Bar!




More use cases of ZendDi:
https://github.com/ralphschindler/zf2-di-use-cases


                     © All rights reserved. Zend Technologies, Inc.
Event Manager




   © All rights reserved. Zend Technologies, Inc.
Event Manager

●   An Event Manager is an object that
    aggregates listeners for one or more
    named events, and which triggers events.
●   A Listener is a callback that can react to
    an event.
●   An Event is an action.




                    © All rights reserved. Zend Technologies, Inc.
Example

use ZendEventManagerEventManager;

$events = new EventManager();
$events->attach('do', function($e) {
    $event = $e->getName();
    $params = $e->getParams();
    printf(
        'Handled event “%s”, with parameters %s',
        $event,
        json_encode($params)
    );
});
$params = array('foo' => 'bar', 'baz' => 'bat');
$events->trigger('do', null, $params);




                     © All rights reserved. Zend Technologies, Inc.
MVC



© All rights reserved. Zend Technologies, Inc.
Event driven architecture


●   Flow: bootstrap, route, dispatch, response
●   Everything is an event in MVC of ZF2




                    © All rights reserved. Zend Technologies, Inc.
Modules

●   The basic unit in a ZF2 MVC application is a Module
●   A module is a collection of code and other files that
    solves a more specific atomic problem of the larger
    business problem
●   Modules are simply:
       ▶   A namespace
       ▶   Containing a single classfile, Module.php




                       © All rights reserved. Zend Technologies, Inc.
Quick start
ZendSkeletonApplication




       © All rights reserved. Zend Technologies, Inc.
ZendSkeletonApplication

●   A simple, skeleton application using the ZF2
    MVC layer and module systems
●   On GitHub:
     ▶   git clone --recursive
         git://github.com/zendframework/ZendSkeletonApplication.git
●   This project makes use of Git submodules
●   Works using ZF2.0.0beta3




                         © All rights reserved. Zend Technologies, Inc.
Folder tree
   config                           autoload
                          application.config.php
   data

   module                          Application
                                               config
   vendor
                                               src
   public                                                 Application

       css                                                       Controller
                                                                 IndexController.php
       images
                                               view
       js
                                   Module.php
   .htaccess                       autoload_classmap.php
   index.php                       autoload_function.php
                                   autoload_register.php

                © All rights reserved. Zend Technologies, Inc.
Output




         © All rights reserved. Zend Technologies, Inc.
index.php

chdir(dirname(__DIR__));
require_once (getenv('ZF2_PATH') ?:
'vendor/ZendFramework/library') .
'/Zend/Loader/AutoloaderFactory.php';
ZendLoaderAutoloaderFactory::factory();

$appConfig = include 'config/application.config.php';

$listenerOptions = new ZendModuleListenerListenerOptions(
    $appConfig['module_listener_options']);
$defaultListeners = new
ZendModuleListenerDefaultListenerAggregate($listenerOptions);
$defaultListeners->getConfigListener()
                   ->addConfigGlobPath("config/autoload/{,*.}
{global,local}.config.php");
...




                      © All rights reserved. Zend Technologies, Inc.
index.php (2)

...
$moduleManager = new ZendModuleManager($appConfig['modules']);
$moduleManager->events()->attachAggregate($defaultListeners);
$moduleManager->loadModules();

// Create application, bootstrap, and run
$bootstrap   = new ZendMvcBootstrap(
   $defaultListeners->getConfigListener()->getMergedConfig());
$application = new ZendMvcApplication;
$bootstrap->bootstrap($application);
$application->run()->send();




                       © All rights reserved. Zend Technologies, Inc.
config/application.config.php

return array(
    'modules' => array(
        'Application'
    ),
    'module_listener_options' => array(
        'config_cache_enabled' => false,
        'cache_dir'            => 'data/cache',
        'module_paths' => array(
            './module',
            './vendor',
        ),
    ),
);




                    © All rights reserved. Zend Technologies, Inc.
config/autoload

●   global.config.php
●   local.config.php.dist (.gitignore)
●   By default, this application is configured to load all
    configs in:
     ./config/autoload/{,*.}{global,local}.config.php.
●   Doing this provides a location for a developer to drop in
    configuration override files provided by modules, as
    well as cleanly provide individual, application-wide
    config files for things like database connections, etc.




                        © All rights reserved. Zend Technologies, Inc.
Application/config/module.config.php


  return array(
      'di' => array(
          'instance' => array(
             …
          )
       )
  );

                 Here you configure the components
                 of your application (i.e. routing,
                 controller, view)




                 © All rights reserved. Zend Technologies, Inc.
IndexController.php


namespace ApplicationController;

use ZendMvcControllerActionController,
    ZendViewModelViewModel;

class IndexController extends ActionController
{
    public function indexAction()
    {
        return new ViewModel();
    }
}




                     © All rights reserved. Zend Technologies, Inc.
Modules are “plug and play”


●   Easy to reuse a module, only 3 steps:
1) Copy the module in module (or vendor) folder
2) Enable the module in your application.config.php
       ▶   Add the name of the module in “modules”
3) Copy the config file of the module in
  /config/autoload/module.<module's name>.config.php




                       © All rights reserved. Zend Technologies, Inc.
modules.zendframework.com




           © All rights reserved. Zend Technologies, Inc.
Package system




    © All rights reserved. Zend Technologies, Inc.
Package system
●   We use Pyrus, a tool to manage PEAR
    packages. Pyrus simplifies and improves the
    PEAR experience.
●   Source packages (download + github):
    ▶       http://packages.zendframework.com/
●   Install and configure pyrus:
    ▶       wget http://packages.zendframework.com/pyrus.phar
    ▶       pyrus.phar .
    ▶       pyrus.phar . channel-discover packages.zendframework.com

●   Install a Zend_<component>:
        ▶   pyrus.phar . install zf2/Zend_<component>




                             © All rights reserved. Zend Technologies, Inc.
From ZF1 to ZF2




     © All rights reserved. Zend Technologies, Inc.
Migrate to ZF2

●   Goal: migrate without rewriting much code!
●   Main steps
      – Namespace: Zend_Foo => ZendFoo
      – Exceptions: an Interface for each
          components, no more Zend_Exception
      – Autoloading: 3 possible options (one is
         ZF1)
       ▶   MVC: module, event based, dispatchable



                      © All rights reserved. Zend Technologies, Inc.
ZF1 migration prototype

●   Source code: http://bit.ly/pvc0X1
●   Creates a "Zf1Compat" version of the ZF1
    dispatcher as an event listener.
●   The bootstrap largely mimics how ZF1's
    Zend_Application bootstrap works.
●   The default route utilizes the new ZF2 MVC
    routing, but mimics what ZF1 provided.




                    © All rights reserved. Zend Technologies, Inc.
Helping out

●   http://framework.zend.com/zf2
●   http://github.com/zendframework
●   https://github.com/zendframework/ZendSkeletonApplication
●   Getting Started with Zend Framework 2 by Rob
    Allen, http://www.akrabat.com
●   Weekly IRC meetings (#zf2-meeting on Freenode)
●   #zftalk.2 on Freenode IRC




                       © All rights reserved. Zend Technologies, Inc.
Questions?




             © All rights reserved. Zend Technologies, Inc.
Thank you!

●   Comments and feedbacks:
     – Email: enrico@zend.com
     – Twitter: @ezimuel




                 © All rights reserved. Zend Technologies, Inc.

More Related Content

What's hot

Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic ComponentsMateusz Tymek
 
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Enrico Zimuel
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryBo-Yi Wu
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)James Titcumb
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objectsjulien pauli
 
Apigility reloaded
Apigility reloadedApigility reloaded
Apigility reloadedRalf Eggert
 
Cryptography with Zend Framework
Cryptography with Zend FrameworkCryptography with Zend Framework
Cryptography with Zend FrameworkEnrico Zimuel
 
Get Started with Zend Framework 2
Get Started with Zend Framework 2Get Started with Zend Framework 2
Get Started with Zend Framework 2Mindfire Solutions
 
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)Enrico Zimuel
 
ZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itSteve Maraspin
 
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)James Titcumb
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPGuilherme Blanco
 

What's hot (20)

Zend Framework 2 - Basic Components
Zend Framework 2  - Basic ComponentsZend Framework 2  - Basic Components
Zend Framework 2 - Basic Components
 
Zend Framework 2
Zend Framework 2Zend Framework 2
Zend Framework 2
 
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
 
ZF2 Presentation @PHP Tour 2011 in Lille
ZF2 Presentation @PHP Tour 2011 in LilleZF2 Presentation @PHP Tour 2011 in Lille
ZF2 Presentation @PHP Tour 2011 in Lille
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
 
Zend Framework 2 Patterns
Zend Framework 2 PatternsZend Framework 2 Patterns
Zend Framework 2 Patterns
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objects
 
Building Custom PHP Extensions
Building Custom PHP ExtensionsBuilding Custom PHP Extensions
Building Custom PHP Extensions
 
Continuous Quality Assurance
Continuous Quality AssuranceContinuous Quality Assurance
Continuous Quality Assurance
 
Apigility reloaded
Apigility reloadedApigility reloaded
Apigility reloaded
 
Cryptography with Zend Framework
Cryptography with Zend FrameworkCryptography with Zend Framework
Cryptography with Zend Framework
 
Get Started with Zend Framework 2
Get Started with Zend Framework 2Get Started with Zend Framework 2
Get Started with Zend Framework 2
 
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
 
ZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of it
 
Introduction to Zend Framework
Introduction to Zend FrameworkIntroduction to Zend Framework
Introduction to Zend Framework
 
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
 
What's new with PHP7
What's new with PHP7What's new with PHP7
What's new with PHP7
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
 

Viewers also liked

Dependency management in PHP & ZendFramework 2
Dependency management in PHP & ZendFramework 2Dependency management in PHP & ZendFramework 2
Dependency management in PHP & ZendFramework 2Kirill Chebunin
 
Zend四十八手シリーズ Zend_Cache Zend_Paginator
Zend四十八手シリーズ Zend_Cache Zend_PaginatorZend四十八手シリーズ Zend_Cache Zend_Paginator
Zend四十八手シリーズ Zend_Cache Zend_PaginatorYusuke Ando
 
Zend framework 3 と zend expressive の話
Zend framework 3 と zend expressive の話Zend framework 3 と zend expressive の話
Zend framework 3 と zend expressive の話Satoru Yoshida
 
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみた
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみたOPcacheの新機能ファイルベースキャッシュの内部実装を読んでみた
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみたYoshio Hanawa
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshopNick Belhomme
 
Efficient Code Organisation
Efficient Code OrganisationEfficient Code Organisation
Efficient Code OrganisationSqueed
 
ZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperGary Hockin
 
PHP buildpackでhackとphalconが動いた件について
PHP buildpackでhackとphalconが動いた件についてPHP buildpackでhackとphalconが動いた件について
PHP buildpackでhackとphalconが動いた件について健治郎 安井
 
はじめてのCodeIgniter
はじめてのCodeIgniterはじめてのCodeIgniter
はじめてのCodeIgniterYuya Matsushima
 
Yet another use of Phalcon
Yet another use of PhalconYet another use of Phalcon
Yet another use of PhalconYuji Iwai
 
3流プログラマーから見たPhalconとWISP
3流プログラマーから見たPhalconとWISP3流プログラマーから見たPhalconとWISP
3流プログラマーから見たPhalconとWISPYamaYamamoto
 
Phalcon勉強会資料
Phalcon勉強会資料Phalcon勉強会資料
Phalcon勉強会資料Yuji Otani
 
Phalcon + AngularJSで作る動画プラットフォーム
Phalcon + AngularJSで作る動画プラットフォームPhalcon + AngularJSで作る動画プラットフォーム
Phalcon + AngularJSで作る動画プラットフォームryo-utsunomiya
 
Symfony2 チュートリアル イントロダクション osc 2011 nagoya
Symfony2 チュートリアル イントロダクション osc 2011 nagoyaSymfony2 チュートリアル イントロダクション osc 2011 nagoya
Symfony2 チュートリアル イントロダクション osc 2011 nagoyaHidenori Goto
 
CodeIgniter入門
CodeIgniter入門CodeIgniter入門
CodeIgniter入門Sho A
 
PHPUnitでリファクタリング
PHPUnitでリファクタリングPHPUnitでリファクタリング
PHPUnitでリファクタリングTakako Miyagawa
 
Symfony2でより良いソフトウェアを作るために
Symfony2でより良いソフトウェアを作るためにSymfony2でより良いソフトウェアを作るために
Symfony2でより良いソフトウェアを作るためにAtsuhiro Kubo
 

Viewers also liked (20)

Dependency management in PHP & ZendFramework 2
Dependency management in PHP & ZendFramework 2Dependency management in PHP & ZendFramework 2
Dependency management in PHP & ZendFramework 2
 
Zend四十八手シリーズ Zend_Cache Zend_Paginator
Zend四十八手シリーズ Zend_Cache Zend_PaginatorZend四十八手シリーズ Zend_Cache Zend_Paginator
Zend四十八手シリーズ Zend_Cache Zend_Paginator
 
Zend framework 3 と zend expressive の話
Zend framework 3 と zend expressive の話Zend framework 3 と zend expressive の話
Zend framework 3 と zend expressive の話
 
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみた
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみたOPcacheの新機能ファイルベースキャッシュの内部実装を読んでみた
OPcacheの新機能ファイルベースキャッシュの内部実装を読んでみた
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshop
 
Efficient Code Organisation
Efficient Code OrganisationEfficient Code Organisation
Efficient Code Organisation
 
ZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperZF2 for the ZF1 Developer
ZF2 for the ZF1 Developer
 
PHP buildpackでhackとphalconが動いた件について
PHP buildpackでhackとphalconが動いた件についてPHP buildpackでhackとphalconが動いた件について
PHP buildpackでhackとphalconが動いた件について
 
はじめてのCodeIgniter
はじめてのCodeIgniterはじめてのCodeIgniter
はじめてのCodeIgniter
 
Yet another use of Phalcon
Yet another use of PhalconYet another use of Phalcon
Yet another use of Phalcon
 
PHP勉強会 #51
PHP勉強会 #51PHP勉強会 #51
PHP勉強会 #51
 
受託開発のPhalcon
受託開発のPhalcon受託開発のPhalcon
受託開発のPhalcon
 
3流プログラマーから見たPhalconとWISP
3流プログラマーから見たPhalconとWISP3流プログラマーから見たPhalconとWISP
3流プログラマーから見たPhalconとWISP
 
Phalcon勉強会資料
Phalcon勉強会資料Phalcon勉強会資料
Phalcon勉強会資料
 
Phalcon + AngularJSで作る動画プラットフォーム
Phalcon + AngularJSで作る動画プラットフォームPhalcon + AngularJSで作る動画プラットフォーム
Phalcon + AngularJSで作る動画プラットフォーム
 
Symfony2 チュートリアル イントロダクション osc 2011 nagoya
Symfony2 チュートリアル イントロダクション osc 2011 nagoyaSymfony2 チュートリアル イントロダクション osc 2011 nagoya
Symfony2 チュートリアル イントロダクション osc 2011 nagoya
 
CodeIgniter入門
CodeIgniter入門CodeIgniter入門
CodeIgniter入門
 
PHPUnitでリファクタリング
PHPUnitでリファクタリングPHPUnitでリファクタリング
PHPUnitでリファクタリング
 
はじめてのSymfony2
はじめてのSymfony2はじめてのSymfony2
はじめてのSymfony2
 
Symfony2でより良いソフトウェアを作るために
Symfony2でより良いソフトウェアを作るためにSymfony2でより良いソフトウェアを作るために
Symfony2でより良いソフトウェアを作るために
 

Similar to ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)

How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkZend by Rogue Wave Software
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn WorkshopBastian Feder
 
Z ray plugins for dummies
Z ray plugins for dummiesZ ray plugins for dummies
Z ray plugins for dummiesDmitry Zbarski
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)James Titcumb
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDTBastian Feder
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and EvolutionEelco Visser
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Deepak Garg
 
Using Zend_Tool to Establish Your Project's Skeleton
Using Zend_Tool to Establish Your Project's SkeletonUsing Zend_Tool to Establish Your Project's Skeleton
Using Zend_Tool to Establish Your Project's SkeletonJeremy Brown
 
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"Fwdays
 
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & ApplicationHead First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & ApplicationJace Ju
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Bastian Feder
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshopjulien pauli
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Bastian Feder
 
2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps2010 07-28-testing-zf-apps
2010 07-28-testing-zf-appsVenkata Ramana
 
PHP Development Tools 2.0 - Success Story
PHP Development Tools 2.0 - Success StoryPHP Development Tools 2.0 - Success Story
PHP Development Tools 2.0 - Success StoryMichael Spector
 
Applying software engineering to configuration management
Applying software engineering to configuration managementApplying software engineering to configuration management
Applying software engineering to configuration managementBart Vanbrabant
 

Similar to ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel) (20)

How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend Framework
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn Workshop
 
Z ray plugins for dummies
Z ray plugins for dummiesZ ray plugins for dummies
Z ray plugins for dummies
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012
 
Zf2 phpquebec
Zf2 phpquebecZf2 phpquebec
Zf2 phpquebec
 
Using Zend_Tool to Establish Your Project's Skeleton
Using Zend_Tool to Establish Your Project's SkeletonUsing Zend_Tool to Establish Your Project's Skeleton
Using Zend_Tool to Establish Your Project's Skeleton
 
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
Ростислав Михайлив "Zend Framework 3 - evolution or revolution"
 
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & ApplicationHead First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & Application
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps
 
PHP Development Tools 2.0 - Success Story
PHP Development Tools 2.0 - Success StoryPHP Development Tools 2.0 - Success Story
PHP Development Tools 2.0 - Success Story
 
Applying software engineering to configuration management
Applying software engineering to configuration managementApplying software engineering to configuration management
Applying software engineering to configuration management
 

More from ZFConf Conference

ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)
ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)
ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)ZFConf Conference
 
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...ZFConf Conference
 
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...ZFConf Conference
 
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)ZFConf Conference
 
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...ZFConf Conference
 
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf Conference
 
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...ZFConf Conference
 
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...ZFConf Conference
 
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...ZFConf Conference
 
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...ZFConf Conference
 
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...ZFConf Conference
 
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)ZFConf Conference
 
ZFConf 2010: Zend Framework and Doctrine
ZFConf 2010: Zend Framework and DoctrineZFConf 2010: Zend Framework and Doctrine
ZFConf 2010: Zend Framework and DoctrineZFConf Conference
 
ZFConf 2010: History of e-Shtab.ru
ZFConf 2010: History of e-Shtab.ruZFConf 2010: History of e-Shtab.ru
ZFConf 2010: History of e-Shtab.ruZFConf Conference
 
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend Framework
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend FrameworkZFConf 2010: Fotostrana.ru: Prototyping Project with Zend Framework
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend FrameworkZFConf Conference
 
ZFConf 2010: Performance of Zend Framework Applications
ZFConf 2010: Performance of Zend Framework ApplicationsZFConf 2010: Performance of Zend Framework Applications
ZFConf 2010: Performance of Zend Framework ApplicationsZFConf Conference
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf Conference
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)ZFConf Conference
 
ZFConf 2010: What News Zend Framework 2.0 Brings to Us
ZFConf 2010: What News Zend Framework 2.0 Brings to UsZFConf 2010: What News Zend Framework 2.0 Brings to Us
ZFConf 2010: What News Zend Framework 2.0 Brings to UsZFConf Conference
 
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)ZFConf Conference
 

More from ZFConf Conference (20)

ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)
ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)
ZFConf 2012: Кеш без промахов средствами Zend Framework 2 (Евгений Шпилевский)
 
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...
ZFConf 2012: Проектирование архитектуры, внедрение и организация процесса раз...
 
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...
ZFConf 2012: Реализация доступа к СУБД IBM DB2 посредством встраиваемого SQL ...
 
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)
ZFConf 2012: Code Generation и Scaffolding в Zend Framework 2 (Виктор Фараздаги)
 
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...
ZFConf 2011: Создание REST-API для сторонних разработчиков и мобильных устрой...
 
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
ZFConf 2011: Что такое Sphinx, зачем он вообще нужен и как его использовать с...
 
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...
ZFConf 2011: Как может помочь среда разработки при написании приложения на Ze...
 
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...
ZFConf 2011: Разделение труда: Организация многозадачной, распределенной сист...
 
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...
ZFConf 2011: Гибкая архитектура Zend Framework приложений с использованием De...
 
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...
ZFConf 2011: Behavior Driven Development в PHP и Zend Framework (Константин К...
 
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...
ZFConf 2011: Воюем за ресурсы: Повышение производительности Zend Framework пр...
 
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)
ZFConf 2011: Толстая модель: История разработки собственного ORM (Михаил Шамин)
 
ZFConf 2010: Zend Framework and Doctrine
ZFConf 2010: Zend Framework and DoctrineZFConf 2010: Zend Framework and Doctrine
ZFConf 2010: Zend Framework and Doctrine
 
ZFConf 2010: History of e-Shtab.ru
ZFConf 2010: History of e-Shtab.ruZFConf 2010: History of e-Shtab.ru
ZFConf 2010: History of e-Shtab.ru
 
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend Framework
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend FrameworkZFConf 2010: Fotostrana.ru: Prototyping Project with Zend Framework
ZFConf 2010: Fotostrana.ru: Prototyping Project with Zend Framework
 
ZFConf 2010: Performance of Zend Framework Applications
ZFConf 2010: Performance of Zend Framework ApplicationsZFConf 2010: Performance of Zend Framework Applications
ZFConf 2010: Performance of Zend Framework Applications
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 1)
 
ZFConf 2010: What News Zend Framework 2.0 Brings to Us
ZFConf 2010: What News Zend Framework 2.0 Brings to UsZFConf 2010: What News Zend Framework 2.0 Brings to Us
ZFConf 2010: What News Zend Framework 2.0 Brings to Us
 
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)
ZFConf 2010: Using Message Queues in Day-to-Day Projects (Zend_Queue)
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)

  • 1. Zend Framework 2 quick start by Enrico Zimuel (enrico@zend.com) Senior Software Engineer Zend Framework Core Team Zend Technologies Ltd ZFConf – 21th April 2012 Moscow © All rights reserved. Zend Technologies, Inc.
  • 2. About me • Enrico Zimuel (@ezimuel) • Software Engineer since 1996 – Assembly x86, C/C++, Java, Perl, PHP • Enjoying PHP since 1999 • PHP Engineer at Zend since 2008 • Zend Framework Core Team from 2011 • B.Sc. Computer Science and Economics from University of Pescara (Italy) © All rights reserved. Zend Technologies, Inc.
  • 3. Summary ● Overview of ZF2 ● The new autoloading system ● Dependency Injection ● Event manager ● The new MVC ● Quick start: ZendSkeletonApplication ● Package system ● From ZF1 to ZF2 © All rights reserved. Zend Technologies, Inc.
  • 4. ZF2 key features ● New architecture (MVC, Di, Events) ● Requirement: PHP 5.3 ● No more CLA (Contributor License Agreement) ● Git (GitHub) instead of SVN ● Better performance ● Module management ● Packaging system © All rights reserved. Zend Technologies, Inc.
  • 5. A new core ● The ZF1 way: ▶ Singleton, Registry, and Hard-Coded Dependencies ● The ZF2 approach: ▶ Aspect Oriented Design and Dependency Injection © All rights reserved. Zend Technologies, Inc.
  • 6. New architectural approach ● Methodologies used in the development – Decoupling (ZendDi) – Event driven (ZendEventManager) – Standard interfaces (ZendStdlib) ● Take advantage of PHP 5.3 ▶ Namespace ▶ Lambda Functions and Closures ▶ Better performance © All rights reserved. Zend Technologies, Inc.
  • 7. Autoloading © All rights reserved. Zend Technologies, Inc.
  • 8. Autoloading ● No more require_once calls! ● Multiple approaches: – ZF1-style include_path autoloader – Per-namespace/prefix autoloading – Class-map autoloading © All rights reserved. Zend Technologies, Inc.
  • 9. Classmap generator ● How to generate the .classmap.php? We provided a command line tool: bin/classmap_generator.php ● Usage is trivial: $ cd your/library $ php /path/to/classmap_generator.php -w ● Class-Map will be created in .classmap.php © All rights reserved. Zend Technologies, Inc.
  • 10. Performance improvement ● Class-Maps show a 25% improvement on the ZF1 autoloader when no acceleration is present ▶ 60-85% improvements when an opcode cache is in place! ● Pairing namespaces/prefixes with specific paths shows >10% gains with no acceleration ▶ 40% improvements when an opcode cache is in place! Note: The new autoloading system of ZF2 has been ported to ZF 1.12 © All rights reserved. Zend Technologies, Inc.
  • 11. Dependency Injection © All rights reserved. Zend Technologies, Inc.
  • 12. Dependency injection ● How to manage dependencies between objects? ● Dependency injection (Di) is a design pattern whose purpose is to reduce the coupling between software components It's time for your dependency injection! © All rights reserved. Zend Technologies, Inc.
  • 13. Di by construct Without Di With Di (construct) class Foo { class Foo { protected $bar; protected $bar; … … public function __construct() { public function $this->bar= new Bar(); __construct(Bar $bar) { } $this->bar = $bar; … } } … } Cons: Pros: Difficult to test Easy to test No isolation Decoupling Difficult to reuse code Flexible architecture © All rights reserved. Zend Technologies, Inc.
  • 14. Di by setter class Foo { protected $bar; … public function setBar(Bar $bar) { $this->bar = $bar; } … } © All rights reserved. Zend Technologies, Inc.
  • 15. ZendDi ● Supports the 3 different injection patterns: – Constructor – Interface – Setter ● Implements a Di Container: – Manage the dependencies using configuration and annotation – Provide a compiler to autodiscover classes in a path and create the class definitions, for dependencies © All rights reserved. Zend Technologies, Inc.
  • 16. Sample definition $definition = array( 'Foo' => array( 'setBar' => array( 'bar' => array( 'type' => 'Bar', 'required' => true, ), ), ), ); © All rights reserved. Zend Technologies, Inc.
  • 17. Using the Di container use ZendDiDi, ZendDiConfiguration; $di = new Di; $config = new Configuration(array( 'definition' => array('class' => $definition) )); $config->configure($di); $foo = $di->get('Foo'); // contains Bar! © All rights reserved. Zend Technologies, Inc.
  • 18. Di by annotation namespace Example { use ZendDiDefinitionAnnotation as Di; class Foo { public $bam; /** * @DiInject() */ public function setBar(Bar $bar){ $this->bar = $bar; } } class Bar { } } © All rights reserved. Zend Technologies, Inc.
  • 19. Di by annotation (2) $compiler = new ZendDiDefinitionCompilerDefinition(); $compiler->addDirectory('File path of Foo and Bar'); $compiler->compile(); $definitions = new ZendDiDefinitionList($compiler); $di = new ZendDiDi($definitions); $baz = $di->get('ExampleFoo'); // contains Bar! More use cases of ZendDi: https://github.com/ralphschindler/zf2-di-use-cases © All rights reserved. Zend Technologies, Inc.
  • 20. Event Manager © All rights reserved. Zend Technologies, Inc.
  • 21. Event Manager ● An Event Manager is an object that aggregates listeners for one or more named events, and which triggers events. ● A Listener is a callback that can react to an event. ● An Event is an action. © All rights reserved. Zend Technologies, Inc.
  • 22. Example use ZendEventManagerEventManager; $events = new EventManager(); $events->attach('do', function($e) { $event = $e->getName(); $params = $e->getParams(); printf( 'Handled event “%s”, with parameters %s', $event, json_encode($params) ); }); $params = array('foo' => 'bar', 'baz' => 'bat'); $events->trigger('do', null, $params); © All rights reserved. Zend Technologies, Inc.
  • 23. MVC © All rights reserved. Zend Technologies, Inc.
  • 24. Event driven architecture ● Flow: bootstrap, route, dispatch, response ● Everything is an event in MVC of ZF2 © All rights reserved. Zend Technologies, Inc.
  • 25. Modules ● The basic unit in a ZF2 MVC application is a Module ● A module is a collection of code and other files that solves a more specific atomic problem of the larger business problem ● Modules are simply: ▶ A namespace ▶ Containing a single classfile, Module.php © All rights reserved. Zend Technologies, Inc.
  • 26. Quick start ZendSkeletonApplication © All rights reserved. Zend Technologies, Inc.
  • 27. ZendSkeletonApplication ● A simple, skeleton application using the ZF2 MVC layer and module systems ● On GitHub: ▶ git clone --recursive git://github.com/zendframework/ZendSkeletonApplication.git ● This project makes use of Git submodules ● Works using ZF2.0.0beta3 © All rights reserved. Zend Technologies, Inc.
  • 28. Folder tree config autoload application.config.php data module Application config vendor src public Application css Controller IndexController.php images view js Module.php .htaccess autoload_classmap.php index.php autoload_function.php autoload_register.php © All rights reserved. Zend Technologies, Inc.
  • 29. Output © All rights reserved. Zend Technologies, Inc.
  • 30. index.php chdir(dirname(__DIR__)); require_once (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library') . '/Zend/Loader/AutoloaderFactory.php'; ZendLoaderAutoloaderFactory::factory(); $appConfig = include 'config/application.config.php'; $listenerOptions = new ZendModuleListenerListenerOptions( $appConfig['module_listener_options']); $defaultListeners = new ZendModuleListenerDefaultListenerAggregate($listenerOptions); $defaultListeners->getConfigListener() ->addConfigGlobPath("config/autoload/{,*.} {global,local}.config.php"); ... © All rights reserved. Zend Technologies, Inc.
  • 31. index.php (2) ... $moduleManager = new ZendModuleManager($appConfig['modules']); $moduleManager->events()->attachAggregate($defaultListeners); $moduleManager->loadModules(); // Create application, bootstrap, and run $bootstrap = new ZendMvcBootstrap( $defaultListeners->getConfigListener()->getMergedConfig()); $application = new ZendMvcApplication; $bootstrap->bootstrap($application); $application->run()->send(); © All rights reserved. Zend Technologies, Inc.
  • 32. config/application.config.php return array( 'modules' => array( 'Application' ), 'module_listener_options' => array( 'config_cache_enabled' => false, 'cache_dir' => 'data/cache', 'module_paths' => array( './module', './vendor', ), ), ); © All rights reserved. Zend Technologies, Inc.
  • 33. config/autoload ● global.config.php ● local.config.php.dist (.gitignore) ● By default, this application is configured to load all configs in: ./config/autoload/{,*.}{global,local}.config.php. ● Doing this provides a location for a developer to drop in configuration override files provided by modules, as well as cleanly provide individual, application-wide config files for things like database connections, etc. © All rights reserved. Zend Technologies, Inc.
  • 34. Application/config/module.config.php return array( 'di' => array( 'instance' => array( … ) ) ); Here you configure the components of your application (i.e. routing, controller, view) © All rights reserved. Zend Technologies, Inc.
  • 35. IndexController.php namespace ApplicationController; use ZendMvcControllerActionController, ZendViewModelViewModel; class IndexController extends ActionController { public function indexAction() { return new ViewModel(); } } © All rights reserved. Zend Technologies, Inc.
  • 36. Modules are “plug and play” ● Easy to reuse a module, only 3 steps: 1) Copy the module in module (or vendor) folder 2) Enable the module in your application.config.php ▶ Add the name of the module in “modules” 3) Copy the config file of the module in /config/autoload/module.<module's name>.config.php © All rights reserved. Zend Technologies, Inc.
  • 37. modules.zendframework.com © All rights reserved. Zend Technologies, Inc.
  • 38. Package system © All rights reserved. Zend Technologies, Inc.
  • 39. Package system ● We use Pyrus, a tool to manage PEAR packages. Pyrus simplifies and improves the PEAR experience. ● Source packages (download + github): ▶ http://packages.zendframework.com/ ● Install and configure pyrus: ▶ wget http://packages.zendframework.com/pyrus.phar ▶ pyrus.phar . ▶ pyrus.phar . channel-discover packages.zendframework.com ● Install a Zend_<component>: ▶ pyrus.phar . install zf2/Zend_<component> © All rights reserved. Zend Technologies, Inc.
  • 40. From ZF1 to ZF2 © All rights reserved. Zend Technologies, Inc.
  • 41. Migrate to ZF2 ● Goal: migrate without rewriting much code! ● Main steps – Namespace: Zend_Foo => ZendFoo – Exceptions: an Interface for each components, no more Zend_Exception – Autoloading: 3 possible options (one is ZF1) ▶ MVC: module, event based, dispatchable © All rights reserved. Zend Technologies, Inc.
  • 42. ZF1 migration prototype ● Source code: http://bit.ly/pvc0X1 ● Creates a "Zf1Compat" version of the ZF1 dispatcher as an event listener. ● The bootstrap largely mimics how ZF1's Zend_Application bootstrap works. ● The default route utilizes the new ZF2 MVC routing, but mimics what ZF1 provided. © All rights reserved. Zend Technologies, Inc.
  • 43. Helping out ● http://framework.zend.com/zf2 ● http://github.com/zendframework ● https://github.com/zendframework/ZendSkeletonApplication ● Getting Started with Zend Framework 2 by Rob Allen, http://www.akrabat.com ● Weekly IRC meetings (#zf2-meeting on Freenode) ● #zftalk.2 on Freenode IRC © All rights reserved. Zend Technologies, Inc.
  • 44. Questions? © All rights reserved. Zend Technologies, Inc.
  • 45. Thank you! ● Comments and feedbacks: – Email: enrico@zend.com – Twitter: @ezimuel © All rights reserved. Zend Technologies, Inc.