SlideShare a Scribd company logo
1 of 79
Download to read offline
Symfony2
                         The Next Generation
                           PHP Framework
                              Ryan Weaver
                              @weaverryan




Thursday, May 12, 2011
Who is this dude?
                  • Co-author of the Symfony2 Docs
                  • Core Symfony2 contributor
                  • Founder of KnpLabs US
                  • Boyfriend of the much more
                         talented @leannapelham


                          http://www.knplabs.com/en
                          http://www.github.com/weaverryan


Thursday, May 12, 2011
KnpLabs
                         Quality. Innovation. Excitement.

                         • Your symfony/Symfony2 development experts
                         • Active in a ton of open source initiatives
                         • Consulting, application auditing and training
                                   http://bit.ly/symfony-training



Thursday, May 12, 2011
Act 1:

                         What is Symphony?
                               Symfony!


Thursday, May 12, 2011
A Bunch of Standalone Libs
                   Routing       HttpFoundation    Doctrine2 DBAL      Security

                DependencyInjection EventDispatcher Assetic Translation

               Form             Validator    Monolog       Doctrine2 ORM    Twig

            ClassLoader            HttpKernel     Doctrine2 ODM     SwiftMailer

         Serializer             Templating   CSSSelector    Console BrowserKit

                         Yaml      Process      DomCrawler Finder


Thursday, May 12, 2011
A Bunch of Standalone Libs
                  Symfony is a group of
             Routing HttpFoundation Doctrine2 DBAL       Security
            standalone components and
            DependencyInjection EventDispatcher Assetic Translation
           other standalone PHP libraries
               Form             Validator    Monolog    Doctrine2 ORM       Twig

           Decoupled building blocks for
            ClassLoader            HttpKernel     Doctrine2 ODM     SwiftMailer

         Serializer any web application BrowserKit
                     Templating CSSSelector Console

                         Yaml      Process      DomCrawler Finder


Thursday, May 12, 2011
Routing          DependencyInjection         HttpFoundation         Assetic            Doctrine2 DBAL        Security

                         Form       Validator       HttpKernel        EventDispatcher       Doctrine2 ORM            Twig        Translation

                   ClassLoader            Process        Templating      Monolog        CSSSelector        Doctrine2 ODM         SwiftMailer

                             Serializer          Yaml           DomCrawler         Console             Finder       BrowserKit




                             What is the Symfony2 Framework?
                • A set of bundles containing configuration
                and bridge classes

                • These glue the components together, giving
                the developer a consistent experience


Thursday, May 12, 2011
Routing          DependencyInjection         HttpFoundation         Assetic            Doctrine2 DBAL        Security

                         Form       Validator       HttpKernel        EventDispatcher       Doctrine2 ORM            Twig        Translation

                   ClassLoader            Process        Templating      Monolog        CSSSelector        Doctrine2 ODM         SwiftMailer

                             Serializer          Yaml           DomCrawler         Console             Finder       BrowserKit




                           FrameworkBundle                            SecurityBundle                    DoctrineBundle

                             TwigBundle                    MonologBundle                       SwiftmailerBundle

                                             WebProfilerBundle                           AsseticBundle


                                     The Symfony2 Framework

Thursday, May 12, 2011
The Flexibility of Bundles
                    • A bundle is like a plugin, except that even the
                    core framework is implemented as bundles

                    • Your code is an equal citizen with the core

            FrameworkBundle          SecurityBundle      AcmeBlogBundle

       AcmeTwigBundle
          TwigBundle            MonologBundle         AcmeAccountBundle

                         WebProfilerBundle



Thursday, May 12, 2011
Symfony2 is a set of
                 standalone PHP component
                libraries, glued together by a
                group of removable “bundles”



Thursday, May 12, 2011
Act 2:

                         Keep Things Simple



Thursday, May 12, 2011
From space, the Web is stupid-simple

                                       the request
                                         /foo
                        Client
                                                      Your App
                    (e.g. browser)
                                     <h1>FOO!</h1>
                                       the response




Thursday, May 12, 2011
HTTP Request-Response

                   • Your job is always to generate and return a
                   response

                   • Symfony’s goal is to:
                     • take care of repetitive tasks (e.g. routing)
                     • allow your code to be organized
                     • offer optional tools for complex tasks (e.g.
                         security, forms, etc)

                         • to stay the hell out of your way!

Thursday, May 12, 2011
Keep it simple: write code that
             represents your business logic
             - don’t bend to your framework




Thursday, May 12, 2011
Act 3:

                         Symfony in Action




Thursday, May 12, 2011
Symfony Distributions
                     • Symfony offers “distributions” (think Ubuntu)

                     • Download the “Standard Distribution” to
                     instantly have a functional application

                         • Default Project Structure
                         • Common Sense default configuration
                         • Some demo pages to play with
                     Start developing immediately!!!

Thursday, May 12, 2011
Step 1: Get it!




                         http://symfony.com/download

Thursday, May 12, 2011
Step 2: Unzip it!


  $ cd /path/to/webroot

  $ tar zxvf /path/to/Symfony_Standard_Vendors_2.0.0PR11.tgz




Thursday, May 12, 2011
Step 3: Run it!




            http://localhost/Symfony/web/config.php

Thursday, May 12, 2011
Step 3: Run it!

                     • This page identifies any problems with your
                     setup

                     • Fix them, then click “Configure your Symfony
                         Application online” to continue




Thursday, May 12, 2011
Step 3: Configure it!

     If you’re into
    GUI’s, Symfony
     offers one for
    setting up your
  basic configuration




Thursday, May 12, 2011
Finished!


       This *is* your
       first Symfony2
            page




Thursday, May 12, 2011
Act 4:

                         Let’s create some pages




Thursday, May 12, 2011
The 3 Steps to a Page
                the request!
                                         /hello/ryan
                         Step1: Symfony matches the URL to a route

          Step2: Symfony executes the controller (a
 the edge of a  PHP function) of the route
  giant flower!
                         Step3: The controller (your code) returns a
                                Symfony Response object
   the response!
                                   <h1>Hello ryan!</h1>

