Symfony

Symfony is a 5 written in PHP open source Web Application Framework that the Model-View - Controller pattern (MVC ) follows.

  • 3.1 model
  • 3.2 View
  • 3.3 controller

History and Philosophy

Symfony is developed since 2005 under the leadership of Fabien Potencier. It was parallel to the increasing popularity of Ruby on Rails and the desire for a similar MVC framework for PHP base. Symfony tries to limit the configuration to a minimum. If no configuration is specified for the assignment of, for example, models done to database tables using the same name in singular and plural ( convention over configuration ). Through the console application simple websites can be developed using Rapid Application Development.

Version 2 was released in July 2011. It represents a major redesign in the entirely different from version 1. An easy way to migrate applications from version 1 to version 2 does not exist. The framework now consists of modules, called bundles, which are totally independent run, but can be seamlessly integrated into the framework process. By the use of a dependency injection container, the entire application is modular. This causes a simple testability and extensibility. In addition, namespaces are supported. Thus, Symfony 2 requires PHP 5.3 or higher.

Bundles

Bundles are mutually dissolved units of a web application. A guestbook bundle therefore contains all the data that are used to complete runnability of the guestbook. This includes not only the required classes, but also resources ( graphics, scripts, etc.). Developers can publish developed bundles, so that other users of Symfony 2 can implement this application units without any code changes.

Features

  • Configuration with YAML, Annotations, XML or PHP
  • Database access via ORM Layer
  • Scaffolding of CRUD interfaces
  • Request dispatcher and dynamic routing for clean URLs
  • Templates based on Twig or native PHP syntax
  • Multilingualism and I18N support
  • Data validation using constraints
  • Filtering through forms fed- malicious code
  • Components for session management, request handling and Security
  • Extensive caching the output
  • Plugin capable with Bundles

Layer

The design pattern Model-View- Controller is by Symfony implemented as follows:

Model

To store the objects two plugins come with the selection ( Doctrine and Propel ). It is OR mapper to store PHP objects in a database.

The relations between different models are defined via so-called Associations.

As of version 1.1 of the previous standard Symfony Framework Propel had been moved into a plugin and is no longer an integral part of the framework.

View

Under a view is defined as the presentation layer of the application. In the view layer can be provided by means of the controller contents, which often include templates for output. It can be embedded in a template arbitrary PHP code. Symfony ships with a so-called helper with, can create or format which expenditure in templates, such as links or forms. For recurring expenses, you can fall back on partials, which are iterated within the templates.

Controller

The controller formulates the business logic and provides interfaces to interact with it. These interfaces are, as in many other frameworks also called Actions. It is also possible parameters for the method are passed. The designer can adjust the structure of the URLs using routes very flexible.

Versions

Use

  • Drupal version 8
  • EZ Publish version 5
  • Silex ( Framework)
758083
de