TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Kotlin SpringBoot vs. Python Django for Min Viable Product

22 点作者 slroger8 个月前
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?

21 条评论

natbobc8 个月前
&gt; I am a backend developer using Spring Boot and Java.<p>If your goal is speed to market use what you know which is Spring Boot and Java.<p>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.<p>Conflating I want to learn something new with I want to deliver quickly will give you a suboptimal outcome for both.
评论 #41660993 未加载
JamesLeonis8 个月前
In the spirit of &quot;build one to throw away,&quot;[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 &quot;first&quot; 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&#x27;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.<p>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&#x2F;framework (Kotlin, Python, Java) that gives you a Rosetta Stone to compare their respective ecosystems.<p>[0]: <a href="https:&#x2F;&#x2F;en.wikiquote.org&#x2F;wiki&#x2F;Fred_Brooks#The_Mythical_Man-Month:_Essays_on_Software_Engineering_(1975,_1995)" rel="nofollow">https:&#x2F;&#x2F;en.wikiquote.org&#x2F;wiki&#x2F;Fred_Brooks#The_Mythical_Man-M...</a><p>&gt; 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.
评论 #41661025 未加载
kukkeliskuu8 个月前
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.<p>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&#x27;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.<p>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.<p>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).<p>In any case, I would not optimize short-term productivity. This means I would not choose language because I had more experience in it.<p>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.
评论 #41617230 未加载
mmarian8 个月前
Django also has an ORM with database migrations built in, which will speed things up. And if you&#x27;re ever planning on leveraging data science &#x2F; AI, it&#x27;ll be a lot easier with Python.<p>Still, depends on your willingness to learn (and remember) a new programming language and framework. It&#x27;s hard when it&#x27;s not part of your day job.
Sevii8 个月前
I&#x27;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.
alentred8 个月前
I would go with whatever I know best. Whichever you chose, your productivity won&#x27;t depend on the technology per se, but how familiar you are with it - when doing MVP&#x2F;prototypes the tech needs to not get in the way, all else is doable with whatever stack you chose.<p>Having said that, you seem to be choosing between a language you know with a framework you don&#x27;t, and the other opposite. Maybe there is a way to stick to both language and a framework you are familiar with?
KronisLV8 个月前
If iteration speed is the main priority, I&#x27;d suggest you go with Django.<p>I&#x27;ve worked with Java and Spring&#x2F;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&#x2F;FastAPI, PHP with Laravel, Node with Express etc.).<p>Personally, in <i>some</i> cases I&#x27;d also limit the usage of Java&#x2F;Django&#x2F;whatever to the back end API (a boring RESTful one) and write a SPA in Vue to consume it, since it&#x27;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&#x27;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.<p>As for auth, I&#x27;d outsource to Auth0 or any other OpenID Connect provider. I&#x27;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.
评论 #41661123 未加载
zrules8 个月前
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.<p>[0] <a href="https:&#x2F;&#x2F;careers.doordash.com&#x2F;blog&#x2F;migrating-from-python-to-kotlin-for-our-backend-services&#x2F;" rel="nofollow">https:&#x2F;&#x2F;careers.doordash.com&#x2F;blog&#x2F;migrating-from-python-to-k...</a>
评论 #41660887 未加载
DataDive8 个月前
Python, in general, would be much faster for prototyping than Java.<p>That is the main attraction of Pyhon.
评论 #41616851 未加载
constantinum8 个月前
The documentation for Django has consistently been cited in this forum as an excellent example of thoroughness and best practices.
brudgers8 个月前
It doesn&#x27;t matter. Choosing a framework is not actual work. When you are not building, neither has advantages, and you are not building.<p>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.<p><i>The app idea is a social networking application so it would need users, likes, comments, messaging and an activity stream&#x2F;news feed.</i><p>The hard part of building a social networking app is getting a bunch of people interested in doing those things with it. They don&#x27;t care about your technology. And they damn sure don&#x27;t care about how easy or hard it was for you to build.<p>Good luck.
评论 #41660878 未加载
tomerbd8 个月前
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&#x27;s more suitable for side projects.
openplatypus8 个月前
I will echo others: you will prototype fastest in things you know.<p>I can whip an MVP working in Spring before I learn how Django ORM works. Because I am so familiar with it.
vladi1608 个月前
The fastest way is what you already know (Java&#x2F;Spring). It doesn&#x27;t matter, how fast for development is the other (Python&#x2F;Django).
greenthrow8 个月前
Whatever you already know how to use is going to be faster. Obviously.<p>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?
评论 #41660867 未加载
dzonga8 个月前
whatever you know best.<p>all those are decent options.
shortrounddev28 个月前
I don&#x27;t use dynamically typed programming languages anymore so I&#x27;d say kotlin
评论 #41616993 未加载
nprateem8 个月前
I evaluated both for my latest project. I wanted to go with Spring Boot for static typing.<p>In the end I went with django for one reason: The admin.<p>Why there&#x27;s nothing comparable in the java world I don&#x27;t know, but for an early project it&#x27;s invaluable to be able to focus on your app while having a good enough admin.<p>Almost everything else favoured Java tbh (cheaper devs - unlikely for kotlin though, static typing, performance, etc).<p>Having said that, their REST thing was garbage. I seem to recall it didn&#x27;t play well with the DB repos or something. Django ninja is much better from what I&#x27;ve used so far.<p>Oh yeah, also I recall you&#x27;re right about the lack of user registration stuff. I read most people use keycloak or something, but that&#x27;s still more stuff to run and wire up than django allauth.<p>Also I&#x27;d question why you want to write the app in a different language. It&#x27;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.
评论 #41616568 未加载
camjw8 个月前
Use whichever one you know best already
shams938 个月前
Django is going to get you up and running and in business, while springboot is much harder to deploy.
评论 #41614832 未加载
评论 #41593554 未加载
nie100sowny8 个月前
Friend, avoid those leaky abstractions with milions of pages of docs for all cost!<p>Just use Kotlin+Ktor&#x2F;http4k+Exposed+Postgres or alternatively more old school Java+Javalin&#x2F;http4j+JOOQ+Postgres.<p>Benefit from serverless or services like GCP cloudrun
评论 #41616624 未加载