DEV Community

An introduction to Symfony | The foundation of modern PHP applications

Bruno Paz on December 24, 2018

In this post I will give a brief introduction to Symfony and demonstrate how you can use it to build modern and performant PHP applications. This...
Collapse
 
brpaz profile image
Bruno Paz • Edited

Hello and thanks for your input.

Symfony creator is French. Maybe that´s one of the reasons Symfony is more popular in Europe?

I see Laravel a bit like Rails. Its popularity comes from its simplicity to learn, its pragmatism and the power to do stuff quickly. Many of its biggest problems also come from Rails like Active Record ;)

Symfony 4 is really easy to get started also, but I admit older versions could have felt a little bit daunting for less experienced developers, due to more complex configuration for example.

You need to understand OOP to understand Symfony.

I think Laravel tries to be more friendly to people who are starting to program and thus implement shortcuts to hide some complexity, while Symfony is more focused on the Enterprise.

But again, I dont want to transform this in Symfony vs Laravel.

Collapse
 
gregorgonzalez profile image
Gregor Gonzalez

Actually I love the comparative you make about symfony and laravel.

It's important to compare both frameworks to know similitudes and differences. I worked with laravel a whole year and symphony like 4 months. I like more symphony but every project of my clients are required on laravel.

Collapse
 
apphancer profile image
Martin

I like how you gave your reasonings in your analysis about the perks of Symfony. It would be great to also read more on things that are hard to find on blogs such as how to solve more real-life developer's problems. For example, I'd love to hear your recommendation regarding organising larger projects as you mentioned that you recommend grouping classes by business feature. Do you have any examples on this or would you be able to recommend something to read in this regards?

Collapse
 
hepisec profile image
hepisec

Thx for writing this great article on Symfony! I've returned from JavaEE to PHP with Symfony 2 years ago and everything feels so familiar. I really like the annotation based approach to configure ORM and routes. It places the necessary configuration next to the code and you don't have to switch between configuration files and application code.

Also the maker-bundle was really helpful in my last projects for quick prototyping (make:crud ;-))

Collapse
 
brpaz profile image
Bruno Paz

Yes. In some sense, I see PHP with Symfony as a somewhat lighter version of Java, at least in terms of how you structure your application. If you like OOP, Design patterns and Clean Architecture without the memory hog that is Java, you will feel at home with Symfony.

Maybe Typescript could also be a viable option for this kind of architecture.

Collapse
 
brunobandev profile image
Bruno Bandeira

Thanks for your article, I will try the Symfony 5 :)

Collapse
 
quocnho profile image
Tony Nguyễn

Thanks for your article!

Collapse
 
ahmedsliman profile image
Ahmed sliman

Thanks for your article especially the opinions it's worth figuring out

Collapse
 
deta19 profile image
mihai

good one