8 ms·
> Is there any Typescript backend framework as mature as Django? No TS framework is as old as Django, and if you're looking for "Django for TS" you won't find
by dfabulich 5y ago
> Is there any Typescript backend framework as mature as Django?
No TS framework is as old as Django, and if you're looking for "Django for TS" you won't find exactly that, but Next.js is the current reigning champion for server-side frameworks right now, according to the popular "State of JavaScript" survey https://2020.stateofjs.com/en-US/technologies/back-end-frameworks/ https://2020.stateofjs.com/en-US/technologies/back-end-frame... Next is a "both-side" framework, allowing it to do stuff you just can't do in Django.
If you want something much thinner than Next (and thus much thinner than Django), there's Express.
> yet it cannot possibly be expected that frontend people learn more than a single language?
The problem isn't learning two languages, it's interop between two languages.
- creshal 5y ago> No TS framework is as old as Django, and if you're looking for "Django for TS" you won't find exactly that, but Next.js is the current reigning champion for server-side frameworks right now, according to the popular "State of JavaScript" survey https://2020.stateofjs.com/en-US/technologies/back-end-frame https://2020.stateofjs.com/en-US/technologies/back-end-frame... So by that graph, it has a good chance of being entirely deprecated and/or abandoned in the next 3 years, what a wonderful foundation for a backend. And it doesn't even have any support for an ORM? Neither does Express? Having to hand-write every single query and migration like it's 1999 again is hardly the cutting edge of IT stacks… > The problem isn't learning two languages, it's interop between two languages. How so?
- btgeekboy 5y agoRegarding ORM, it's typically paired with Sequelize or Prisma. (I'm personally using the latter.) I've built Django apps in the past (it's actually how I learned Python in the 2.5 days), but what's nice about Node/TS is that the frameworks are more loosely coupled so you can pick/choose your best components. For example, while I mentioned the ORMs above, you can even go one step further and use a backend headless CMS like Strapi, which will get you the ORM + admin interface that you'd get from Django models.
- creshal 5y ago> what's nice about Node/TS is that the frameworks are more loosely coupled so you can pick/choose your best components. For about two weeks, then one of them becomes deprecated again and you have to migrate everything all over again…
- lhnz 5y agoThis isn't really true though. There are plenty of open-source modules in Node which were released more than 5 years ago and are still in use today. People only move to new ones, when they are clearly better. What exactly is wrong with that?
- creshal 5y ago> There are plenty of open-source modules in Node which were released more than 5 years ago and are still in use today. And how stable was their API over the last five years? It hardly counts if over 5 years the APIs change so much they're basically different libraries at the end. Django's code churn for even complex projects is on the order of single digit hours per year at worst, the remaining 99.99% of time can go into delivering things customers care about. I can't say I've seen that sort of stability in anything Javascript-related, apart from maybe jQuery projects. (Which of course have their own problems because jQuery is the wrong abstraction usually.)
- nicoburns 5y agoOn the backend, Express has had a very stable API for 5+ years. On the frontend, React has. However, stable or not there's nothing that competes with Django/Rails/Laravel in the Node ecosystem.
- Silhouette 5y agoI'm not sure React is the best example. Although the library is backward compatible in theory, it doesn't much matter in practice because almost the entire ecosystem switched to a radically different core abstraction a couple of years ago.
- 1_player 5y agoCome on, as someone that has worked professionally with Django and Next.js, the only similarity they have is that they're both web frameworks. Django is light years ahead than Next.js is it's not even funny. Here's a very simple metric: Compare the Next.js documentation (https://nextjs.org/docs/getting-started https://nextjs.org/docs/getting-started) with Django's (https://docs.djangoproject.com/en/3.2/contents/ https://docs.djangoproject.com/en/3.2/contents/) - better yet, compare the actual API reference and exported classes/methods. Yes, Next.js is one of the better Node/Javascript frameworks, but it's incredibly inferior to any other established framework in Python, Java, PHP, Elixir, etc. — unless you only need a static page with some dynamic React components. I am in the unfortunate position of maintaining a more complex Next.JS app, using most of its "advanced" features such as dynamic routing, SSR, GraphQL, API, and it's the most painful project I have ever had the misfortune to work on, because the upstream interface and API is so woefully under-documented, buggy, changes too quickly it's hard to stay up-to-date, etc. etc. I weep every time someone on this forum suggests to start a new project with Next.js. In theory Javascript on the server and client is a productivity boost, in practice it is not by any measure.
- nicoburns 5y agoThe similarly named (but completely different) Nest.js is much closer to Django than Next. Still a ways behind in terms of maturity, but it seems to be more or less on the right path.
- sillyquiet 5y ago> Yes, Next.js is one of the better Node/Javascript frameworks, but it's incredibly inferior to any other established framework in Python, Java, PHP, Elixir, et This is like saying a screwdriver is incredibly inferior to a impact hammer. > In theory Javascript on the server and client is a productivity boost, in practice it is not by any measure. This is in direct contrast to my personal experience across multiple projects and teams. In practice it IS a productivity boost, because JS does 99% of what anybody needs a web server to do.
- 1_player 5y ago
- Kinrany 5y agoIIRC Next is a backend-for-frontend framework, not a general purpose one. Unless that changed?
- tomnipotent 5y agoIt's a general purpose web framework, that happens to have a tight frontend integration thanks to JS and React. It's still JS + Node, and everything that enables.
- kapv89 5y agoThere are frameworks like blitz.js(https://blitzjs.com/ https://blitzjs.com/) coming up which build on top of next.js and provide you a full-stack development environment with react in the frontend. Far superior than what django/rails/laravel can offer.
- Oddskar 5y agoI quite like Next.JS but this give me a little bit of a pause. Do you really want to work with a framework that has another framework on top of it? This feels a bit iffy to me.