HACKER Q&A
📣 slroger

Kotlin SpringBoot vs. Python Django for Min Viable Product


Hi everyone, I am a backend developer using Spring Boot and Java. I also know some Angular. I had an app idea and wanted to build out the backend in either Kotlin+SpringBoot or Django+Python. I already know Python from prior experience but was wondering which one of the two combinations would be faster for prototyping. I know Django works well since it was used for Instagram. It would be easier on me if Spring Boot+Kotlin is a comparatively good choice since I already use Java+Spring Boot. I dont plan on using Java for the app since it can be a bit verbose at times and Django already has authentication included unlike Spring Boot with Spring Security. The app idea is a social networking application so it would need users, likes, comments, messaging and an activity stream/news feed. what are your thoughts?


  👤 natbobc Accepted Answer ✓
> I am a backend developer using Spring Boot and Java.

If your goal is speed to market use what you know which is Spring Boot and Java.

If your aim is to learn something new then go with Django or sprinkle in some Kotlin incrementally (eg tests). I don’t think it’ll matter in the long run which you choose.

Conflating I want to learn something new with I want to deliver quickly will give you a suboptimal outcome for both.


👤 JamesLeonis
In the spirit of "build one to throw away,"[0] consider making a prototype you can show off to potential users and friends. Use it as a glorified presentation to validate your idea. I did that with my current project by treating the "first" version as a hackathon prototype (no users, no security, no DB, terrible coding style, etc) that I could put in front of people and present my idea. I didn't bother with anything but speed so I could quickly validate. Once I had a good grip of my idea from feedback, I could sit down and plan a proper MVP.

Another thought is to use your idea as a springboard to explore those two technologies. Write three toy versions of your idea in each language/framework (Kotlin, Python, Java) that gives you a Rosetta Stone to compare their respective ecosystems.

[0]: https://en.wikiquote.org/wiki/Fred_Brooks#The_Mythical_Man-M...

> The management question, therefore, is not whether to build a pilot system and throw it away. You will do that. […] Hence plan to throw one away; you will, anyhow.


👤 kukkeliskuu
In my experience Django has much less boilerplate, so it is faster to develop in, especially traditional CRUD apps, if you had equal experience in both. It has admin, authentication, migrations etc. built-in.

The downside of Django is that while the initial DX is good, once you go into a little bit deeper, you need to learn how certain things should be done -- let's say if you use built-in forms and you want to create a inline formset with typeahead component. Well, it applies to Spring as well. Overall, Django still wins.

If you choose Django, try to do as much as possible in traditional Django way, meaning 90s form posting and full page load instead of single-page apps. That will be much quicker.

You can sprinkle some interactivity where you need it, for example using django-components, AlpineJS and HTMX. I would not use Angular (or Vue or React).

In any case, I would not optimize short-term productivity. This means I would not choose language because I had more experience in it.

You will be iterating much more than you are anticipating right now, because you can never really know what features give you traction. It is much better to optimize for long-term productivity, i.e. choose the best tool.


👤 mmarian
Django also has an ORM with database migrations built in, which will speed things up. And if you're ever planning on leveraging data science / AI, it'll be a lot easier with Python.

Still, depends on your willingness to learn (and remember) a new programming language and framework. It's hard when it's not part of your day job.


👤 Sevii
I'm a fan of Spring Boot + Thymeleaf + Htmx. Django is a proven platform for the kind of app you want to build so you likely will be fine either way.

👤 alentred
I would go with whatever I know best. Whichever you chose, your productivity won't depend on the technology per se, but how familiar you are with it - when doing MVP/prototypes the tech needs to not get in the way, all else is doable with whatever stack you chose.

Having said that, you seem to be choosing between a language you know with a framework you don't, and the other opposite. Maybe there is a way to stick to both language and a framework you are familiar with?


👤 KronisLV
If iteration speed is the main priority, I'd suggest you go with Django.

