3 ms·
Out of curiosity, what do you perceive as the main advantages of JS on the server vs Python?
by EdwardDiego 3y ago
Out of curiosity, what do you perceive as the main advantages of JS on the server vs Python?
- andrewstuart 3y agoIt's personal preference that's all. To be honest it's more that I prefer TypeScript to Python. Python and JS have been my main programming languages for 14 years or so. Either are good - I'm not totally off python. I still write async web servers in Python for various reasons. I'm not much of a fan of Python's type system probably because I haven't yet spent enough time to really learn it. I definitely use Python for Linux systems programming or non-web server stuff - Python is really great for more systems oriented stuff. I really liked Django at first but after a while some things really started to bother me about it. The ORM I found complex and clunky - any time I wanted to do something I kept thinking "Ugh this would be dead simple in SQL". Needing to add plugins to Django - I often felt like it took me the same amount of time to work out how to install and configure a plugin, as it would to write the same functionality from scratch, with the disadvantage that at the end of the process I'd often still feel like the plugin was a black box that I'd managed to make work but was never sure I had done it right. And the thing that really annoyed me most about Django is it's meant to be "batteries included", but the very first thing you need to do is work out how to implement users and signin and forgot password and signout - all stuff that should be the very definition of "batteries included". Instead, at the start of every Django project you're left to try to work out what is the right plug and how to install it and did you do it right. If I have to do all that stuff yet again for every project then why bother with Django at all? Why not just use a minimal web server and implement it myself because I'm going to have to anyway. And then, after forming these hesitations about Django, I started doing async web programming with Starlette and FastAPI and found I really liked async web server programming and Django isn't async. So at this point I'd pretty much lost interest in Django.