HACKER Q&A
📣 choicenotchance

What do I move on to from Django?


I've been a Django backend engineer for most of my career of 7 years, and recently shifted to working on NodeJS+Express because the current company runs on it.

So, is it okay to stick to Django in 2020? The last project I made in Django - I used v3.0 and it was still fine although a lot had changed from v1.11. Except of course I forgot DRF a bit and had to throw out some APIs I wrote in it before deciding to roll out my own way in CBVs as going back to docs for custom stuff in DRF was too complicated/required unnecessary efforts. Same for allauth, drf-rest-auth, etc. Okay for basic APIs, not as much for customization. Sorry for the digression. And Django 3.0 still doesn't have event loop based async processing like Node, at least not fully.

Honestly, after working with Node+Express and having to write all the "magic" parts yourself, I feel more light and free, - not having to understand a framework and then thinking about my app's business logic later. In Node+Express I can simply scaffold a basic server and start writing routes, integrate with SQL queries, and be done with it. Maybe even install a couple of libs to sort out CORS, session auth, security stuff etc. And the performance is definitely better than running a Django app for simple serialization of DB data and sending that back. The biggest pain is obviously Django ORM - it's honestly light years ahead of anything in JS. But I can live without it, having spent a year on manually created migrations in my company that I know can be automated.

So, what do you use and recommend for backend development in 2020? When you have to write a POC quickly for an app idea you have, what's the technology you use to flesh its backend out?

P.S: This is not a rant against Django - I love Django and my whole career started because of it. I'm forever thankful to the Django community and Django itself. I just want to gain some insights into what other Django devs have been using regularly.


  👤 factorialboy Accepted Answer ✓
Well, it depends.

If your goal is to make good webapps quick and reliable, Django is still the best option out there. It's terrific.

However it's not the "coolest" thing to work on as a career developer. You would do better looking at Rust, Golang or even Crystal at this point.

So, the question you should ask (and answer) is "Who am I?". Are you a product creator or a career developer?


👤 luhego
Django is fine for web applications but I can understand wanting to learn other things after 7 years. You can try Go which seems to be very popular as a Python replacement for backends. Another option could be Elixir which is very popular here. Also you can try Deno which is written by the creator of NodeJs.

👤 bdr
There is nothing in the Node ecosystem to replace Django’s ORM, migrations, or admin.

In my startup, I’m using a typescript/node backend to serve graphql, while still using Django for migrations and the admin. It’s a bit odd but works fine.

If you’re starting a new project, I’d strongly consider using Django for the whole backend, with graphene for graphql, and create-react-app on the frontend. Apollo’s type generation is a big help in keeping the two parts synced.


👤 kevinschumacher
If you like python but have mixed feelings about django and other opinionated frameworks, maybe try a project where you mix and match libraries instead of using a framework?

Have you tried using flask? I think you’ll find it closer to your experience with express.


👤 teknas
If you are open to trying out a functional programming style, I would recommend Phoenix(Elixir). Also Liveview is amazing when you want to create interactive frontends without using react/vue.

👤 devxpy
Ive been wondering for a while now -- tell me, do we really need specialized server logic for every little functionality?

In my last project, almost half the server code is really just converting REST to SQL. Why don't we just use SQL on the client directly?

If its just about authorisation, why not write an auth system for SQL and be done with all this unnecessary server code, once and for all?

I mean graphql sounds so stupid in this context because it's just cruft over SQL.


👤 meh2frdf
I would learn something that has a longer half life than a web framework. Broaden you general ability, perhaps more distributed, infosec aspects, or networking.

👤 flashrider
You should look into the python Masonite Framework:

https://docs.masoniteproject.com/


👤 kennydude
Honestly Django is still fine. It works, and if it lets you build products which work properly, and reliably, why not use it?

👤 JaggerJo
F# + Giraffe

👤 sosilkj
i'd be curious to hear more about how you've built a career around something as specific as django (if i'm understanding you correctly). does not seem a broad enough skillset for the sorts of places i've worked, and it makes me wonder if i'm being spread too thin.