Symfony, at its core, is a robust framework. While implementing it may not be as simple as CodeIgniter or Laravel, it makes up for this with an architecture and a structure for large and complex solutions. It's so vast that other frameworks and projects take it as their starting point, the most accepted one being Laravel, which is one of the most popular PHP frameworks nowadays.
- [Narrator] Symfony is not a single component or tool, Symfony is and I quote, a set of PHP components, a Web Application framework, a Philosophy, and a Community, all working together in harmony. Symfony's philosophy is embracing standards, practices, but above all, interoperability among applications, that is, that components in Symfony may work with other frameworks, and as such are not quote unquote married to Symfony.
The Symfony community is one of the largest PHP-based communities, and have come to be a living proof that PHP can be used in large enterprises. Symfony as a framework is one of the veterans out there, while it may not be the simplest to use, Coding Matter is much easier, Symfony has a rich feature set and is ready to be used in medium to large applications. Let's first define a framework. A framework is a tool set ready to be implemented on different scenarios.
It's a previously packaged solution to make your life easier as a developer. It's meant for you to write less code. A framework is basically a tested solution to commonly faced challenges that software developers encounter. Whenever we're starting a project, we have the responsibility to decide what framework to use, which will be simpler to implement, to deploy, so let me give you a few pointers as to why we would choose Symfony. Symfony is robust; in the software context, it means that Symfony has the tools needed to support large development applications.
It may be too much for some projects, but if you're thinking on a medium slash large project, Symfony is a great choice. Symfony has been heavily tested to the point of others practically using it as a starting point. The greatest example of this is Laravel. Laravel uses some of Symfony's components, such as routing, HTTP, et cetera, so they didn't have to start from scratch. Other tools that use Symfony's components are Drupal, PHP Bulletin Board, and eZ Publish.
How is this possible? Well, Symfony's decoupled philosophy is what makes this possible, practically any component in Symfony may be used in other projects or frameworks provided that they comply with certain standards. We're also responsible for knowing the drawbacks of the tools that we use and Symfony is not flawless. Let's consider when not to use Symfony, for example, if we needed a rapid development tool, and did not have the time to wait for developers to get acquainted with the framework, then Symfony may not be the choice for you.
Laravel comes in a more digested fashion and could be a better choice. The learning curve for Symfony, only at the beginning, can be quite steep, even for seasoned developers, while Symfony may be used for any application, it's not really meant for small applications. This is because Symfony has many options that we can customize. Also, setting up environments for development and production is not trivial, so while you're free to use it on small projects, at some point, you might get the feeling that you're doing way too much for a simple task.
All in all, Symfony is a great option not only as a framework, but as a philosophy to grow as a developer.
- Installing Symfony
- Setting up the local environment
- Exploring the Symfony file structure
- Creating routes
- Sending parameters to a controller
- Using views
- Updating routes
- Creating templates with Twig
- Data modeling with Symfony
- Demo application deployment