Thursday, May 12, 2011
Hello {insert-name}!


                   • Our goal: to create a hello world-like app

                   • in two small steps...




Thursday, May 12, 2011
Step1: Define a route

                         You define the routes (URLs) of your app

                                   _welcome:

                         /             pattern: /
                                       defaults: { _controller: AcmeDemoBundle:Welcome:index }




                                   hello_demo:
            /hello/ryan                pattern: /hello/{name}
                                       defaults: { _controller: AcmeDemoBundle:Meetup:hello }




Thursday, May 12, 2011
Step1: Define a route
                                Add the following route to
                                 app/config/routing.yml

                    hello_demo:
                        pattern: /hello/{name}
                        defaults: { _controller: AcmeDemoBundle:Meetup:hello }




       ** Routes can also be defined in XML, PHP and as annotations



Thursday, May 12, 2011
Step 2: Symfony executes
                         the controller of the route
                    hello_demo:
                        pattern: /hello/{name}
                        defaults: { _controller: AcmeDemoBundle:Meetup:hello }


                              AcmeDemoBundle:Meetup:hello
                                      is a shortcut for
      AcmeDemoBundleControllerMeetupController::helloAction()

                          Symfony executes this PHP method


Thursday, May 12, 2011
Step2: Create the controller
                         <?php
                         // src/Acme/DemoBundle/Controller/MeetupController.php
                         namespace AcmeDemoBundleController;

                         use SymfonyComponentHttpFoundationResponse;
                         use SymfonyBundleFrameworkBundleControllerController;

                         class MeetupController extends Controller
                         {
                             public function helloAction($name)
                             {
                                 return new Response('Hello '.$name);
                             }
                         }




Thursday, May 12, 2011
Step2: Create the controller
                         <?php
                         // src/Acme/DemoBundle/Controller/MeetupController.php
                         namespace AcmeDemoBundleController;

                         use SymfonyComponentHttpFoundationResponse;
                         use SymfonyBundleFrameworkBundleControllerController;

                         class MeetupController extends Controller
                         {
                             public function helloAction($name)
                             {
                                 return new Response('Hello '.$name);
                             }
                         }

                                  OMG - no base controller
                                     class required!
Thursday, May 12, 2011
The Controller returns a
                           Symfony Response object
                         use SymfonyComponentHttpFoundationResponse;

                         public function helloAction($name)
                         {
                             return new Response('Hello '.$name);
                         }

                                  This is where *your* code goes
                             Returning a Response object is the only
                                  requirement of a controller


Thursday, May 12, 2011
Routing Placeholders
                                The route matches URLs like /hello/*
                         hello_demo:
                             pattern: /hello/{name}
                             defaults: { _controller: AcmeDemoBundle:Meetup:hello }


                         use SymfonyComponentHttpFoundationResponse;

                         public function helloAction($name)
                         {
                             return new Response('Hello '.$name);
                         }


         And gives you access to the {name} value
Thursday, May 12, 2011
It’s Alive!




    http://localhost/Symfony/web/app_dev.php/hello/ryan
Thursday, May 12, 2011
2 steps to a page

                   • Create a route that points to a controller

                   • Do anything you want inside the controller,
                   but eventually return a Response object




Thursday, May 12, 2011
That was easy... what are
              some other tools I can choose
                        to use?




Thursday, May 12, 2011
Rendering a Template
                  • A template is a tool that you may choose to use

                  • A template is used to generate “presentation”
                  code (e.g. HTML)

                  • Keep your pretty (<div>) code away from your
                  nerdy ($foo->sendEmail($body)) code




Thursday, May 12, 2011
Do It!
                               Render a template in the controller

                         public function helloAction($name)
                         {
                             $content = $this->renderView(
                                 'AcmeDemoBundle:Meetup:hello.html.twig',
                                 array('name' => $name)
                             );

                             return new Response($content);
                         }




Thursday, May 12, 2011
Do it!
                                        Create the template file
              {# src/Acme/DemoBundle/Resources/views/Meetup/hello.html.twig #}

              Hello {{ name }}


                         This is Twig
      Twig is a fast, secure and powerful templating engine

      We *LOVE* Twig... but

      Symfony2 fully supports Twig and regular
      PHP templates
Thursday, May 12, 2011
It’s Still Alive!




    http://localhost/Symfony/web/app_dev.php/hello/ryan
Thursday, May 12, 2011
Twig knows all kinds of tricks
                   • Learn more about Twig:
                          “Hands on Symfony2” on Slideshare
                             http://bit.ly/hands-on-symfony2

                          “Being Dangerous with Twig” on Slideshare
                             http://bit.ly/dangerous-with-twig

                          Official Documentation
                             http://www.twig-project.org


Thursday, May 12, 2011
Act 5:

                         Shortcuts via Annotations




Thursday, May 12, 2011
The optional
                  FrameworkExtraBundle lets
                   you use annotations to do
                           less work



Thursday, May 12, 2011
Put the route right on your controller

                  /**
                    * @extra:Route("/hello/{name}", name="hello_demo")
                    */
                  public function helloAction($name)
                  {
                  $content = $this->renderView(
                       'AcmeDemoBundle:Meetup:hello.html.twig',
                       array('name' => $name)
                  );

                  return new Response($content);
                  }




Thursday, May 12, 2011
Put the route right on your controller

                         /**
                           * @extra:Route("/hello/{name}", name="hello_demo")
                           */


                                                                                The PHP comments are
                         public function helloAction($name)
                         {
                         $content = $this->renderView(


                                                                                 called “annotations”
                              'AcmeDemoBundle:Meetup:hello.html.twig',
                              array('name' => $name)
                         );

                         return new Response($content);
                         }




               Symfony can use annotations to read routing config

               Your route and controller are in the same place!


