SlideShare a Scribd company logo
Introduction to




                                              by Pablo Godel
                              Jan 11 2012 - South Florida PHP Users Group
Wednesday, January 11, 2012
Who Am I?
⁃   Born in Argentina, living in the US since 1999
⁃   PHP & Symfony developer
⁃   Founder of the PHP mailing list in spanish
⁃   Cofounder of ServerGrove Networks
     ⁃ Founded in 2005
     ⁃ provider of web hosting specialized in PHP, Symfony,
       ZendFramework among others
     ⁃ Very active open source supporter through code
       contributions and usergroups/conference sponsoring




Wednesday, January 11, 2012
Wednesday, January 11, 2012
History of Symfony




Wednesday, January 11, 2012
Releases



  - symfony 1.0:              January 2007
  - symfony 1.2:              November 2008
  - symfony 1.4:              November 2009

  - Symfony 2.0:              July 2011
  - Symfony 2.1:              Planned for early 2012




Wednesday, January 11, 2012
symfony 1.0
                                 released on January 2007



                          “symfony is a full-stack framework, a library
                              of cohesive classes written in PHP”




  - Several libraries put together (modified Mojavi, Propel, Prado
  i18n, etc)
  - Concepts borrowed from several languages and frameworks
     - Routing, CLI, functional tests,YAML, helpers
  - One of first PHP frameworks to include a Web Debug Toolbar,
  and an Admin Generator.

Wednesday, January 11, 2012
symfony 1.0
                                     Highlights


                     - ORM integration: Propel and Doctrine
                     - YAML cascading configuration
                     - Web Debug Toolbar
                     - Admin Generator
                     - Environments
                     - CLI
                     - Functional Tests
                     - Template Caching
                     - Internationalization
                     - Documentation
                     - Plugins
                     - Awesome Community

Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Web Debug Toolbar




Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Admin Generator




Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Command Line Interface




Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Documentation




                              - A Gentle Introduction to symfony
                              - Practical symfony (jobeet tutorial)
                              - The symfony Reference Book
                              - More with symfony
                              - The API documentation




                                  http://www.symfony-project.org/doc/1_4/
Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Awesome Community

IRC #symfony & #symfony-devs

Google Groups
 symfony-users http://groups.google.com/group/symfony-users
 symfony-devs http://groups.google.com/group/symfony-devs
 symfony-es http://groups.google.com/group/symfony-es

Wiki http://trac.symfony-project.org/wiki/

Forums http://forum.symfony-project.org/

Lots of Blogs

Conferences around the world: US, France, Germany,
Spain
Wednesday, January 11, 2012
symfony 1.0
                              Highlights - Plugins




Wednesday, January 11, 2012
symfony 1 vs. Symfony 2




                                 Same philosophy

                               Rewritten from scratch




Wednesday, January 11, 2012
symfony 1 vs. Symfony 2




                              symfony 1 != Symfony2




Wednesday, January 11, 2012
symfony 1 vs. Symfony 2




                              If you used symfony 1.x

                               better forget about it.




Wednesday, January 11, 2012
Symfony 2



    “First, Symfony2 is a reusable set of standalone, decoupled,
      and cohesive PHP components that solve common web
                       development problems.
          Then, based on these components, Symfony2 is also a
                       full-stack web framework.”




                              http://fabien.potencier.org/article/49/what-is-symfony2
Wednesday, January 11, 2012
Symfony 2




                              21 High Quality
                               Components




Wednesday, January 11, 2012
Symfony 2 Components


                        •     DependencyInjection                    •   Serializer
                        •     EventDispatcher                        •   Validator
                        •     HttpFoundation                         •   Security
                        •     DomCrawler                             •   Routing
                        •     ClassLoader                            •   Console
                        •     CssSelector                            •   Process
                        •     HttpKernel                             •   Config
                        •     BrowserKit                             •   Finder
                        •     Templating                             •   Locale
                        •     Translation                            •   Yaml
                        •     Serializer                             •   Form


                                 All of them at GitHub: http://github.com/symfony
Wednesday, January 11, 2012
Symfony 2 Components


   Components Documentation
   http://symfony.com/doc/current/components/index.html



    Blog post series about creating a framework based on
    the Symfony2 Components
     http://fabien.potencier.org/




