We all understand how challenging developers’ lives can be. No developer wants to spend time dealing with buggy software! That being said, the importance of software development is undeniable.
Isn’t the best scenario where you can write less code with minimum error, or have more productivity and readily available software? Well, you have ability to make this dream come true with Symfony, which simplifies the coding work and allows developers to create web applications without boilerplate and extensive coding.
Symfony framework aims to save time and reduce hectic coding for developers. The framework makes life easier by providing a readily available components and friendly configuration. And what’s more? In this article, we will find out things which makes Symfony good and be benefit for you in every aspects.
1. Coding speed
Flex
Reducing development time means increasing time-to-market. Then Symfony can boost up the speed of development thanks to Flex. As we said in the previous article, Symfony organizes application code using bundle system and Flex is used as a tool for installing and managing applications. Using a set of automated instructions to integrate packages, Flex Recipes allows bundles configurations to be added automatically.
Autowiring
Autowiring saves a lot of time for developers. It allows you to manage services in the container with minimal configuration. You just write the code, and the container will take care of recreational problems.
Doctrine
Instead of providing a component to work with the database, Symfony give us the integration with a third party library – Doctrine. As usual with a popular ORM for Symfony. Doctrine speeds up a lot developments.
2. Code quality
The framework is without a doubt the cleanest PHP framework. Apart from being reusable, components standalone goals make them extremely stable, especially when they focus on a small task and do it right – the UNIX way.
3. Modularity
The module-based architecture helps any project built on Symfony is highly extensible. Symfony has all the tools for to be extended properly.
Dependency Injection
Dependency injection combined with interface as contracts. Most of Symfony core objects have dependency to interfaces, the container resolve them to concrete class. This mean you could create a class that implements this interface and configure the container to inject your class to the core objects.
Service decoration
You can configure the container to decorate some service with a wrapper class of your own. It usually works this way:
- A class is composed of the decorated service
- This class add some functionnality before or after calling the decorated service
- The container is configured to return the decoration (or wrapper) instead of the decorated.
Events
Some components use event dispatcher, this is an obvious way to add some function the a working core. Any class can listen to this event and be notified when this specific happens in the application.
4. Separation of concerns
Most developers which produced something on Symfony do not know anything of its core. And it turn out a good thing, at least for Symfony. It means the code is expresive enough to be used without much comprehension as the way it is. Using Symfony 4, you can easily build a web application following a 1 hour tutorial.
5. Tested
The whole framework is well tested, the tools used by the core to test itself can be used to test your application code.
- CssCrawler
- Http
- Symfony\Bundle\FrameworkBundle\Test\WebTestCase
PHPUnit Bridge helps unit testing become easier. It provides utilities to report legacy tests and usage of deprecated code and a helper for time-sensitive test. In general, Symfony provides many really good tools for functional, behavioral and unit testing. The process which has been automated saves a lot of time and effort for developers.
6. Ecosystem
API Platform
REST API binded to Doctrine Entity definitions
Sonata Admin
Administration back-office binded to Doctrine Entity definitions
LiipImagineBundle
Bundle to intregate Imagine PHP library
Twig
Templating engine
SymfonyCloud
Application deployment
7. Community
Symfony framework is really easy to use, even with the beginners. Symfony provides both newbies and experienced developers a complete and detailed documentation, which is considered to be one of the most useful written data for PHP-framework users. Everything in the documentation is well written, explained and simplified with examples. Symfony community is also extremely supportive and helpful. In a lot of cases, configuration and mechanism are provided to enhance application performance.
Contributors
Symfony community has over 600.000 passionate developers from all over the world. Among them, there are ~ 2.000 contributors on main Symfony project.
Conferences
Symfony related event will be held throughout the year in many countries. The updated events have been listed out here: https://symfony.com/events/
Documentation
Symfony documentation has been able to access via online and offline channel, having ~2.000 contributors working on it.
https://github.com/symfony/symfony-docs
Stackoverflow
Stackoverflow is certainly a familiar name towards any professional and enthusiast developers. Having many topics and answers on this site, Symfony with its active community will help you to find the useful solution and broaden your knowledge.
“Simple is the best” – Symfony highlights this philosophy with its aiming to simplify and accelerate the development time. It’s one of the most powerful and stable PHP framework, which let you have ability to deal with complex requirements having many potential changes ahead.
If you are a fan of PHP frameworks in general, or of Symfony specifically, then please follow the SutuBlog and keep on reading incoming new posts!
As we love Symfony and through the process of building different things with the framework, we hope that our blog posts can help you learn something new, or improve something that you already know! Don’t forget to share this blog post if you think it would be helpful for other developers in the community.
Please don’t hesitate to comment down below or contact us if you have any question 😉 We are excited and look forward to sharing more knowledge with you!