Thursday, May 12, 2011
Instead of rendering a template, tell
                                 Symfony to do it for you

                         /**
                           * @extra:Route("/hello/{name}", name="hello_demo")
                           * @extra:Template()
                           */
                         public function helloAction($name)
                         {
                              return array('name' => $name);
                         }




Thursday, May 12, 2011
/**
                             * @extra:Route("/hello/{name}", name="hello_demo")
                             * @extra:Template()
                             */
                           public function helloAction($name)
                           {
                                return array('name' => $name);
                           }



                            Controller: AcmeDemoBundle:Meetup:hello


                         Template: AcmeDemoBundle:Meetup:hello.html.twig



Thursday, May 12, 2011
If you choose to follow
                conventions, you can take
              advantage of certain shortcuts




Thursday, May 12, 2011
Add security
                   /**
                     * @extra:Route("/hello/admin/{name}")
                     * @extra:Secure(roles="ROLE_ADMIN")
                     * @extra:Template()
                     */
                   public function helloAdminAction($name)
                   {
                        return array('name' => $name);
                   }




Thursday, May 12, 2011
Add caching

                         /**
                           * @extra:Route("/hello/{name})
                           * @extra:Template()
                           * @extra:Cache(maxage="86400")
                           */
                         public function helloAction($name)
                         {
                              return array('name' => $name);
                         }




Thursday, May 12, 2011
Act 5:

                         The Killer Features of
                              Symfony2




Thursday, May 12, 2011
#1 Crazy-Decoupled & Extensible
                  • Composed of nearly 30 independent libraries

                  • Your code has as many rights as the core code

                  • Heavy use of the observer pattern (i.e. events)

                  • Standards Compliant (e.g. PSR-0)



Thursday, May 12, 2011
#2 The Developer Experience
                  • You’re in the driver’s seat, not the framework

                  • Great effort has gone into expressive exception
                  messages at every potential pain point

                  • The Web Debug Toolbar and Profiler




Thursday, May 12, 2011
The web debug toolbar

Thursday, May 12, 2011
The Profiler

Thursday, May 12, 2011
#3 HTTP Caching
                  • Instead of inventing a caching strategy,
                  Symfony uses the HTTP Cache specification

                         public function helloAction($name)
                         {
                             $response = // ...
                             $response->setMaxAge(86400);

                             return $response;
                         }




Thursday, May 12, 2011
#3 HTTP Caching
                  • Symfony2 ships with a reverse proxy built in
                  pure PHP

                  • Swap it out for Varnish, Squid or another other
                  HTTP cache

                  • Native support for edge side includes (ESI)



Thursday, May 12, 2011
#4 The Security Component
                  • Based on the Security Component of the
                  Spring Framework

                  • Firewalls can authenticate users via any
                  method: HTTP Auth, X.509 certificate, form login,
                  Twitter, etc, etc

                  • Framework for advanced ACLs via Doctrine


Thursday, May 12, 2011
#5 Silex: The Microframework
                                   http://silex-project.org/
                  • Microframework built from Symfony2 Components
                         require_once __DIR__.'/silex.phar';

                         $app = new SilexApplication();

                         $app->get('/hello/{name}', function($name) {
                             return "Hello $name";
                         });

                         $app->run();


                 • It’s just that easy

Thursday, May 12, 2011
#6 The hyperactive community

                         • 190+ core contributors
                         • 90+ documentation contributors
                         • 223 open source Symfony2 bundles
                         • 74 open source Symfony2 projects

                         ... and counting ...

Thursday, May 12, 2011
Symfony2Bundles.org


                         • 223 open source bundles
                         • 74 open source projects


                              http://symfony2bundles.org/

Thursday, May 12, 2011
And lot’s more
                • Cache-warming framework

                • Routing can be dumped as Apache rewrite rules

                • Service container can be dumped to Graphviz

                • RESTful APIS support via the RestBundle

                     https://github.com/FriendsOfSymfony/RestBundle


Thursday, May 12, 2011
After-Dinner Mint

          Standalone PHP Libraries from
             the Symfony Community




Thursday, May 12, 2011
Assetic
                         https://github.com/kriswallsmith/assetic
                  • PHP asset management framework

                  • Run CSS and JS through filters
                    • LESS, SASS and others
                    • Compress the assets

                  • Compile CSS and JS into a single file each


Thursday, May 12, 2011
Behat + Mink
                                 http://behat.org/

                  • Behavioral-driven development framework




                 • Write human-readable sentences that test
                 your code (and can be run in a browser)

Thursday, May 12, 2011
Gaufrette
                          https://github.com/knplabs/Gaufrette
                  • PHP filesystem abstraction library
                         // ... setup your filesystem

                         $content = $filesystem->read('myFile');
                         $content = 'Hello I am the new content';

                         $filesystem->write('myFile', $content);



                 • Read and write from Amazon S3 or FTP like a
                 local filesystem

Thursday, May 12, 2011
Imagine
                         https://github.com/avalanche123/Imagine
                  • PHP Image manipulation library
                         use ImagineImageBox;
                         use ImagineImagePoint;

                         $image->resize(new Box(15, 25))
                             ->rotate(45)
                             ->crop(new Point(0, 0), new Box(45, 45))
                             ->save('/path/to/new/image.jpg');


                 • Does crazy things and has crazy docs


Thursday, May 12, 2011
Deployment with Capifony
                                  http://capifony.org/
                  • Capistrano deployment for symfony1 and Symfony2

                         $ cap deploy:setup

                         $ cap deploy

                         $ cap deploy:rollback




Thursday, May 12, 2011
The RestBundle
                   • For a fully-featured RESTful API solution try
                   out the RestBundle

                   • Provides a view layer to enable format
                   agnostic controllers


               https://github.com/FriendsOfSymfony/RestBundle



Thursday, May 12, 2011
And early support from a few
                         big names




Thursday, May 12, 2011
PhpStorm
                         http://www.jetbrains.com/phpstorm/
                  • PHP IDE now supports Twig Templates




