6 ms·
There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI,
by BozeWolf 5y ago
There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But...
Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it.
Its good parts and its bad parts are widely written about. And if that is not enough: the documentation is great.
Great framework to get your product to market, it allows me to focus on building products. I dont want to think about routing forms processing, or project layout again. I want to write code for the product, not for the framework. Django is just good enough. Forms, URL routing and models are not what delivers value to products I am working on. So I don't want to spend time on it.
Remember: no customer cares about your product being run on cool-async-framework-X. Customers just want a good looking and good working product.
- top_sigrid 5y agoWhile I have no experience with Django, this could exactly be said about Rails. It's great these two exist and are being worked on for so long and have this level of maturity.
- adamauckland 5y agoyes, they are very similar. I'm not sure if Rails has quite the level of auto-generating admin system, though.
- ksec 5y agoI wonder why Django seems to have a easier time in hiring, considering it should be a smaller market than Rails. Even on HN monthly hiring list Rails and Django open positions is roughly 3:1. And yet I rarely hear Django people ever complain about the lack of talent pool.
- smoe 5y agoI reckon, Ruby and Rails while still heavily used has fallen out of fashion since it's peak time, whereas Python has gotten a huge boost in recent years from data science and being a common teaching language which spilled over to other uses of the language. In the mid 2010s the python web application space felt very stagnant to me, many semi abandoned projects, lots of people leaving for other technologies. But there has been quite some reversal on that since.
- traverseda 5y agoPython is a very popular language, and if you know Python Django is easy.
- sireat 5y agoDjango seems to add too much magic for me. It is mostly manage.py this manage.py that. I can't grok it completely. All the books that I read on it skipped the architecture part. Maybe there is a good guide to Django architecture - the big picture? PS I am rather experienced in Python (Numpy, Pandas, Plotly, Flask, SQLAlchemy, FastAPI, BeautifulSoup are my bread and butter)
- derekjdanserl 5y agoYou list a bunch of libraries, but Django is not a library. It is a framework. The Django file structure, for example, is not exactly optional in Django. Realize FastAPI follows in the footsteps of Flask. Neither FastAPI or Flask are frameworks. As a FastAPI user myself, I do think it’s closer to a happy medium, but it’s nothing remotely comparable to Django. When using Django, the best advice I have is to dive all the way in. Follow the docs and the best practices first. Besides, manage.py is just like having a well-developed kit of shell scripts/ in your repo.
- privacyonsec 5y agoagreed, I'm more convinced now that django is really enough and get shit done even if there a poor support of async, more convinced after reading this blog post that async python is not faster (was on hn) : https://calpaterson.com/async-python-is-not-faster.html https://calpaterson.com/async-python-is-not-faster.html
- Uberphallus 5y agoIt's not significantly faster (or slower), it's the author that doesn't know how to run a benchmark. You can read my take on his take [0]. Leaving that aside, async is very advisable (even a must) if your backend throws requests against external and potentially blocking services and you want to keep answering your own clients without scaling for no reason. [0]https://news.ycombinator.com/item?id=29128107 https://news.ycombinator.com/item?id=29128107
- konschubert 5y ago> if your backend throws requests against external (and potentially blocking) services and you have the "audacity" of wanting to keep answering your clients. If you have enough processes/threads running, the CPU scheduler should take care of that , no?
- fer 5y agoYes, but more processes means more memory footprint, almost 4 times as much in that benchmark, something the author didn't cover. Threading solves that, but it's way more prone to shooting yourself in the foot than async, especially since it's not baked into Django (i.e. you gotta cook your own solutions over callbacks, polling, etc).
- emacsen 5y agoThis is a question that's largely impossible to answer, but there's a performance vs developer (or business) time calculation to be made. More aptly, if one can throw another physical server at it, is it worth fixing the underlying performance issue? Sometimes the answer is yes. If you're at a place with even a thousand physical servers running your process and you can save 2% overall performance with a rewrite, that's saving you 20 physical servers worth of performance. But often the answer is that it's not worth it. That 2% performance increase on a set of 10 servers is not calculable, and more often even a 10% performance benefit is only noticeable on some specific task, not as a constant overhead. On the other hand, developer time is expensive and can often be best spend on core functionality. If Django is, let's say even 20% slower than an async framework like FastAPI, but it's going to save three developers a week of development time to implement a feature in Django, then that's probably a much cheaper solution. I've used Django, Flask, Sanic and FastAPI[1] and today I often choose FastAPI for my projects, but I think Django is still what I'd turn to if I needed to make a full fledged web application quickly, despite its performance not being as good as FastAPI. [1] Before I learned Django, I also used Zope, and TurboGears.
- blitzar 5y agoI end up spending more time writing the CSS than the Django...
- falcor84 5y agoAgreed. Although I usually hate marketing taglines, I think Django quite realizes its tagline of "The web framework for perfectionists with deadlines."
- mrctte 5y agoIt's also quite easy to swap out the templating engine for whatever front end framework that you'd like to use. Django provides tons of value even when used solely as an API server and ORM.
- avidphantasm 5y agoAnd the admin framework is great for accelerating development, making it really easy to create test data as you build out your API.