I've worked with Java and Spring/Spring Boot for years and while you can get most stuff done reasonably quickly, there are stacks out there that will let you iterate faster (Ruby on Rails, Python with Django/FastAPI, PHP with Laravel, Node with Express etc.).

Personally, in some cases I'd also limit the usage of Java/Django/whatever to the back end API (a boring RESTful one) and write a SPA in Vue to consume it, since it's powerful enough to get things done but not too much so to the point of getting in your way (e.g. React or Angular, personal preference, some people won't like Vue and will prefer Svelte, others HTMX, it depends). On the other hand, SSR still will be faster to iterate with, even with the coupling.

As for auth, I'd outsource to Auth0 or any other OpenID Connect provider. I've also self hosted Keycloak and use mod_auth_openidc to simplify it, but it was quite annoying to setup, so going for an industry standard protocol on top of whatever SaaS makes sense seems sane.


👤 zrules
DoorDash has an article on migrating from python to kotlin for their services [0]. This might be of interest to you. Do note this migration was done at a certain stage of this company journey.

[0] https://careers.doordash.com/blog/migrating-from-python-to-k...


👤 DataDive
Python, in general, would be much faster for prototyping than Java.

That is the main attraction of Pyhon.


👤 constantinum
The documentation for Django has consistently been cited in this forum as an excellent example of thoroughness and best practices.

👤 brudgers
It doesn't matter. Choosing a framework is not actual work. When you are not building, neither has advantages, and you are not building.

Sure, maybe one or the other might make the work marginally easier. But it is going to be hard work no matter what...if you build of course. Not building is the easiest path by far, and there is nothing wrong with not building.

The app idea is a social networking application so it would need users, likes, comments, messaging and an activity stream/news feed.

The hard part of building a social networking app is getting a bunch of people interested in doing those things with it. They don't care about your technology. And they damn sure don't care about how easy or hard it was for you to build.

Good luck.


👤 tomerbd
Coming from java spring and knowing some python looking around - I decided I would django for side projects and leave java and spring for my day job. I think it's more suitable for side projects.

👤 openplatypus
I will echo others: you will prototype fastest in things you know.

I can whip an MVP working in Spring before I learn how Django ORM works. Because I am so familiar with it.


👤 vladi160
The fastest way is what you already know (Java/Spring). It doesn't matter, how fast for development is the other (Python/Django).

👤 greenthrow
Whatever you already know how to use is going to be faster. Obviously.

Second, you are worrying about all the wrong things. Nobody cares what language you use. What matters is are you building a useful product that actually fits a real need?


👤 dzonga
whatever you know best.

all those are decent options.


👤 shortrounddev2
I don't use dynamically typed programming languages anymore so I'd say kotlin

👤 nprateem
I evaluated both for my latest project. I wanted to go with Spring Boot for static typing.

In the end I went with django for one reason: The admin.

Why there's nothing comparable in the java world I don't know, but for an early project it's invaluable to be able to focus on your app while having a good enough admin.

Almost everything else favoured Java tbh (cheaper devs - unlikely for kotlin though, static typing, performance, etc).

Having said that, their REST thing was garbage. I seem to recall it didn't play well with the DB repos or something. Django ninja is much better from what I've used so far.

Oh yeah, also I recall you're right about the lack of user registration stuff. I read most people use keycloak or something, but that's still more stuff to run and wire up than django allauth.

Also I'd question why you want to write the app in a different language. It'll double your work for little gain unless you have real need. Just chuck a Web shell around a responsive website and fill the gaps for the native stuff.


👤 camjw
Use whichever one you know best already

👤 shams93
Django is going to get you up and running and in business, while springboot is much harder to deploy.

👤 nie100sowny
Friend, avoid those leaky abstractions with milions of pages of docs for all cost!

Just use Kotlin+Ktor/http4k+Exposed+Postgres or alternatively more old school Java+Javalin/http4j+JOOQ+Postgres.

Benefit from serverless or services like GCP cloudrun