Thursday, May 12, 2011
Support for Orchestra
                                   http://orchestra.io/
                  • Orchestra is a PHP platform for deploying, scaling
                  and managing your PHP applications.

                  • They’re awesome...

                  • And they support Symfony2!

  https://orchestra.tenderapp.com/kb/frameworks/symfony2



Thursday, May 12, 2011
Last words




Thursday, May 12, 2011
Symfony2 is...

                  • Fast as hell
                  • Infinitely flexible
                  • Fully-featured
                  • Driven by a huge community

                  • Not released yet...
                         Currently at beta1



Thursday, May 12, 2011
Backwards Compatibility
           breaks are possible, but will be
                 well-documented




Thursday, May 12, 2011
So dive in!




Thursday, May 12, 2011
Thanks!
                                     Questions?

                                 Ryan Weaver
                                 @weaverryan


                 Symfony2 Training
                   in Nashville

         Join us May 19th & 20th
Thursday, May 12, 2011
Who is this dude?
                    • Co-author of the Symfony2 Docs

                    • Core Symfony2 contributor

                    • Founder of KnpLabs US

                    • Big geek
                     http://www.twitter.com/weaverryan
                     http://www.github.com/weaverryan


Thursday, May 12, 2011
KnpLabs
                         Quality. Innovation. Excitement.

                         • symfony/Symfony2 development
                         • Consulting & application auditing
                         • Symfony2 Training




Thursday, May 12, 2011
Symfony2 Training
                     • Right here in Nashville: May 19th & 20th
                         • real coding, real project
                         • Doctrine2, forms, security, caching, etc
                         • Cool libraries like Assetic, Imagine, Behat
                         • Lot’s more
                     • Or join is in New York City: June 6th & 7th

                         http://bit.ly/symfony-training

Thursday, May 12, 2011

More Related Content

What's hot

Design pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentesDesign pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentesGiulio De Donato
 
Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modulesneilbowers
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 
The Naked Bundle - Symfony Barcelona
The Naked Bundle - Symfony BarcelonaThe Naked Bundle - Symfony Barcelona
The Naked Bundle - Symfony BarcelonaMatthias Noback
 
Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009Fabien Potencier
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1Vishal Biyani
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developersMohamed Wael
 
Learning puppet chapter 2
Learning puppet chapter 2Learning puppet chapter 2
Learning puppet chapter 2Vishal Biyani
 
Learning puppet chapter 3
Learning puppet chapter 3Learning puppet chapter 3
Learning puppet chapter 3Vishal Biyani
 
Metaprogramming JavaScript
Metaprogramming  JavaScriptMetaprogramming  JavaScript
Metaprogramming JavaScriptdanwrong
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction PresentationNerd Tzanetopoulos
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioCristopher Ewing
 
Introduction to Groovy Monkey
Introduction to Groovy MonkeyIntroduction to Groovy Monkey
Introduction to Groovy Monkeyjervin
 
IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3Robert Lemke
 

What's hot (20)

Design pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentesDesign pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentes
 
Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modules
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
The Naked Bundle - Symfony Barcelona
The Naked Bundle - Symfony BarcelonaThe Naked Bundle - Symfony Barcelona
The Naked Bundle - Symfony Barcelona
 
Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developers
 
Learning puppet chapter 2
Learning puppet chapter 2Learning puppet chapter 2
Learning puppet chapter 2
 
Learning puppet chapter 3
Learning puppet chapter 3Learning puppet chapter 3
Learning puppet chapter 3
 
Composer Helpdesk
Composer HelpdeskComposer Helpdesk
Composer Helpdesk
 
Metaprogramming JavaScript
Metaprogramming  JavaScriptMetaprogramming  JavaScript
Metaprogramming JavaScript
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
Apache ant
Apache antApache ant
Apache ant
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
Async await...oh wait!
Async await...oh wait!Async await...oh wait!
Async await...oh wait!
 
Rmi
RmiRmi
Rmi
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
 
Introduction to Groovy Monkey
Introduction to Groovy MonkeyIntroduction to Groovy Monkey
Introduction to Groovy Monkey
 
IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3
 

Viewers also liked

(My) Best Practices in Symfony
(My) Best Practices in Symfony(My) Best Practices in Symfony
(My) Best Practices in Symfonyinmarelibero
 
symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクションTomohiro MITSUMUNE
 
Php symfony and software lifecycle
Php symfony and software lifecyclePhp symfony and software lifecycle
Php symfony and software lifecyclePierre Joye
 
symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクションTomohiro MITSUMUNE
 
symfony : I18n And L10n
symfony : I18n And L10nsymfony : I18n And L10n
symfony : I18n And L10nWildan Maulana
 

Viewers also liked (7)

jQueryチュートリアル
jQueryチュートリアルjQueryチュートリアル
jQueryチュートリアル
 
(My) Best Practices in Symfony
(My) Best Practices in Symfony(My) Best Practices in Symfony
(My) Best Practices in Symfony
 
勉強会のすすめ
勉強会のすすめ勉強会のすすめ
勉強会のすすめ
 
symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクション
 
Php symfony and software lifecycle
Php symfony and software lifecyclePhp symfony and software lifecycle
Php symfony and software lifecycle
 
symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクション
 
symfony : I18n And L10n
symfony : I18n And L10nsymfony : I18n And L10n
symfony : I18n And L10n
 

Similar to Symony2 A Next Generation PHP Framework

Introduction to symfony2
Introduction to symfony2Introduction to symfony2
Introduction to symfony2Pablo Godel
 
An introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersAn introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersGiorgio Cefaro
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013Lukas Smith
 
Integrating symfony and Zend Framework
Integrating symfony and Zend FrameworkIntegrating symfony and Zend Framework
Integrating symfony and Zend FrameworkStefan Koopmanschap
 
Starting with Symfony2
Starting with Symfony2Starting with Symfony2
Starting with Symfony2Kevin Bond
 
