What is front-end PHP

Poll with the Symfony Slack community

The story

For his diploma thesis, the frontend developer Tijn Renders was looking for a frontend that would go well with Symfony. For his research, he asked the Symfony community on Slack - and lo and behold: the Symfony survey from Renders received 195 answers, in which he asks, among other things, about the community's preferred front-end tools.

More than half of the participants were backend developers (57 percent), followed by full-stack developers (38 percent) and 5 percent from a different developer group. Most developers have 3 to 5 years of experience with Symfony and the majority are very happy with Symfony.

So which technologies and tools do Symfony developers use for their web applications?

REST or Twig?

26 percent of those surveyed use Symfony as a REST API, while 20 percent use the Twig template engine. However, a combination of the two is apparently most often used.

Renders sees flexibility as a possible reason to develop the backend and the frontend separately. The use of a separate stack for the front end creates the possibility of exchanging the client technology if necessary. Separation of concerns, the use of the backend API for other purposes (e.g. an app) and the creation of dedicated front-end and back-end teams also speak in favor of this solution.

Front-end tools

When it comes to tools, there is consensus among the survey participants. Webpack (100 answers) and NPM (85 answers) are the most popular tools. As the graphic below shows, REST is most commonly used for communication between server and client. Websockets, GraphQL and RPC follow at a great distance.

According to the results of the Symfony community, React is the most used framework (approx. 68 answers). But VueJS (55 answers) and Angular (40 answers) are also popular.

When it comes to style, the front-end community agrees, SASS is used the most (108 answers). But also with Bootstrap (80 answers) is gladly developed. A total of 68 percent of the participants used front-end components. In addition, ES6 (44 percent) is preferred over Plain Javascript (33 percent) and Typescript (23 percent).


Interesting answers were also found when asked how the developers test their applications. Almost 90 participants said they did not test their applications at all. If it is tested, then most often with Mocha, Jasmine and Jest. All three are about the same, with about 22 answers.

The perfect stack for Symfony

In summary, there is no such thing as THE perfect stack that suits Symfony:

You need to figure out what works with your development workflow and application. - Renders

However, if you were to build a stack based on the survey results, you would have built a stack with React as the framework, which would be created with JavaScript ES6, with Webpack and would not contain any UI tests. Communication would be based on REST API.

In view of the number of participants, the survey is of course only of limited informative value. However, it gives interesting insights into the frontend development behind Symfony. You can find all the survey figures here.