DEV Community

Cover image for How To Create a Universal Backend With Symfony
Daniele Fontani
Daniele Fontani

Posted on • Originally published at betterprogramming.pub

1

How To Create a Universal Backend With Symfony

In 2021, there isn’t any more space for reinventing the wheel.

Development is an art that relies more and more on a pick-and-assemble strategy than developing things from scratch. Following this trend, writing code for just reading and writing data is a mess of a time. That’s probably the reason why headless CMS solutions have been spreading in the last few years and SaaS adoption is the most common way to move to the cloud.
Anyway, we often have to fight against complicated business logic or complex integration, and we would need the flexibility of writing custom code.

What we will see in this article is how to create a headless CMS using Symfony and MongoDB starting from scratch. The output of this project is a working application that can be installed as a composer package, and you can use it as a base for implementing your applications (yes, applying custom business logic with ease)!

This is not only an interesting way to implement data services but also a great showcase of the Symfony framework. As I mentioned in my previous article, I completely rewrote an entire headless low-code platform CMS (previously written in two years in .NET) in just two days using Symfony. Yes, two years vs. two days!
In this article, I will show my work and explain how it is possible thanks to the native feature of that framework.

You can find a reference to the full source code at the end of this article.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay