from Hacker News

Ask HN: Anyone still doing monolithic Django?

by fruiapps on 9/17/20, 6:33 AM with 7 comments

Printing a hello world over kubernetes cluster is an overkill, so are multiple microservices when you do not need them. I loved monolithic django, but with the advent of microservices architecture and modern JS libraries react, vue, and the likes, here is what you got to do

Create a DRF Backend

Take care of authentication at both ends

Build your SPA in a modern JS framework.

The good is modularity, maintainability, better UX controls, super interactive UIs, and the likes, the bad is you need to write more code. In simple cases the good old django templates is good enough. Is anyone still doing them? I love the organised new age FE framework code, the imports that come with ES6.

Is anyone still doing monolith with django template and ES6. If so, mind sharing your workflow, and libraries?

  • by midrus on 9/20/20, 2:55 PM

    I do! Usually together with Unpoly for ajax stuff and tailwind for styling. Also, I prefer jinja2 templates because with the "macros" feature you can do easy to reuse components.
  • by Tolexx on 9/17/20, 9:17 AM

    I still do monolithic Django with just a sprinkle of js where necessary. I use the following libraries: * Django-allauth for authentication * Django-bootstrap4 for styling * Django-ckeditor atimes for rich text fields etc.

    Django monolithic is still good for fast development and quick MVP release. Also SSR is quite and gives fast page loads

  • by arvindamirtaa on 9/27/20, 2:21 PM

    My app is still very much a monolith. It's just plain ol' django templates with turbolinks (so, pretty snappy to load pages). Tailwind's @apply + Django template partials give you a component-like workflow fairly easily.

    And JS libs like Alpine, Stimulus, or plain old jQuery (as much as people may hate it) give you all the UI interactivity and reactivity you can hope for from the modern frameworks.

    It may be a little more explicit and verbose at times, but I'll take that over having to reinvent multiple wheels (Auth, caching, validation, etc) when using DRF+React.

    Combined with celery based task queues and the ocassional offloading of simple but time consuming tasks to serverless functions, IMHO there's very little Monolithic django can't do, even at scale.