SF2C4 | Web Development with Symfony2

  • This intensive Symfony2 four days workshop allows you to acquire the essentials of the Symfony2 philosophy and tools, and teaches you the best practices for developing professional web applications with PHP 5.3. This training workshop is available online. Contact us and we'll tell you how.
  • Prerequisites

    Mastering object oriented programming in PHP
  • Goals

    This four day long training course is the combination of our two best sellers workhsops entitled « SF2C1 - Getting Started with Symfony » and « SF2C2 - Mastering Symfony ». This course allows you to discover the essentials of the Symfony2 framework with the best field experts in the world. You will learn how to master the MVC design pattern, forms management, authentification and authorization principles, and of course the best practices with unit testing and HTTP caching.

Full program

Object Oriented Programming (on demand)

  • Classes and objects
  • Properties and methods
  • Constructor and destructor methods
  • Class inheritance
  • Attributes and methods scopes (visibility)
  • Error handling with exceptions
  • Namespaces

General Introduction to the Symfony Framework

  • Introducing the Symfony framework and its ecosystem
  • Installing the Symfony « Standard Edition Distribution »
  • Discovering the Symfony project architecture (application, bundles, libraries, bundles etc.)
  • Understanding the HTTP request processing workflow
  • Understanding the concept of environment (development, production and testing)
  • Introducing the coding and files naming conventions
  • Discovering the concept of a « Bundle »

Debugging the Code

  • Getting help from the « Web Debug Toolbar »
  • Introspecting the recorded logs
  • Profiling HTTP requests thanks to the « Web Profiler » application
  • Spotting problems thanks to explicit errors and exceptions stack traces

Configuring the Application

  • Comparing supported built-in configuration: XML, YAML and PHP
  • Configuring the application thanks to global settings
  • Configuration application’s routes and URLs
  • Overriding the configuration defined by a built-in or third-party « bundle »

Generating Pages for the End User

  • Introducing the Twig templates rendering engine
  • Comparing Twig and raw PHP templating strategies
  • Accessing global variables from Twig templates (request, session, user)
  • Using tags, filters and function to generate and format contents in a Twig template
  • Making templates truly extensible thanks to the template inheritance feature
  • Splitting templates into small templates chunks to avoid code duplications
  • Rendering a Symfony controller from within a Twig template
  • Generating URLs based on the application’s routes configuration
  • Rendering Symfony forms with custom Twig view helpers

Designing Controllers & Analyzing the Request

  • Designing a controller class with its action methods
  • Mapping URL patterns to Symfony controllers thanks to annotations configuration
  • Generating a raw response or a response based on a Twig template
  • Accessing client’s information from the Request object
  • Reading and writing session data
  • Reading and writing cookies’ data
  • Triggering a 404 error page when the resource is not found
  • Triggering an internal redirect to another controller to avoid code duplication
  • Redirecting the user to another page

Interacting with the End User with Forms

  • Discovering the « Form » component
  • Designing and processing simple web forms
  • Adding validation constraints on submitted form fields’ data
  • Prototyping the form rendering thanks to Twig view helpers
  • Gathering the form submitted data and processing them
  • Customizing form rendering with built-in and custom Twig form themes
  • Configuring form field types as services
  • Applying built-in validation constraint rules on submitted data
  • Applying custom validation constraint rules on submitted data
  • Contextualizing the data validation thanks to validation groups
  • Sending the form validated and filtered data by e-mail to some recipient

Internationalizing & Localizing the User Interface

  • Discovering the « Translation » component
  • Changing the default user’s locale
  • Defining custom abstract translation keys in Twig templates
  • Generating XLIFF translation catalogues skeletons
  • Translating abstract translation keys in XLIFF catalogues
  • Dealing with dynamic translations including pluralized sentences

Dependency Injection and Service Container

  • Understanding the dependency injection principle
  • Getting started with the Symfony service container
  • Listing all built-in Symfony services thanks to the command line tools
  • Registering new custom business services in the dependency injection container
  • Accessing a registered service from the service container
  • Creating and accessing global configuration parameters from the container

Contracting a Quality Insurance thanks to Automated Tests

  • Discovering the tests automation framework PHPUnit
  • Understanding the goals of automating tests (unit and functional tests)
  • Configuring an automated tests suite
  • Designing and executing a unit tests suite
  • Designing and executing a functional tests suite
  • Generating code coverage reports

Restricting Access to Secured Application's Pages

  • Getting started with authentication and authorization principles
  • Securing some application’s pages thanks to a form based authentication strategy
  • Setting up an access control policy based on user’s roles
  • Testing user’s permissions from a controller and a Twig template
  • Registering custom authorization rules thanks to the security « voters »

Improving Performances with HTTP Caching and ESI

  • Getting started with the HTTP caching workflows
  • Discovering the different kind of cache systems
  • Comparing the expiration and validation cache strategies
  • Applying expiration and validation cache constraints to generated web pages
  • Caching page fragments thanks to the ESI technology (« Edge Side Includes »)
  • Installing and configuring the Symfony’s built-in reverse-proxy cache

Querying a Relational Database System with Doctrine

  • Discovering the basics of the Doctrine ORM
  • Understanding the concepts of « entities » and « repositories »
  • Automating PHP classes and SQL queries code generation with Doctrine
  • Persisting data to the database thanks to the Doctrine ORM entity manager
  • Fetching data back from the database thanks to Doctrine
  • Building and executing custom SQL queries thanks to the Doctrine Query Builder object

  • Duration

    4 day(s)
  • Level

  • Available languages

    French, English, German, Spanish
  • Available countries

    Germany, Spain, United States, France, United Kingdom, Belgium, Switzerland, Worldwide
From €1,990.00
No session scheduled

No session is scheduled for this course. However we organize tailored training courses: contact us for more informations!