4 ms·
Django in Typescript is Next.js / T3 stack which I much prefer to Django
by reducesuffering 3y ago
Django in Typescript is Next.js / T3 stack which I much prefer to Django
- pier25 3y agoNot even close. Next is pretty barebones as a backend framework compared to mature solutions like Django, Rails, or Laravel.
- pjerem 3y ago> Django in Typescript is Next.js / T3 stack I’m sorry but no. In Django, every parts of the framework are tightly integrated in smart ways to make you more productive. You can write things like "redirect(entity)" to redirect your user to the view that shows your entity. Displaying a form to create/edit an entity is a few lines of code… I understand why you would prefer something else but you can’t say that it’s Django.
- reducesuffering 3y ago> You can write things like "redirect(entity)" to redirect your user to the view that shows your entity. You literally have a redirect() in next.js routing you to another URL https://nextjs.org/docs/app/api-reference/functions/redirect https://nextjs.org/docs/app/api-reference/functions/redirect > Displaying a form to create/edit an entity is a few lines of code… A form is not a particularly hard example in any sized app. https://nextjs.org/docs/pages/building-your-application/data-fetching/forms-and-mutations https://nextjs.org/docs/pages/building-your-application/data... Now do Django with any sort of frontend that isn’t just html and adhoc js or htmx. DRF is very 2005 syntax “basic crud that’s it” Then trying deploying Django, a process that will take 50x what the form will. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04 https://www.digitalocean.com/community/tutorials/how-to-set-...
- pjerem 3y ago> You literally have a redirect() in next.js routing you to another URL I was not accurate enough. In Django you can just pass your database entity to redirect(). Since you can define directly in the models how to resolve their "Read" (as in cRud), you don’t need to build the URL each time you want to redirect. As for the forms framework, I never implied that you can’t do this with others frameworks. As I said, I didn’t touch Django for a decade and I did mostly Typescript development for the last 6 years so I pretty much know that you can build an app with it and that there are a lot of good libs for this. My point is not that you can’t do everything with it and that you can do more with Django, I’d even say it’s the contrary. However, if what you want to build is a classic website without a lot of real-time interaction, Django allows you to build it with way way less lines of code (and I’m not even talking about that entire cool admin you get for totally free).