Wednesday, January 11, 2012
Symfony 2
                               Highlights


  • Rewritten from scratch for PHP 5.3
  • Based on the HTTP specification
  • Very stable and solid API (12 preview releases, 5 beta
    releases, 6 release candidates, 9 stable releases)
  • Extensible through the creation of Bundles (replacement for
    sf1 plugins)
  • Flexible configuration using YAML, XML, annotations or
    PHP
  • All configuration is compiled to PHP code and cached
  • Lots of unit tests
  • Source code audited by independent security firm thanks to
    donations of the Symfony Community

Wednesday, January 11, 2012
Symfony 2
                               Highlights



  • Extensible Configuration with Service Container/
    Dependency Injection
  • Complete redesign of Forms support
  • Validations
  • Extensible Security with Authentication/Authorization
  • Advanced and powerful templating through Twig
  • Routes configured with YAML, XML or Annotations
  • ESI Caching support out of the box
  • Assets management with Assetic
  • Translations
  • Environments


Wednesday, January 11, 2012
Symfony 2
                              Community



    •   357 developers contributed to Symfony2
    •   3000+ pull requests
    •   969 977 bundles at knpbundles.com
    •   Same very active IRC and mailing lists support channels
    •   Community Gamification through SensioLabs Connect
    •   Symfony2 Ecosystem




Wednesday, January 11, 2012
Symfony 2
                              Highlights - SensioLabs Connect




Wednesday, January 11, 2012
Symfony 2
                              Highlights - Bundles




Wednesday, January 11, 2012
Symfony 2
                              Getting Started




http://symfony.com/download




Wednesday, January 11, 2012
Symfony 2
                                 Getting Started



                   tar zxf Symfony_Standard_Vendors_2.0.9.tgz


                                        or



                      unzip Symfony_Standard_Vendors_2.0.9.zip


Wednesday, January 11, 2012
Symfony 2
                                    Getting Started




           Distributions

                     A Symfony distribution is made up of Symfony2
                          components, a selection of bundles,
                      a directory structure, a default configuration.




                                   http://symfony.com/distributions
Wednesday, January 11, 2012
Symfony 2
                               Getting Started

   Symfony Standard Distribution
      • Directory structure
      • Default configuration
      • Bundles
         ⁃ DoctrineBundle
         ⁃ JMSSecurityExtraBundle
         ⁃ SensioDistributionBundle
         ⁃ SensioFrameworkExtraBundle
         ⁃ SensioGeneratorBundle
         ⁃ AsseticBundle



                              http://symfony.com/distributions
Wednesday, January 11, 2012
Symfony 2
                              Getting Started




Wednesday, January 11, 2012
Symfony 2
                              Getting Started




Wednesday, January 11, 2012
Symfony 2
                              Directory Structure




Wednesday, January 11, 2012
Symfony 2
                              Directory Structure




Wednesday, January 11, 2012
Symfony 2
                              Directory Structure




Wednesday, January 11, 2012
Symfony 2
                              Directory Structure




Wednesday, January 11, 2012
Symfony 2
                              Configuration Files - app/config.yml




Wednesday, January 11, 2012
Symfony 2
                      Configuration Files - app/parameters.ini




Wednesday, January 11, 2012
Symfony 2
                     Configuration Files - app/config_dev.yml




Wednesday, January 11, 2012
Browser


                                   Request


                              Bootstrap (app.php)

                                  Controller

                                   Template

                                   Response
Wednesday, January 11, 2012
Bootstrap (app.php)




Wednesday, January 11, 2012
Symfony 2
                              Bootstrap File - web/app.php




Wednesday, January 11, 2012
Controllers




Wednesday, January 11, 2012
Controllers




Wednesday, January 11, 2012
Controllers




Wednesday, January 11, 2012
Controllers




Wednesday, January 11, 2012
Templates




