8 ms·
Next, Nest, Nuxt Nust?
- jmisavage 4y agoUnless you’re an Angular developer I wouldn’t bother even looking at Nest. It carries over a ton of the same paradigms for better or worse. The biggest problem I have with it is the use of decorators. Microsoft jumped the gun adding support for them into TypeScript and the current proposal is very different.
- gosukiwi 4y agoI'm writing a small side project app using Next.js. I found out the bad way that i18n support is quite bad. Sure, you get an i18n router, but you have to manage translations on your own. There are libraries to do it, which are fine, but translations only work in the front-end, there's no way to, for example, use translations inside an API call (!!). Also, halfway through they decided to push a new Next.js version (still in beta) so you''ll need to move all your `/pages` to an `/app` folder, with a completely new structure. I wanted to learn something new so that's fine, but something like Rails, Django or Laravel would have allowed me to develop way faster. I'm quite disappointed.
- samuelstros 4y agoCan you elaborate on "manage translations on your own"? I am working on dev-first localization infrastructure after being frustrated with i18n from a dev perspective myself. Your remarks seem like they fit into the infrastructure approach I am taking. See https://github.com/inlang/inlang https://github.com/inlang/inlang
- gosukiwi 4y agoWell what I meant there was just that the framework doesn't take care of that for you, you need a third-party library.
- orthonormal 4y agoTo be honest, I thought someone just released Nust, which is a Next built with Rust.
- iobert 4y agoHaha, this title was actually suggested by a friend of mine when I did the research for this post. But then I found out that someone already created an npm package with this name, but the project seems to be dead :D https://www.npmjs.com/package/nust https://www.npmjs.com/package/nust
- poulsbohemian 4y agoSurprised sailsjs hasn't been mentioned in this thread (and/or seems to have faded in popularity?) Seems like if you go back in time maybe 7 years or so it had a hot moment where it looked like it might become the rails / django / spring of the js world, and then felt like poof it was no longer a major part of the conversation.
- iobert 4y agoYes, I only focused on the top five frameworks :) I just checked and Sails, once on place five, fell out of the named ranking in 2019 https://2019.stateofjs.com/back-end/ https://2019.stateofjs.com/back-end/
- poulsbohemian 4y agoI don't blame you a bit, you've got to make the scope of your writing relevant to the audience and the moment... just more surprised that Sails seemed to have its moment and then disappear just as quickly, especially given the chat in a thread like this one on HN where there are apparently many people curious if not outright looking for a full-stack js framework. I attempted to start a (personal, but with commercial aims) project using Nuxt about three weeks ago, as I'd had good experiences with it in the past. It's not been at all fun - whereas with Nuxt2 it felt like I could get up and working quickly, it's been weeks worth of playing whack-a-mole fixing errors. Settled back to Vue3 and got up and running in a few hours. Sveltekit certainly looks interesting. I've tried to get excited about React / Nextjs in the past, but while the concept feels solid, I guess I've always felt like Vue was a better implementation of the concept.
- jalino23 4y agowe sleeping on deno fresh js?
- nathias 4y agoSvelteKit! It allows you to decide about ssr/ssg/csr per route and has an overall nicer approach to reactivity.
- iobert 4y agoI definitely have SvelteKit on my radar, but I wanted to focus on the top five frameworks this time. Maybe SvelteKit will make it in the 2022 results :) https://stateofjs.com/ https://stateofjs.com/
- Tade0 4y agoThe naming caused a little bit of confusion on our last retrospective, because we wanted to migrate our little Node.js project to a proper framework and it wasn't clear if the person suggesting it said NeSt or NeXt.
- iobert 4y agoAbsolutely! And it doesn't help that each framework has 2-3 ways to be spelled: Is it nest, Nest, or NestJS vs Next or NestJS?
- pantulis 4y agoYeah, specially with non native english speakers, it is hard to distinguish what they are talking about, and if I correctly remember they are totally different in approach.
- Eduard 4y agoAnd then there is also NeXT
- cateye 4y agoFor most use cases, I wouldn't advice actually a JavaScript framework. The author is seriously suggesting Next.js to build a company website. In a lot of "website" scenarios, it makes much more sense to choose a CMS like WordPress, Drupal, Django-cms etc. In case of a custom application development, frameworks like Ruby on Rails, Phoenix/Elixir or Django is usually a smarter choice. Next.js is not necessarily a good fit for every problem, and it may be more suited to a specific subset of problems than is often assumed.
- sgdesign 4y agoThese do completely different things. It’s like saying “I wouldn’t advise using CSS, use HTML instead”.
- cateye 4y agoI get what you are trying to explain but this analogy is completely wrong. It would mean that the two subjects are complementary and are often used together which is clearly not the case. While a JavaScript framework like React can be used to build a company website or CMS, it is often not a good idea to use React to do this. Off course this is highly context specific and depends on the particular requirements of the "company website". Without a strict definition of what it is, it will be always a discussion about an ambiguous and moving target. The choice also depends on the technical knowledge and experience. For someone with years of experience with Javascript and really an expert on it, it might be still a smart choice. Or maybe we are not talking about 1 developer but a team of 10 developers etc. I was just trying to suggest that this is not often the case.
- iobert 4y ago> The author is seriously suggesting Next.js to build a company website. Hi, I'm the author :). I wanted to highlight this recommendation has the modifier "If you'd like to learn something new". This very subjective recommendation is solely based on the exciting mix of rendering options, the vast popularity, and my preference for JS and React. You're spot-on when you emphasize that there are web applications that are a different beast anyway and websites that run perfectly fine with a CMS in the background.
- brutopia 4y agoCan’t scroll this page on ios safari 16.2.
- eric-burel 4y agoRegarding SSG I've formalized (but not invented, it's as old as the web) a pattern that allows to extend it to pages that looks the same for multiple users, but not necessarily all of them. It's already common to do that for i18n where multiple users share a same language, but not all users. So the scope of SSG us broader to what's described in the article, and also it should probably not be differenciated to SSR as it is just build-time cached SSR. Next 13 app folder makes this clearer. https://www.smashingmagazine.com/2022/07/new-pattern-jamstack-segmented-rendering/ https://www.smashingmagazine.com/2022/07/new-pattern-jamstac...
- iobert 4y agoI agree that the lines get more blurry the closer you look, "is it still SSG or already a hybrid approach when it contains localized strings?" What I meant to describe in the post is the conceptual difference to understand the purpose of the rendering frameworks better.
- eric-burel 4y agoMakes sense, the problem is that rendering frameworks are lagging behind the current understanding of server-side rendering, Next 13 is the only exception I know
- jack_riminton 4y agoSomething tells me the rate of JS backend frameworks means that JS is not a great choice for backend frameworks
- antifa 4y agoMost backend nodejs stuff is microservice/serverless/front-end oriented, and what's not but is mature is mostly pre-async and pre-typescript. Then on top of that, rails/laravel can scaffold you extremely strong starting templates, like having working MFA and uploadable profile pics in less than an hour. But if you need serverless/microservice for your existing app of any backend type, nodejs is low friction and highly productive.
- throwaway0x7E6 4y agoor rather that js devs can't into developing backends
- samuelstros 4y agoI recently discovered and recommend to take a look at vite-plugin-ssr https://vite-plugin-ssr.com/ https://vite-plugin-ssr.com/. Vite-plugin-ssr describes itself as "Like Next.js/Nuxt but as do-one-thing-do-it-well Vite plugin.". I use it for https://github.com/inlang/inlang https://github.com/inlang/inlang. The control and ownership of the underlying rendering techniques is truly relieving and enables us to run static sites + a high dynamic (client-side rendered) app in one monolith instead of the typical static site + app.domain.com split.
- fiala__ 4y agothank you, I've recently been searching for an alternative to Nuxt that isn't a heavy black box, so this looks very interesting!
- antifa 4y agoI wish more SPA frameworks (and any backend frameworks) had automatically generated routes like nuxt.
- stoicjumbotron 4y agoAny issues or gotachas you've run into as compared to Next?
- samuelstros 4y ago- The documentation is good but not "amazing" - the surface api for routing is large (different ways to achieve routing). the maintainer is working on reducing the surface area though https://github.com/brillout/vite-plugin-ssr/issues/53#issuecomment-1356167413 https://github.com/brillout/vite-plugin-ssr/issues/53#issuec... - api routes (cloud functions) require another package (on purpose). see https://telefunc.com/ https://telefunc.com/ from the same maintainer other than that, no gatchas i encountered. i would choose vite-plugin-ssr again.
- frx 4y agoThe decision tree at the bottom starts with "Full-Stack App?" but only lists Express and Nest at the "yes" branch. Next.js does have an API functionality so it can also be used to create a full-stack app.
- 0xblinq 4y agoBeing able to return JSON makes you "full stack" the same having wings makes a fly an airplane.
- iobert 4y agoYou're right, thanks for pointing this out. I'm the author; I updated the graphic to split based on the framework's purpose, "pure backend" vs. "focus on rendering". I hope this is clearer now.
- mccorrinall 4y agoNext.js API DX is horrible compared to actual API frameworks like fastify. :/ I wish I could love Next’s API routes as much as the rest of the framework.
- lucakiebel 4y agoYeah I think they should be switched
- nov21b 4y agoBefore deciding on these very dev-oriented metrics, one should probably define the goals of the site/app. Is it a community site where easy content editing / contributions should be prioritized. Or is this a landing page that should have stellar SEO and load blazing fast. What language / framework am I or my team familiar with. The raw performance metrics should probably come last.
- iobert 4y agoHi, I'm the author of the blog post and wanted to say that I completely agree with your statement. I picked these metrics because I find them very useful to explain the differences between the rendering options. I did not mean to say that every website needs to optimize for all of them.
- DeWilde 4y agoAnyone here using Svelte or now SvelteKit, how does it compare to React and Vue and Next and Nuxt respectively?
- samuelstros 4y agoNextJS and SvelteKit are same same. SvelteKit might offer a slightly higher DX by being the new kid on the block that learned from NextJS and Co. The big difference is just Svelte vs React. Svelte is delighting to use but a headless UI library, or generally good UI lib is missing and JSX has its advantages. The advantages of JSX being more flexible and better TypeScript support. I decided to go with Solid for a new project. Solid combines Svelte's easier reactivity and JSX. More about the rationale behind choosing Solid can be read in an RFC I wrote https://github.com/inlang/inlang/blob/main/rfcs/002-tech-stack.md https://github.com/inlang/inlang/blob/main/rfcs/002-tech-sta...
- nathias 4y agothe new Next is very close to SvelteKit, because they copied their routing
- samuelstros 4y agoactually, svelte-kit copied nextjs routing :D rich harris read the routing RFC from the next team before they released it
- nathias 4y agointeresting, that's been in the works for quite a while then
- arcturus17 4y agoI've used Next.js quite extensively by now and I will continue to use it for certain types of projects. I also like JavaScript back-ends for thin APIs and the like. But the absence of a mature batteries-included framework like Rails, Django, Laravel, .Net, etc. baffles me. Many have tried (eg, Meteor), and many keep trying (eg, BlitzJS or NestJS) but none have really stayed, a whooping 14 years after the launch of Node. I can really buy into using JavaScript on the back-end as a concept, especially with TypeScript - it has the potential for a great DX, and good performance characteristics for most web applications. But I personally can't get over the "bring-your-own-everything" aspect of it. I don't want to think about ORMs, auth, etc. at the start of every project, and change the pieces of that puzzle every couple of years. People talk about the instability of front-end frameworks but I think the back-end is even worse. If I could ask Tech Santa for something this Christmas, it would be a batteries-included TypeScript web framework that will be adopted massively.
- kodah 4y ago> If I could ask Tech Santa for something this Christmas, it would be a batteries-included TypeScript web framework that will be adopted massively. I'm not really a fan of Typescript as a backend language and I think I'd lose a lot of the niceties I get from things like Go, Java, and Rust if this happened. I took would love a world where I could write Go sensibly and get a fully functioning frontend. This is done rather nicely in TUIs, which follow a lot of the same rules as CSS. It's the part that JavaScript fulfills on the user side that's cumbersome to replicate. I'm also not sure I'd call frontend deps "unstable" as much as "rapidly evolving", which gets weird when you're constantly playing catch up in that domain of knowledge.
- antifa 4y agoCheckout https://www.mandarinets.org/ https://www.mandarinets.org/ if typescript + deno is acceptable.
- revskill 4y agoThe lack of batteries-included frameworks don't mean it's not impossible. But it might means 2 things: - Production codebase is really hard to extract into reuseable libraries. - There're too many standards on the same things. Rails is a success for one of reasons, is, DHH is the main leader, no "competitive standards".
- fyzix 4y agoSveltekit 1.0 was just released and I got teary eyed when going through the interactive tutorial at http://learn.svelte.dev http://learn.svelte.dev and saw how intuitive some things were compared to react.
- coder543 4y agoHave you tried Remix? SvelteKit was more exciting to me before I discovered Remix, which seems to simplify things even further and make them so nice. The entire API is very small, but powerful.
- EugeneOZ 4y agoMeasuring TTI and not even mentioning Qwik? Weird :)
- throwaway290 4y agoQwik.
- mfreeman451 4y ago