Symfony State Of The Union, March 2010
Symfony State Of The Union, March 2010Symfony State Of The Union, March 2010
Symfony State Of The Union, March 2010Damien Filiatrault
 
Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Stefan Koopmanschap
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSCaridy Patino
 
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Stefan Koopmanschap
 
A software factory in a box
A software factory in a boxA software factory in a box
A software factory in a boxSilvio Gulizia
 
Symfony Components in the wild
Symfony Components in the wildSymfony Components in the wild
Symfony Components in the wildPHPLondon
 
How Plone's Security Works
How Plone's Security WorksHow Plone's Security Works
How Plone's Security WorksMatthew Wilkes
 
Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Fabien Potencier
 
Colony, modularity the easy way
Colony, modularity the easy wayColony, modularity the easy way
Colony, modularity the easy wayHive Solutions
 
Learning Symfony2 by practice
Learning Symfony2 by practiceLearning Symfony2 by practice
Learning Symfony2 by practiceVytautas Beliunas
 
Symfonydrupalcampleuven2 130917015532-phpapp02
Symfonydrupalcampleuven2 130917015532-phpapp02Symfonydrupalcampleuven2 130917015532-phpapp02
Symfonydrupalcampleuven2 130917015532-phpapp02tvlooy
 
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)Intracto digital agency
 

Similar to Symony2 A Next Generation PHP Framework (20)

Introduction to symfony2
Introduction to symfony2Introduction to symfony2
Introduction to symfony2
 
An introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersAn introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developers
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013
 
Symfony
SymfonySymfony
Symfony
 
Integrating symfony and Zend Framework
Integrating symfony and Zend FrameworkIntegrating symfony and Zend Framework
Integrating symfony and Zend Framework
 
Starting with Symfony2
Starting with Symfony2Starting with Symfony2
Starting with Symfony2
 
Symfony State Of The Union, March 2010
Symfony State Of The Union, March 2010Symfony State Of The Union, March 2010
Symfony State Of The Union, March 2010
 
Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)Integrating symfony and Zend Framework (PHPNW09)
Integrating symfony and Zend Framework (PHPNW09)
 
Caridy patino - node-js
Caridy patino - node-jsCaridy patino - node-js
Caridy patino - node-js
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JS
 
Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)Integrating symfony and Zend Framework (PHPBarcelona 2009)
Integrating symfony and Zend Framework (PHPBarcelona 2009)
 
A software factory in a box
A software factory in a boxA software factory in a box
A software factory in a box
 
Symfony Components in the wild
Symfony Components in the wildSymfony Components in the wild
Symfony Components in the wild
 
How Plone's Security Works
How Plone's Security WorksHow Plone's Security Works
How Plone's Security Works
 
Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3
 
Software Factory in a Box
Software Factory in a BoxSoftware Factory in a Box
Software Factory in a Box
 
Colony, modularity the easy way
Colony, modularity the easy wayColony, modularity the easy way
Colony, modularity the easy way
 
Learning Symfony2 by practice
Learning Symfony2 by practiceLearning Symfony2 by practice
Learning Symfony2 by practice
 
Symfonydrupalcampleuven2 130917015532-phpapp02
Symfonydrupalcampleuven2 130917015532-phpapp02Symfonydrupalcampleuven2 130917015532-phpapp02
Symfonydrupalcampleuven2 130917015532-phpapp02
 
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)
An introduction to the Symfony Standard Edition (Drupalcamp Leuven 2013)
 

More from Ryan Weaver

Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoRyan Weaver
 
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017The Coolest Symfony Components you’ve never heard of - DrupalCon 2017
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017Ryan Weaver
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
 
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreSymfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreRyan Weaver
 
Symfony: Your Next Microframework (SymfonyCon 2015)
Symfony: Your Next Microframework (SymfonyCon 2015)Symfony: Your Next Microframework (SymfonyCon 2015)
Symfony: Your Next Microframework (SymfonyCon 2015)Ryan Weaver
 
Guard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityGuard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityRyan Weaver
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatGrand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatRyan Weaver
 
Master the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and SilexMaster the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and SilexRyan Weaver
 
Silex: Microframework y camino fácil de aprender Symfony
Silex: Microframework y camino fácil de aprender SymfonySilex: Microframework y camino fácil de aprender Symfony
Silex: Microframework y camino fácil de aprender SymfonyRyan Weaver
 
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love itDrupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love itRyan Weaver
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsRyan Weaver
 
A PHP Christmas Miracle - 3 Frameworks, 1 app
A PHP Christmas Miracle - 3 Frameworks, 1 appA PHP Christmas Miracle - 3 Frameworks, 1 app
A PHP Christmas Miracle - 3 Frameworks, 1 appRyan Weaver
 
Doctrine2 In 10 Minutes
Doctrine2 In 10 MinutesDoctrine2 In 10 Minutes
Doctrine2 In 10 MinutesRyan Weaver
 
The Art of Doctrine Migrations
The Art of Doctrine MigrationsThe Art of Doctrine Migrations
The Art of Doctrine MigrationsRyan Weaver
 

More from Ryan Weaver (15)

Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San Francisco
 
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017The Coolest Symfony Components you’ve never heard of - DrupalCon 2017
The Coolest Symfony Components you’ve never heard of - DrupalCon 2017
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
 
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreSymfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
 
Symfony: Your Next Microframework (SymfonyCon 2015)
Symfony: Your Next Microframework (SymfonyCon 2015)Symfony: Your Next Microframework (SymfonyCon 2015)
Symfony: Your Next Microframework (SymfonyCon 2015)
 
Guard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful SecurityGuard Authentication: Powerful, Beautiful Security
Guard Authentication: Powerful, Beautiful Security
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatGrand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
 
Master the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and SilexMaster the New Core of Drupal 8 Now: with Symfony and Silex
Master the New Core of Drupal 8 Now: with Symfony and Silex
 