Wednesday, January 11, 2012
Templating / Twig
  Comments:
          {# comments are not rendered #}

                              {# multi-line comments!
                                 {{ var }}
                              #}
 Output variables:
           {{ var }}
           {{ var | upper }}
           {{ var | raw }}
           {{ object.property }}
           {{ true ? ‘yes’ : ‘no’ }}
                                  http://twig.sensiolabs.org/
Wednesday, January 11, 2012
Templating / Twig

  Blocks:
       {% set var = ‘hello’ %}
       {% set foo = var ~ ’ and goodbye’ %}

                {% if foo is ‘bar’ %}
                   ...
                {% else %}
                   ...
                {% endif %}



                              http://twig.sensiolabs.org/
Wednesday, January 11, 2012
Templating / Twig

  Blocks:
       {% for key, val in list %}

                        {{ loop.index }}. {{ val }}

                {% else %}

                        No keys.

                {% endfor %}


                                http://twig.sensiolabs.org/
Wednesday, January 11, 2012
Templating / Twig
  Extends:

            {% extends "Bundle::layout.html.twig" %}

 Include:

            {% include “Bundle:Demo:template.html.twig” %}

   Render:

            {% render “Bundle:Demo:action” %}

                              http://twig.sensiolabs.org/
Wednesday, January 11, 2012
Awesome Twig Presentations

 Twig, The Flexible, Fast and Secure Template Language
 for PHP - Fabien Potencier
  http://www.slideshare.net/fabpot/twig-the-flexible-fast-and-securetemplate-
  language-for-php



  Being Dangerous with Twig - Ryan Weaver
 http://slideshare.net/weaverryan/being-dangerous-with-twig-symfony-
 live-paris



  Twig avanzado - Javier Eguiluz
   http://www.slideshare.net/javier.eguiluz/twig-avanzado-sf2vigo (Spanish)




Wednesday, January 11, 2012
Templating / Twig
                                 layout.html.twig




Wednesday, January 11, 2012
Templating / Twig
                                 index.html.twig




Wednesday, January 11, 2012
Templating / Twig
                                 index.html.twig




Wednesday, January 11, 2012
Bundles




Wednesday, January 11, 2012
Bundles




                              Everything in Symfony2 is
                                contained in Bundles




Wednesday, January 11, 2012
Bundles




                                 Even Symfony2 is
                              a collection of Bundles




Wednesday, January 11, 2012
Symfony 2
                              Directory Structure




Wednesday, January 11, 2012
Symfony 2
                   Bundles Registration - app/AppKernel.php




Wednesday, January 11, 2012
Bundles Showcase




Wednesday, January 11, 2012
Bundles Showcase




Wednesday, January 11, 2012
Bundles Showcase




Wednesday, January 11, 2012
Bundles Showcase




Wednesday, January 11, 2012
Bundles Showcase




Wednesday, January 11, 2012
Bundles Showcase




                     And many many more!




Wednesday, January 11, 2012
Forms




Wednesday, January 11, 2012
Forms
                              Definition




Wednesday, January 11, 2012
Forms
                              Presentation




Wednesday, January 11, 2012
Forms
                              Processing




Wednesday, January 11, 2012
Web Debug Toolbar
                                      &
                                   Profiler




Wednesday, January 11, 2012
Web Debug Toolbar / Profiler




Wednesday, January 11, 2012
CLI, Generator Commands
                                        Demo




Wednesday, January 11, 2012
Twig                     Silex



                               Ecosystem




                  ORM & ODM




                 Deployments
                               BDD Framework    Web Acceptance Testing

Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
Who uses Symfony2?




Wednesday, January 11, 2012
You?




Wednesday, January 11, 2012
You should :-)




Wednesday, January 11, 2012
Questions?




Wednesday, January 11, 2012
Wednesday, January 11, 2012
Thank you!


                              Slides: http://slideshare.net/pgodel

                                      Twitter: @pgodel
                                  IRC Freenode: pgodel
                              E-mail: pablo@servergrove.com



Wednesday, January 11, 2012

More Related Content

PPS
Simplify your professional web development with symfony
Francois Zaninotto
 
PPTX
PHP programmimg
Sharbani Bhattacharya
 
PDF
Being Dangerous with Twig (Symfony Live Paris)
Ryan Weaver
 
PPTX
PHP Dependency Management with Composer
Adam Englander
 
PPTX
Php technical presentation
dharmendra kumar dhakar
 
PPTX
Composer | PHP Dependency Manager
Ujjwal Ojha
 
PPTX
PHP Presentation
JIGAR MAKHIJA
 
PPT
Php Ppt
Hema Prasanth
 
Simplify your professional web development with symfony
Francois Zaninotto
 
PHP programmimg
Sharbani Bhattacharya
 
Being Dangerous with Twig (Symfony Live Paris)
Ryan Weaver
 
PHP Dependency Management with Composer
Adam Englander
 
Php technical presentation
dharmendra kumar dhakar
 
Composer | PHP Dependency Manager
Ujjwal Ojha
 
PHP Presentation
JIGAR MAKHIJA
 
Php Ppt
Hema Prasanth
 

What's hot (20)

PDF
Dependency management with Composer
Jason Grimes
 
PPT
Advantages of Choosing PHP Web Development
Grey Matter India Technologies PVT LTD
 
PPTX
PHP-MySQL Database Connectivity Using XAMPP Server
Rajiv Bhatia
 
PPT
MySQL Presentation
Manish Bothra
 
KEY
Php through the eyes of a hoster: PHPNW10
Combell NV
 
PDF
Transcode star
unweb
 
PPT
симфони это не страшно
DrupalCamp Kyiv Рысь
 
PPT
Php Ppt
vsnmurthy
 
PPTX
Comparing web frameworks
Aditya Sengupta
 
PDF
Composer Helpdesk
Sven Rautenberg
 
PDF
Drupal symfony
Tuz Valeriy
 
PDF
Composer the right way - SunshinePHP
Rafael Dohms
 
PPT
Introduction to Groovy Monkey
jervin
 
PPTX
Writing php extensions in golang
do_aki
 
PDF
12 Composer #burningkeyboards
Denis Ristic
 
PPTX
Symfony vs CodeIgniter
Mobicules Technologies
 
PDF
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Julio Bitencourt
 
PPTX
Php framework at BarCampPP
psophy
 
PPT
Os Mcmahan
oscon2007
 
Dependency management with Composer
Jason Grimes
 
Advantages of Choosing PHP Web Development
Grey Matter India Technologies PVT LTD
 
PHP-MySQL Database Connectivity Using XAMPP Server
Rajiv Bhatia
 
MySQL Presentation
Manish Bothra
 
Php through the eyes of a hoster: PHPNW10
Combell NV
 
Transcode star
unweb
 
симфони это не страшно
DrupalCamp Kyiv Рысь
 
Php Ppt
vsnmurthy
 
Comparing web frameworks
Aditya Sengupta
 
Composer Helpdesk
Sven Rautenberg
 
Drupal symfony
Tuz Valeriy
 
Composer the right way - SunshinePHP
Rafael Dohms
 
Introduction to Groovy Monkey
jervin
 
Writing php extensions in golang
do_aki
 
12 Composer #burningkeyboards
Denis Ristic
 
Symfony vs CodeIgniter
Mobicules Technologies
 
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Julio Bitencourt
 
Php framework at BarCampPP
psophy
 
Os Mcmahan
oscon2007
 
Ad

Viewers also liked (20)

PDF
Symfony tips and tricks
Javier Eguiluz
 
PPTX
Symfony2 Introduction Presentation
Nerd Tzanetopoulos
 
PDF
Google Map маркеры вместе с Symfony2
Aliaksandr Harbunou
 
PDF
Php Model-View-Controller Frameworks
David Badura
 
PPS
Codeigniter, a MVC framework for beginner
aminbd
 
PPTX
Codeigniter Introduction
Ashfan Ahamed
 
PDF
Symfony 2
Kris Wallsmith
 
PDF
Symfony 3
Emre YILMAZ
 
PDF
30 Symfony Best Practices
Nicolas Perriault
 
PPT
Benefits of the CodeIgniter Framework
Toby Beresford
 
PPTX
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
PPT
Disk scheduling
J.T.A.JONES
 
PDF
Usw update-tuesday
Hamilton Steelworkers Council
 
PDF
20110907102119431
Mark Chung
 
PDF
Beyond the Paycheck: Stanford GSB Lecture to Net Impact Conference
Wayne Dunn
 
PPT
Government and economics 1-2
cyndalea
 
PPT
Proposal for Online Course Evaluations
igoteach
 
PPTX
SHAHU MAHARAJ
Rahul Gavade
 
PPTX
Raycom gfx redesign
Josh Johnson
 
DOCX
Production log
FirstClassProductions
 
Symfony tips and tricks
Javier Eguiluz
 
Symfony2 Introduction Presentation
Nerd Tzanetopoulos
 
Google Map маркеры вместе с Symfony2
Aliaksandr Harbunou
 
Php Model-View-Controller Frameworks
David Badura
 
Codeigniter, a MVC framework for beginner
aminbd
 
Codeigniter Introduction
Ashfan Ahamed
 
Symfony 2
Kris Wallsmith
 
Symfony 3
Emre YILMAZ
 
30 Symfony Best Practices
Nicolas Perriault
 
Benefits of the CodeIgniter Framework
Toby Beresford
 
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
Disk scheduling
J.T.A.JONES
 
Usw update-tuesday
Hamilton Steelworkers Council
 
20110907102119431
Mark Chung
 
Beyond the Paycheck: Stanford GSB Lecture to Net Impact Conference
Wayne Dunn
 
Government and economics 1-2
cyndalea
 
Proposal for Online Course Evaluations
igoteach
 
SHAHU MAHARAJ
Rahul Gavade
 
Raycom gfx redesign
Josh Johnson
 
Production log
FirstClassProductions
 
Ad

Similar to Introduction to symfony2 (20)

PDF
Symony2 A Next Generation PHP Framework
Ryan Weaver
 
PDF
Symfony2 San Francisco Meetup 2009
Fabien Potencier
 
PDF
Welcome to the Symfony2 World - FOSDEM 2013
Lukas Smith
 
PDF
Symfony 2.0 on PHP 5.3
Fabien Potencier
 
PDF
Symfony Components 2.0 on PHP 5.3
Fabien Potencier
 
PDF
Exploring Symfony2
Noel GUILBERT
 
PDF
A Practical Introduction to Symfony2
Kris Wallsmith
 
PDF
Symfony2: Get your project started
Ryan Weaver
 
PDF
Symfony 2.0
GrUSP
 
PDF
Introducing symfony
Wildan Maulana
 
PDF
symfony_from_scratch
tutorialsruby
 
PDF
symfony_from_scratch
tutorialsruby
 
PDF
Symfony - Introduction
Piers Warmers
 
PPT
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Antonio Peric-Mazar
 
PDF
Symfony quick tour_2.3
Frédéric Delorme
 
KEY
Symfony 2 - Auckland Web Meetup 20x20
Keri Henare
 
KEY
Symfony2 - A Short Introduction
Andy Grunwald
 
PDF
Symfony 2 (PHP day 2009)
Fabien Potencier
 
PPTX
Symfony2
Nursultan Turdaliev
 
PDF
Which Tools Are The Best For Symfony Projects_.pdf
Moon Technolabs Pvt. Ltd.
 
Symony2 A Next Generation PHP Framework
Ryan Weaver
 
Symfony2 San Francisco Meetup 2009
Fabien Potencier
 
Welcome to the Symfony2 World - FOSDEM 2013
Lukas Smith
 
Symfony 2.0 on PHP 5.3
Fabien Potencier
 
Symfony Components 2.0 on PHP 5.3
Fabien Potencier
 
Exploring Symfony2
Noel GUILBERT
 
A Practical Introduction to Symfony2
Kris Wallsmith
 
Symfony2: Get your project started
Ryan Weaver
 
Symfony 2.0
GrUSP
 
Introducing symfony
Wildan Maulana
 
symfony_from_scratch
tutorialsruby
 
symfony_from_scratch
tutorialsruby
 
Symfony - Introduction
Piers Warmers
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Antonio Peric-Mazar
 
Symfony quick tour_2.3
Frédéric Delorme
 
Symfony 2 - Auckland Web Meetup 20x20
Keri Henare
 
Symfony2 - A Short Introduction
Andy Grunwald
 
Symfony 2 (PHP day 2009)
Fabien Potencier
 
Which Tools Are The Best For Symfony Projects_.pdf
Moon Technolabs Pvt. Ltd.
 

More from Pablo Godel (20)

PDF
SymfonyCon Cluj 2017 - Symfony at OpenSky
Pablo Godel
 
PDF
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Pablo Godel
 
PDF
DeSymfony 2017 - Symfony en OpenSky
Pablo Godel
 
PDF
Deploying Symfony | symfony.cat
Pablo Godel
 
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PDF
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
Pablo Godel
 
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PDF
The Modern Developer Toolbox
Pablo Godel
 
PDF
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
Pablo Godel
 
PDF
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
Pablo Godel
 
PDF
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
Pablo Godel
 
PDF
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Pablo Godel
 
PDF
Lone StarPHP 2013 - Building Web Apps from a New Angle
Pablo Godel
 
PDF
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
Pablo Godel
 
PDF
Creating Mobile Apps With PHP & Symfony2
Pablo Godel
 
PDF
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
PDF
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
PDF
Soflophp 2013 - SysAdmin skills for PHP developers
Pablo Godel
 
PDF
Symfony2 and MongoDB - MidwestPHP 2013
Pablo Godel
 
PDF
Rock Solid Deployment of Web Applications
Pablo Godel
 
SymfonyCon Cluj 2017 - Symfony at OpenSky
Pablo Godel
 
Symfony Live San Francisco 2017 - Symfony @ OpenSky
Pablo Godel
 
DeSymfony 2017 - Symfony en OpenSky
Pablo Godel
 
Deploying Symfony | symfony.cat
Pablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
La Caja de Herramientas del Desarrollador Moderno PHPConferenceAR
Pablo Godel
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
The Modern Developer Toolbox
Pablo Godel
 
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
Pablo Godel
 
PHP Conference Argentina 2013 - Deployment de aplicaciones PHP a prueba de balas
Pablo Godel
 
php[architect] Summit Series DevOps 2013 - Rock solid deployment of PHP apps
Pablo Godel
 
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Pablo Godel
 
Lone StarPHP 2013 - Building Web Apps from a New Angle
Pablo Godel
 
deSymfony 2013 - Creando aplicaciones web desde otro ángulo con Symfony y A...
Pablo Godel
 
Creating Mobile Apps With PHP & Symfony2
Pablo Godel
 
Tek13 - Creating Mobile Apps with PHP and Symfony
Pablo Godel
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
Soflophp 2013 - SysAdmin skills for PHP developers
Pablo Godel
 
Symfony2 and MongoDB - MidwestPHP 2013
Pablo Godel
 
Rock Solid Deployment of Web Applications
Pablo Godel
 

Recently uploaded (20)

PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Software Development Company | KodekX
KodekX
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Software Development Company | KodekX
KodekX
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 

Introduction to symfony2

  • 1. Introduction to by Pablo Godel Jan 11 2012 - South Florida PHP Users Group Wednesday, January 11, 2012
  • 2. Who Am I? ⁃ Born in Argentina, living in the US since 1999 ⁃ PHP & Symfony developer ⁃ Founder of the PHP mailing list in spanish ⁃ Cofounder of ServerGrove Networks ⁃ Founded in 2005 ⁃ provider of web hosting specialized in PHP, Symfony, ZendFramework among others ⁃ Very active open source supporter through code contributions and usergroups/conference sponsoring Wednesday, January 11, 2012
  • 4. History of Symfony Wednesday, January 11, 2012
  • 5. Releases - symfony 1.0: January 2007 - symfony 1.2: November 2008 - symfony 1.4: November 2009 - Symfony 2.0: July 2011 - Symfony 2.1: Planned for early 2012 Wednesday, January 11, 2012
  • 6. symfony 1.0 released on January 2007 “symfony is a full-stack framework, a library of cohesive classes written in PHP” - Several libraries put together (modified Mojavi, Propel, Prado i18n, etc) - Concepts borrowed from several languages and frameworks - Routing, CLI, functional tests,YAML, helpers - One of first PHP frameworks to include a Web Debug Toolbar, and an Admin Generator. Wednesday, January 11, 2012
  • 7. symfony 1.0 Highlights - ORM integration: Propel and Doctrine - YAML cascading configuration - Web Debug Toolbar - Admin Generator - Environments - CLI - Functional Tests - Template Caching - Internationalization - Documentation - Plugins - Awesome Community Wednesday, January 11, 2012
  • 8. symfony 1.0 Highlights - Web Debug Toolbar Wednesday, January 11, 2012
  • 9. symfony 1.0 Highlights - Admin Generator Wednesday, January 11, 2012
  • 10. symfony 1.0 Highlights - Command Line Interface Wednesday, January 11, 2012
  • 11. symfony 1.0 Highlights - Documentation - A Gentle Introduction to symfony - Practical symfony (jobeet tutorial) - The symfony Reference Book - More with symfony - The API documentation http://www.symfony-project.org/doc/1_4/ Wednesday, January 11, 2012
  • 12. symfony 1.0 Highlights - Awesome Community IRC #symfony & #symfony-devs Google Groups symfony-users http://groups.google.com/group/symfony-users symfony-devs http://groups.google.com/group/symfony-devs symfony-es http://groups.google.com/group/symfony-es Wiki http://trac.symfony-project.org/wiki/ Forums http://forum.symfony-project.org/ Lots of Blogs Conferences around the world: US, France, Germany, Spain Wednesday, January 11, 2012
  • 13. symfony 1.0 Highlights - Plugins Wednesday, January 11, 2012
  • 14. symfony 1 vs. Symfony 2 Same philosophy Rewritten from scratch Wednesday, January 11, 2012
  • 15. symfony 1 vs. Symfony 2 symfony 1 != Symfony2 Wednesday, January 11, 2012
  • 16. symfony 1 vs. Symfony 2 If you used symfony 1.x better forget about it. Wednesday, January 11, 2012
  • 17. Symfony 2 “First, Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP components that solve common web development problems. Then, based on these components, Symfony2 is also a full-stack web framework.” http://fabien.potencier.org/article/49/what-is-symfony2 Wednesday, January 11, 2012
  • 18. Symfony 2 21 High Quality Components Wednesday, January 11, 2012
  • 19. Symfony 2 Components • DependencyInjection • Serializer • EventDispatcher • Validator • HttpFoundation • Security • DomCrawler • Routing • ClassLoader • Console • CssSelector • Process • HttpKernel • Config • BrowserKit • Finder • Templating • Locale • Translation • Yaml • Serializer • Form All of them at GitHub: http://github.com/symfony Wednesday, January 11, 2012
  • 20. Symfony 2 Components Components Documentation http://symfony.com/doc/current/components/index.html Blog post series about creating a framework based on the Symfony2 Components http://fabien.potencier.org/ Wednesday, January 11, 2012
  • 21. Symfony 2 Highlights • Rewritten from scratch for PHP 5.3 • Based on the HTTP specification • Very stable and solid API (12 preview releases, 5 beta releases, 6 release candidates, 9 stable releases) • Extensible through the creation of Bundles (replacement for sf1 plugins) • Flexible configuration using YAML, XML, annotations or PHP • All configuration is compiled to PHP code and cached • Lots of unit tests • Source code audited by independent security firm thanks to donations of the Symfony Community Wednesday, January 11, 2012
  • 22. Symfony 2 Highlights • Extensible Configuration with Service Container/ Dependency Injection • Complete redesign of Forms support • Validations • Extensible Security with Authentication/Authorization • Advanced and powerful templating through Twig • Routes configured with YAML, XML or Annotations • ESI Caching support out of the box • Assets management with Assetic • Translations • Environments Wednesday, January 11, 2012
  • 23. Symfony 2 Community • 357 developers contributed to Symfony2 • 3000+ pull requests • 969 977 bundles at knpbundles.com • Same very active IRC and mailing lists support channels • Community Gamification through SensioLabs Connect • Symfony2 Ecosystem Wednesday, January 11, 2012
  • 24. Symfony 2 Highlights - SensioLabs Connect Wednesday, January 11, 2012
  • 25. Symfony 2 Highlights - Bundles Wednesday, January 11, 2012
  • 26. Symfony 2 Getting Started http://symfony.com/download Wednesday, January 11, 2012
  • 27. Symfony 2 Getting Started tar zxf Symfony_Standard_Vendors_2.0.9.tgz or unzip Symfony_Standard_Vendors_2.0.9.zip Wednesday, January 11, 2012
  • 28. Symfony 2 Getting Started Distributions A Symfony distribution is made up of Symfony2 components, a selection of bundles, a directory structure, a default configuration. http://symfony.com/distributions Wednesday, January 11, 2012
  • 29. Symfony 2 Getting Started Symfony Standard Distribution • Directory structure • Default configuration • Bundles ⁃ DoctrineBundle ⁃ JMSSecurityExtraBundle ⁃ SensioDistributionBundle ⁃ SensioFrameworkExtraBundle ⁃ SensioGeneratorBundle ⁃ AsseticBundle http://symfony.com/distributions Wednesday, January 11, 2012
  • 30. Symfony 2 Getting Started Wednesday, January 11, 2012
  • 31. Symfony 2 Getting Started Wednesday, January 11, 2012
  • 32. Symfony 2 Directory Structure Wednesday, January 11, 2012
  • 33. Symfony 2 Directory Structure Wednesday, January 11, 2012
  • 34. Symfony 2 Directory Structure Wednesday, January 11, 2012
  • 35. Symfony 2 Directory Structure Wednesday, January 11, 2012
  • 36. Symfony 2 Configuration Files - app/config.yml Wednesday, January 11, 2012
  • 37. Symfony 2 Configuration Files - app/parameters.ini Wednesday, January 11, 2012
  • 38. Symfony 2 Configuration Files - app/config_dev.yml Wednesday, January 11, 2012
  • 39. Browser Request Bootstrap (app.php) Controller Template Response Wednesday, January 11, 2012
  • 41. Symfony 2 Bootstrap File - web/app.php Wednesday, January 11, 2012
  • 47. Templating / Twig Comments: {# comments are not rendered #} {# multi-line comments! {{ var }} #} Output variables: {{ var }} {{ var | upper }} {{ var | raw }} {{ object.property }} {{ true ? ‘yes’ : ‘no’ }} http://twig.sensiolabs.org/ Wednesday, January 11, 2012
  • 48. Templating / Twig Blocks: {% set var = ‘hello’ %} {% set foo = var ~ ’ and goodbye’ %} {% if foo is ‘bar’ %} ... {% else %} ... {% endif %} http://twig.sensiolabs.org/ Wednesday, January 11, 2012
  • 49. Templating / Twig Blocks: {% for key, val in list %} {{ loop.index }}. {{ val }} {% else %} No keys. {% endfor %} http://twig.sensiolabs.org/ Wednesday, January 11, 2012
  • 50. Templating / Twig Extends: {% extends "Bundle::layout.html.twig" %} Include: {% include “Bundle:Demo:template.html.twig” %} Render: {% render “Bundle:Demo:action” %} http://twig.sensiolabs.org/ Wednesday, January 11, 2012
  • 51. Awesome Twig Presentations Twig, The Flexible, Fast and Secure Template Language for PHP - Fabien Potencier http://www.slideshare.net/fabpot/twig-the-flexible-fast-and-securetemplate- language-for-php Being Dangerous with Twig - Ryan Weaver http://slideshare.net/weaverryan/being-dangerous-with-twig-symfony- live-paris Twig avanzado - Javier Eguiluz http://www.slideshare.net/javier.eguiluz/twig-avanzado-sf2vigo (Spanish) Wednesday, January 11, 2012
  • 52. Templating / Twig layout.html.twig Wednesday, January 11, 2012
  • 53. Templating / Twig index.html.twig Wednesday, January 11, 2012
  • 54. Templating / Twig index.html.twig Wednesday, January 11, 2012
  • 56. Bundles Everything in Symfony2 is contained in Bundles Wednesday, January 11, 2012
  • 57. Bundles Even Symfony2 is a collection of Bundles Wednesday, January 11, 2012
  • 58. Symfony 2 Directory Structure Wednesday, January 11, 2012
  • 59. Symfony 2 Bundles Registration - app/AppKernel.php Wednesday, January 11, 2012
  • 65. Bundles Showcase And many many more! Wednesday, January 11, 2012
  • 67. Forms Definition Wednesday, January 11, 2012
  • 68. Forms Presentation Wednesday, January 11, 2012
  • 69. Forms Processing Wednesday, January 11, 2012
  • 70. Web Debug Toolbar & Profiler Wednesday, January 11, 2012
  • 71. Web Debug Toolbar / Profiler Wednesday, January 11, 2012
  • 72. CLI, Generator Commands Demo Wednesday, January 11, 2012
  • 73. Twig Silex Ecosystem ORM & ODM Deployments BDD Framework Web Acceptance Testing Wednesday, January 11, 2012
  • 74. Who uses Symfony2? Wednesday, January 11, 2012
  • 75. Who uses Symfony2? Wednesday, January 11, 2012
  • 76. Who uses Symfony2? Wednesday, January 11, 2012
  • 77. Who uses Symfony2? Wednesday, January 11, 2012
  • 78. Who uses Symfony2? Wednesday, January 11, 2012
  • 79. Who uses Symfony2? Wednesday, January 11, 2012
  • 81. You should :-) Wednesday, January 11, 2012
  • 84. Thank you! Slides: http://slideshare.net/pgodel Twitter: @pgodel IRC Freenode: pgodel E-mail: [email protected] Wednesday, January 11, 2012