I've spent years complaining to my colleagues and friends about the state of modern web-development. Often to the point of jokingly suggesting we go back to the good old days of PHP & jQuery. It feels like once upon a time we had a simple, easy to understand stack that could be used to build anything.

This generally leads into my rambling about how "some day I'll build a framework that lets us build extendable backends, quickly and confidently." Of course this is the same pitch every new framework has, but I've never quite been satisfied with the current offerings.

Recently I was called out mid-rant by a friend. "Well, why don't you just build it now?".

Fair enough, I've been talking about this for long enough. Let's get started...

But one last distraction project before I start building my dream framework, I need to understand the current landscape.

In my quest to build better tools, I want to start by finding better tools. I've decided to explore and evaluate some commonly used and loved backend frameworks. My goal is to uncover the pain points and clever design patterns each one employs.

To do this, I will implement a simple Instagram-like backend multiple times using different frameworks.

Features

  • User sign-up & login using Auth0
  • Users set their own username & bio, which can be changed
  • Users can post photos with captions (1 photo per post)
    • Images are resized appropriately for serving
  • Users can search for & follow other users by username
  • Users can view a chronological timeline of posts from users they follow
  • Users can like posts, unlike posts, and view the number of likes each post has

Technical requirements

  • Basic test cases covered using the framework's recommended testing patterns
  • All list responses include pagination
  • Admin panel (if available out of the box)
  • Images are stored in Amazon S3, using signed URLs to allow direct upload/download
  • Use queues & background workers for image processing
  • Automatic schema generation (if available out of the box)
  • Runtime schema validation
  • CORS headers allowing front-end to call from a different domain
  • Docker container to start each application

But before I start this, I'll build a front-end UI that can be re-used to interact with & test each backend.

The frameworks I’ve chosen to explore are:

  • Django: A comprehensive Python web framework, using Django REST framework for the Rest API.
  • Strapi: An open-source headless Node.JS CMS.
  • Nest + AdminJS + Prisma: A combination of NestJS (a Node.js IoC framework), AdminJS (a Node.js admin interface), and Prisma (a SQL database ORM).
  • Ruby on Rails: A powerful web application framework written in Ruby, known for its convention over configuration philosophy and developer-friendly features.

Throughout this series of blog posts, I'll document my experiences with each framework. This includes

  • Initial setup
  • Ease of development
  • Learning curve
  • Thoughts on scaling to larger applications
  • Specific challenges encountered

Additionally, I'll highlight the clever design choices and features that make each framework stand out.

As I find interesting & effective patterns, as well as pain points and areas for improvement, I'll be taking notes for the design of my future framework.