Overview
Symfony is an object-oriented PHP5 framework based on the MVC model. Symfony allows for the separation of business rules, server logic and presentation views of a web application. It also contains numerous tools and classes aimed at shortening the development time of a complex web application.
What is a framework?
A framework adds new mechanisms on top of a programming language, and these mechanisms automate many of the development patterns used for a given purpose. A framework also adds structure to the code, and pushes the developer to write better, more readable and maintainable code. A framework also makes programming easier, since it packages complex operations into simple statements.
A framework is usually developed with the same language that it extends. A PHP5 framework is a set of files written in PHP5.
A framework will add layering to an application. In general, they divide applications in three layers:
- The presentation logic handles the interactions between the user and the software
- The data source logic carries the access to a database or other data providers
- The domain logic, or business logic, is the remaining piece. It involves calculation made on inputs, manipulation of data from the presentation, and dispatching of data source logic according to the commands received from the presentation.
Web application frameworks intend to facilitate the development of... web applications (websites, Intranets, etc.). Building a basic dynamic website can be easily achieved with existing programming languages, and PHP is known for its simplicity and broadly adopted for that purpose. With PHP alone, you can already query a database, manage session cookies, access files in the server, etc. But when it comes to building a more complex website, where business logic increases the volume of code to maintain, the need of a web application framework arises.
What is symfony?
Symfony is a complete framework designed to help and speedup the development of web applications.
It is based on the following concepts:
- compatible with as many environments as possible
- easy to install and configure
- simple to learn
- enterprise ready
- convention rather than configuration, supporting fallback calls
- simple in most cases, but still flexible enough to adapt to complex cases
- most common web features included
- compliant with most of the web "best practices" and web "design patterns"
- very readable code with easy maintenance
- open source