Silex: Microframework y camino fácil de aprender Symfony
Silex: Microframework y camino fácil de aprender SymfonySilex: Microframework y camino fácil de aprender Symfony
Silex: Microframework y camino fácil de aprender Symfony
 
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love itDrupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 
The Wonderful World of Symfony Components
The Wonderful World of Symfony ComponentsThe Wonderful World of Symfony Components
The Wonderful World of Symfony Components
 
A PHP Christmas Miracle - 3 Frameworks, 1 app
A PHP Christmas Miracle - 3 Frameworks, 1 appA PHP Christmas Miracle - 3 Frameworks, 1 app
A PHP Christmas Miracle - 3 Frameworks, 1 app
 
Doctrine2 In 10 Minutes
Doctrine2 In 10 MinutesDoctrine2 In 10 Minutes
Doctrine2 In 10 Minutes
 
The Art of Doctrine Migrations
The Art of Doctrine MigrationsThe Art of Doctrine Migrations
The Art of Doctrine Migrations
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Symony2 A Next Generation PHP Framework

  • 1. Symfony2 The Next Generation PHP Framework Ryan Weaver @weaverryan Thursday, May 12, 2011
  • 2. Who is this dude? • Co-author of the Symfony2 Docs • Core Symfony2 contributor • Founder of KnpLabs US • Boyfriend of the much more talented @leannapelham http://www.knplabs.com/en http://www.github.com/weaverryan Thursday, May 12, 2011
  • 3. KnpLabs Quality. Innovation. Excitement. • Your symfony/Symfony2 development experts • Active in a ton of open source initiatives • Consulting, application auditing and training http://bit.ly/symfony-training Thursday, May 12, 2011
  • 4. Act 1: What is Symphony? Symfony! Thursday, May 12, 2011
  • 5. A Bunch of Standalone Libs Routing HttpFoundation Doctrine2 DBAL Security DependencyInjection EventDispatcher Assetic Translation Form Validator Monolog Doctrine2 ORM Twig ClassLoader HttpKernel Doctrine2 ODM SwiftMailer Serializer Templating CSSSelector Console BrowserKit Yaml Process DomCrawler Finder Thursday, May 12, 2011
  • 6. A Bunch of Standalone Libs Symfony is a group of Routing HttpFoundation Doctrine2 DBAL Security standalone components and DependencyInjection EventDispatcher Assetic Translation other standalone PHP libraries Form Validator Monolog Doctrine2 ORM Twig Decoupled building blocks for ClassLoader HttpKernel Doctrine2 ODM SwiftMailer Serializer any web application BrowserKit Templating CSSSelector Console Yaml Process DomCrawler Finder Thursday, May 12, 2011
  • 7. Routing DependencyInjection HttpFoundation Assetic Doctrine2 DBAL Security Form Validator HttpKernel EventDispatcher Doctrine2 ORM Twig Translation ClassLoader Process Templating Monolog CSSSelector Doctrine2 ODM SwiftMailer Serializer Yaml DomCrawler Console Finder BrowserKit What is the Symfony2 Framework? • A set of bundles containing configuration and bridge classes • These glue the components together, giving the developer a consistent experience Thursday, May 12, 2011
  • 8. Routing DependencyInjection HttpFoundation Assetic Doctrine2 DBAL Security Form Validator HttpKernel EventDispatcher Doctrine2 ORM Twig Translation ClassLoader Process Templating Monolog CSSSelector Doctrine2 ODM SwiftMailer Serializer Yaml DomCrawler Console Finder BrowserKit FrameworkBundle SecurityBundle DoctrineBundle TwigBundle MonologBundle SwiftmailerBundle WebProfilerBundle AsseticBundle The Symfony2 Framework Thursday, May 12, 2011
  • 9. The Flexibility of Bundles • A bundle is like a plugin, except that even the core framework is implemented as bundles • Your code is an equal citizen with the core FrameworkBundle SecurityBundle AcmeBlogBundle AcmeTwigBundle TwigBundle MonologBundle AcmeAccountBundle WebProfilerBundle Thursday, May 12, 2011
  • 10. Symfony2 is a set of standalone PHP component libraries, glued together by a group of removable “bundles” Thursday, May 12, 2011
  • 11. Act 2: Keep Things Simple Thursday, May 12, 2011
  • 12. From space, the Web is stupid-simple the request /foo Client Your App (e.g. browser) <h1>FOO!</h1> the response Thursday, May 12, 2011
  • 13. HTTP Request-Response • Your job is always to generate and return a response • Symfony’s goal is to: • take care of repetitive tasks (e.g. routing) • allow your code to be organized • offer optional tools for complex tasks (e.g. security, forms, etc) • to stay the hell out of your way! Thursday, May 12, 2011
  • 14. Keep it simple: write code that represents your business logic - don’t bend to your framework Thursday, May 12, 2011
  • 15. Act 3: Symfony in Action Thursday, May 12, 2011
  • 16. Symfony Distributions • Symfony offers “distributions” (think Ubuntu) • Download the “Standard Distribution” to instantly have a functional application • Default Project Structure • Common Sense default configuration • Some demo pages to play with Start developing immediately!!! Thursday, May 12, 2011
  • 17. Step 1: Get it! http://symfony.com/download Thursday, May 12, 2011
  • 18. Step 2: Unzip it! $ cd /path/to/webroot $ tar zxvf /path/to/Symfony_Standard_Vendors_2.0.0PR11.tgz Thursday, May 12, 2011
  • 19. Step 3: Run it! http://localhost/Symfony/web/config.php Thursday, May 12, 2011
  • 20. Step 3: Run it! • This page identifies any problems with your setup • Fix them, then click “Configure your Symfony Application online” to continue Thursday, May 12, 2011
  • 21. Step 3: Configure it! If you’re into GUI’s, Symfony offers one for setting up your basic configuration Thursday, May 12, 2011
  • 22. Finished! This *is* your first Symfony2 page Thursday, May 12, 2011
  • 23. Act 4: Let’s create some pages Thursday, May 12, 2011
  • 24. The 3 Steps to a Page the request! /hello/ryan Step1: Symfony matches the URL to a route Step2: Symfony executes the controller (a the edge of a PHP function) of the route giant flower! Step3: The controller (your code) returns a Symfony Response object the response! <h1>Hello ryan!</h1> Thursday, May 12, 2011
  • 25. Hello {insert-name}! • Our goal: to create a hello world-like app • in two small steps... Thursday, May 12, 2011
  • 26. Step1: Define a route You define the routes (URLs) of your app _welcome: / pattern: / defaults: { _controller: AcmeDemoBundle:Welcome:index } hello_demo: /hello/ryan pattern: /hello/{name} defaults: { _controller: AcmeDemoBundle:Meetup:hello } Thursday, May 12, 2011
  • 27. Step1: Define a route Add the following route to app/config/routing.yml hello_demo: pattern: /hello/{name} defaults: { _controller: AcmeDemoBundle:Meetup:hello } ** Routes can also be defined in XML, PHP and as annotations Thursday, May 12, 2011
  • 28. Step 2: Symfony executes the controller of the route hello_demo: pattern: /hello/{name} defaults: { _controller: AcmeDemoBundle:Meetup:hello } AcmeDemoBundle:Meetup:hello is a shortcut for AcmeDemoBundleControllerMeetupController::helloAction() Symfony executes this PHP method Thursday, May 12, 2011
  • 29. Step2: Create the controller <?php // src/Acme/DemoBundle/Controller/MeetupController.php namespace AcmeDemoBundleController; use SymfonyComponentHttpFoundationResponse; use SymfonyBundleFrameworkBundleControllerController; class MeetupController extends Controller { public function helloAction($name) { return new Response('Hello '.$name); } } Thursday, May 12, 2011
  • 30. Step2: Create the controller <?php // src/Acme/DemoBundle/Controller/MeetupController.php namespace AcmeDemoBundleController; use SymfonyComponentHttpFoundationResponse; use SymfonyBundleFrameworkBundleControllerController; class MeetupController extends Controller { public function helloAction($name) { return new Response('Hello '.$name); } } OMG - no base controller class required! Thursday, May 12, 2011
  • 31. The Controller returns a Symfony Response object use SymfonyComponentHttpFoundationResponse; public function helloAction($name) { return new Response('Hello '.$name); } This is where *your* code goes Returning a Response object is the only requirement of a controller Thursday, May 12, 2011
  • 32. Routing Placeholders The route matches URLs like /hello/* hello_demo: pattern: /hello/{name} defaults: { _controller: AcmeDemoBundle:Meetup:hello } use SymfonyComponentHttpFoundationResponse; public function helloAction($name) { return new Response('Hello '.$name); } And gives you access to the {name} value Thursday, May 12, 2011
  • 33. It’s Alive! http://localhost/Symfony/web/app_dev.php/hello/ryan Thursday, May 12, 2011
  • 34. 2 steps to a page • Create a route that points to a controller • Do anything you want inside the controller, but eventually return a Response object Thursday, May 12, 2011
  • 35. That was easy... what are some other tools I can choose to use? Thursday, May 12, 2011
  • 36. Rendering a Template • A template is a tool that you may choose to use • A template is used to generate “presentation” code (e.g. HTML) • Keep your pretty (<div>) code away from your nerdy ($foo->sendEmail($body)) code Thursday, May 12, 2011
  • 37. Do It! Render a template in the controller public function helloAction($name) { $content = $this->renderView( 'AcmeDemoBundle:Meetup:hello.html.twig', array('name' => $name) ); return new Response($content); } Thursday, May 12, 2011
  • 38. Do it! Create the template file {# src/Acme/DemoBundle/Resources/views/Meetup/hello.html.twig #} Hello {{ name }} This is Twig Twig is a fast, secure and powerful templating engine We *LOVE* Twig... but Symfony2 fully supports Twig and regular PHP templates Thursday, May 12, 2011
  • 39. It’s Still Alive! http://localhost/Symfony/web/app_dev.php/hello/ryan Thursday, May 12, 2011
  • 40. Twig knows all kinds of tricks • Learn more about Twig: “Hands on Symfony2” on Slideshare http://bit.ly/hands-on-symfony2 “Being Dangerous with Twig” on Slideshare http://bit.ly/dangerous-with-twig Official Documentation http://www.twig-project.org Thursday, May 12, 2011
  • 41. Act 5: Shortcuts via Annotations Thursday, May 12, 2011
  • 42. The optional FrameworkExtraBundle lets you use annotations to do less work Thursday, May 12, 2011
  • 43. Put the route right on your controller /** * @extra:Route("/hello/{name}", name="hello_demo") */ public function helloAction($name) { $content = $this->renderView( 'AcmeDemoBundle:Meetup:hello.html.twig', array('name' => $name) ); return new Response($content); } Thursday, May 12, 2011
  • 44. Put the route right on your controller /** * @extra:Route("/hello/{name}", name="hello_demo") */ The PHP comments are public function helloAction($name) { $content = $this->renderView( called “annotations” 'AcmeDemoBundle:Meetup:hello.html.twig', array('name' => $name) ); return new Response($content); } Symfony can use annotations to read routing config Your route and controller are in the same place! Thursday, May 12, 2011
  • 45. Instead of rendering a template, tell Symfony to do it for you /** * @extra:Route("/hello/{name}", name="hello_demo") * @extra:Template() */ public function helloAction($name) { return array('name' => $name); } Thursday, May 12, 2011
  • 46. /** * @extra:Route("/hello/{name}", name="hello_demo") * @extra:Template() */ public function helloAction($name) { return array('name' => $name); } Controller: AcmeDemoBundle:Meetup:hello Template: AcmeDemoBundle:Meetup:hello.html.twig Thursday, May 12, 2011
  • 47. If you choose to follow conventions, you can take advantage of certain shortcuts Thursday, May 12, 2011
  • 48. Add security /** * @extra:Route("/hello/admin/{name}") * @extra:Secure(roles="ROLE_ADMIN") * @extra:Template() */ public function helloAdminAction($name) { return array('name' => $name); } Thursday, May 12, 2011
  • 49. Add caching /** * @extra:Route("/hello/{name}) * @extra:Template() * @extra:Cache(maxage="86400") */ public function helloAction($name) { return array('name' => $name); } Thursday, May 12, 2011
  • 50. Act 5: The Killer Features of Symfony2 Thursday, May 12, 2011
  • 51. #1 Crazy-Decoupled & Extensible • Composed of nearly 30 independent libraries • Your code has as many rights as the core code • Heavy use of the observer pattern (i.e. events) • Standards Compliant (e.g. PSR-0) Thursday, May 12, 2011
  • 52. #2 The Developer Experience • You’re in the driver’s seat, not the framework • Great effort has gone into expressive exception messages at every potential pain point • The Web Debug Toolbar and Profiler Thursday, May 12, 2011
  • 53. The web debug toolbar Thursday, May 12, 2011
  • 55. #3 HTTP Caching • Instead of inventing a caching strategy, Symfony uses the HTTP Cache specification public function helloAction($name) { $response = // ... $response->setMaxAge(86400); return $response; } Thursday, May 12, 2011
  • 56. #3 HTTP Caching • Symfony2 ships with a reverse proxy built in pure PHP • Swap it out for Varnish, Squid or another other HTTP cache • Native support for edge side includes (ESI) Thursday, May 12, 2011
  • 57. #4 The Security Component • Based on the Security Component of the Spring Framework • Firewalls can authenticate users via any method: HTTP Auth, X.509 certificate, form login, Twitter, etc, etc • Framework for advanced ACLs via Doctrine Thursday, May 12, 2011
  • 58. #5 Silex: The Microframework http://silex-project.org/ • Microframework built from Symfony2 Components require_once __DIR__.'/silex.phar'; $app = new SilexApplication(); $app->get('/hello/{name}', function($name) { return "Hello $name"; }); $app->run(); • It’s just that easy Thursday, May 12, 2011
  • 59. #6 The hyperactive community • 190+ core contributors • 90+ documentation contributors • 223 open source Symfony2 bundles • 74 open source Symfony2 projects ... and counting ... Thursday, May 12, 2011
  • 60. Symfony2Bundles.org • 223 open source bundles • 74 open source projects http://symfony2bundles.org/ Thursday, May 12, 2011
  • 61. And lot’s more • Cache-warming framework • Routing can be dumped as Apache rewrite rules • Service container can be dumped to Graphviz • RESTful APIS support via the RestBundle https://github.com/FriendsOfSymfony/RestBundle Thursday, May 12, 2011
  • 62. After-Dinner Mint Standalone PHP Libraries from the Symfony Community Thursday, May 12, 2011
  • 63. Assetic https://github.com/kriswallsmith/assetic • PHP asset management framework • Run CSS and JS through filters • LESS, SASS and others • Compress the assets • Compile CSS and JS into a single file each Thursday, May 12, 2011
  • 64. Behat + Mink http://behat.org/ • Behavioral-driven development framework • Write human-readable sentences that test your code (and can be run in a browser) Thursday, May 12, 2011
  • 65. Gaufrette https://github.com/knplabs/Gaufrette • PHP filesystem abstraction library // ... setup your filesystem $content = $filesystem->read('myFile'); $content = 'Hello I am the new content'; $filesystem->write('myFile', $content); • Read and write from Amazon S3 or FTP like a local filesystem Thursday, May 12, 2011
  • 66. Imagine https://github.com/avalanche123/Imagine • PHP Image manipulation library use ImagineImageBox; use ImagineImagePoint; $image->resize(new Box(15, 25)) ->rotate(45) ->crop(new Point(0, 0), new Box(45, 45)) ->save('/path/to/new/image.jpg'); • Does crazy things and has crazy docs Thursday, May 12, 2011
  • 67. Deployment with Capifony http://capifony.org/ • Capistrano deployment for symfony1 and Symfony2 $ cap deploy:setup $ cap deploy $ cap deploy:rollback Thursday, May 12, 2011
  • 68. The RestBundle • For a fully-featured RESTful API solution try out the RestBundle • Provides a view layer to enable format agnostic controllers https://github.com/FriendsOfSymfony/RestBundle Thursday, May 12, 2011
  • 69. And early support from a few big names Thursday, May 12, 2011
  • 70. PhpStorm http://www.jetbrains.com/phpstorm/ • PHP IDE now supports Twig Templates Thursday, May 12, 2011
  • 71. Support for Orchestra http://orchestra.io/ • Orchestra is a PHP platform for deploying, scaling and managing your PHP applications. • They’re awesome... • And they support Symfony2! https://orchestra.tenderapp.com/kb/frameworks/symfony2 Thursday, May 12, 2011
  • 73. Symfony2 is... • Fast as hell • Infinitely flexible • Fully-featured • Driven by a huge community • Not released yet... Currently at beta1 Thursday, May 12, 2011
  • 74. Backwards Compatibility breaks are possible, but will be well-documented Thursday, May 12, 2011
  • 75. So dive in! Thursday, May 12, 2011
  • 76. Thanks! Questions? Ryan Weaver @weaverryan Symfony2 Training in Nashville Join us May 19th & 20th Thursday, May 12, 2011
  • 77. Who is this dude? • Co-author of the Symfony2 Docs • Core Symfony2 contributor • Founder of KnpLabs US • Big geek http://www.twitter.com/weaverryan http://www.github.com/weaverryan Thursday, May 12, 2011
  • 78. KnpLabs Quality. Innovation. Excitement. • symfony/Symfony2 development • Consulting & application auditing • Symfony2 Training Thursday, May 12, 2011
  • 79. Symfony2 Training • Right here in Nashville: May 19th & 20th • real coding, real project • Doctrine2, forms, security, caching, etc • Cool libraries like Assetic, Imagine, Behat • Lot’s more • Or join is in New York City: June 6th & 7th http://bit.ly/symfony-training Thursday, May 12, 2011