NextJS VS SvelteKit in 2024...

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024

ความคิดเห็น • 118

  • @salamonrosenberg-vh5xo
    @salamonrosenberg-vh5xo หลายเดือนก่อน +8

    I use SvelteKit with Rust ActixWeb as a backend....fast as hell and simple enough....

  • @michaelfrieze
    @michaelfrieze 8 หลายเดือนก่อน +22

    It's really quite simple. If you are more MVC minded, you are not going to like RSC's. React was inspired by XHP which was a component-oriented architecture and the "concern" has always been the component. RSC's componentize the request/response model. React has moved further away from MVC and closer to their component-oriented vision. This has ruffled a lot of feathers just like JSX did back in the day when people were complaining about "separation of concerns".

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน

      Yep

    • @fcnealvillangca7943
      @fcnealvillangca7943 7 หลายเดือนก่อน +2

      And Which most jobs required MVC experience right?

    • @mwlulud2995
      @mwlulud2995 4 หลายเดือนก่อน

      Exactly why I prefer Sveltekit

    • @nymez6968
      @nymez6968 หลายเดือนก่อน +1

      @@mwlulud2995SvelteKIT isn‘t exactly MVC either.

  • @HONjramiroz98
    @HONjramiroz98 8 หลายเดือนก่อน +8

    Started using svelte+sveltekit and agree with all you said
    Now I’m learning next js, mostly to understand how it works and adding that tool to my set of tools, but… I’m staying with Sveltekit for the moment, it just works super great

    • @iulikdev
      @iulikdev หลายเดือนก่อน +1

      Me too... sveltekit it's all i need.

  • @ransomecode
    @ransomecode 3 หลายเดือนก่อน +3

    Here's the issue with NextJS; say you have a database with 10m todos, if you are to fetch all that on the sever when rendering the page then it's going to take some time before the user is able to see the page; Remember if you overworking the server then it's going to be a bad experience for all the users. This becomes an issue when you have stuff like dropdowns, accordions or any kind of input/data driven components; You don't want to fetch the data upfront unless the user is interacting with the component. I think this "hype" is something created by the cloud software companies like Vercel to boost their revenue. The more server side resources you consume, the more you have to pay these companies, draining your pocket and filling theirs. Don't go with the hype, think before you code!

    • @okkashaally2115
      @okkashaally2115 2 หลายเดือนก่อน

      😂😂 you need to learn more about web performance

    • @nymez6968
      @nymez6968 หลายเดือนก่อน +1

      Well that‘s why you don‘t do that. Blocking the initial page load until some potentially long running operation is done screws you no matter which Framework you use. You need to learn about React Suspense. Understand how to use the tech before starting to complain about it.

  • @jotaroisdarius1918
    @jotaroisdarius1918 8 หลายเดือนก่อน +9

    The only thing I hate about nextjs is that it's hard to host it anywhere other than vercel or something like netlify, and we all know vercel's pricing isn't the cheapest

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +6

      Yea I have heard horror stories about next on other platforms. Vercel is great at small scale but yea the pricing as you scale is absurd, a literal 5-10x markup on AWS sucks a lot

    • @marvinkr
      @marvinkr 8 หลายเดือนก่อน +1

      There are videos on TH-cam on how to host Next on other platforms

    • @igortalic2021
      @igortalic2021 8 หลายเดือนก่อน

      If you want Serverless good luck, and SST is not a solution still young still has many problems, we tried it. So docker or vercel it is 😅

    • @miguelalzate4850
      @miguelalzate4850 8 หลายเดือนก่อน +2

      The same thing happened to me with sveltekit until I decided to just create a docker image and deploy it on railways. With docker, deployments are much easier.

    • @igortalic2021
      @igortalic2021 8 หลายเดือนก่อน

      @@miguelalzate4850 Really? I was thinking that sveltekit didn't have that problem, I hope that the new version of SST will fix some issues :D

  • @tomich20
    @tomich20 8 หลายเดือนก่อน +7

    I prefer sveltekit, but had to switch to nextJs because of the community and the amount of libraries and plugins. UI libraries, Datatables, Full proejct examples online, etc.

    • @DoctorMandible
      @DoctorMandible 3 หลายเดือนก่อน +2

      Svelte can use any vanilla js library, typically with no extra effort. Worst case scenario you simply use the library in a js/ts file and then export the functions and classes you need into your svelte file.

  • @adrianjdelgado
    @adrianjdelgado 8 หลายเดือนก่อน +1

    I'm the other way around, I come from React too and definitively don't miss it. But server components seem very appealing.

  • @lebenoa
    @lebenoa 8 หลายเดือนก่อน +2

    The only thing that keep me on Svelte/Kit is transitions. So easy that I can't live without it anymore. Until Leptos (Rust) or someone willing to commit to Zig and do something similar I do NOT think I will ever leave Svelte/Kit behind.

    • @NathanielBabalola
      @NathanielBabalola 8 หลายเดือนก่อน

      Is it easier than Vue ? I'm a Backend Dev looking to go Fullstack, trying to choose between Vue and Svelte.

    • @lebenoa
      @lebenoa 8 หลายเดือนก่อน

      @@NathanielBabalola First, I don't know Vue but taking a look at their docs seems like you need to do some CSS and this is a matter of your opinion. I think Svelte is simpler but not as customizable as Vue (although you can create custom transition in Svelte, It's a pain).
      Why Svelte is simpler is that you don't need to do CSS and just
      `import { fade } from 'svelte/transition'`
      and just use it on element directly:
      `This will fade in and out on create and destroy`
      You can take a look at the examples. Just search for '{framework} transitions'.

    • @Methapon2001
      @Methapon2001 7 หลายเดือนก่อน +1

      @NathanielBabalola
      If it is about transitions, In svelte it is just include "transition:fade" , "in:fade" or "out:fade" in html tag just like that. And about Vue you have to declare CSS class, I don't know if there is any other method in Vue because I just use UI framework.
      If it is about front-end only framework then I don't think it is that much of a different. In Vuestate is ref() in svelte 4 is just "let" and in svelte 5 is $state(). Vue use Virtual DOM while svelte not.
      If you understand how state works I don't think you will have a problem switching between different front-end framework. It is just a state with different underlying method like react state use hook, Vue state use signal.

  • @squ34ky
    @squ34ky 8 หลายเดือนก่อน +37

    I'm a staunch proponent of using a real backend language for your backend, like Go.

    • @zBrain0
      @zBrain0 8 หลายเดือนก่อน +14

      The problem is typing. And by that I mean both creating types and pushing buttons on your keyboard. When I use a typescript backend I can enforce my apis to conform to a specific model and the important part is I only have to write it once. I don't have to make sure that my models in whatever language match my models in the front end, because I can use the same models. It saves so many headaches. Go is great in a lot of ways, but writing everything in two languages just isn't worth it unless you have a specific backend use case that requires a high level of multithreading for some reason.

    • @Kats0unam1
      @Kats0unam1 8 หลายเดือนก่อน +13

      @@zBrain0 "writing everything in two languages just isn't worth"
      Oh my fucking god. We it rock bottom. You literally just said that writing a backend in a proper language that is not fake type safety is not worth it. Just just fake type safety, good look maintaining that project dependencies in the next 5 years. I'm doing that right now and its a pain in the ass.
      But yeah, If you wanna keep doing your startup bullshit and side gigs, use whatever you want.

    • @ElLevidente
      @ElLevidente 8 หลายเดือนก่อน

      " If you wanna keep doing your startup bullshit and side gigs, use whatever you want"
      If you're saying you wouldn't write your startup in Go, aren't you agreeing with the main point of the video?@@Kats0unam1

    • @FabuBrik
      @FabuBrik 8 หลายเดือนก่อน +6

      "real backend language" is silly but I get what you're saying. There's no silver bullet and it's all tradeoffs. For a production grade application there are more things to consider, but for solo dev side projects, it's a much better experience writing everything in one language.

    • @zBrain0
      @zBrain0 8 หลายเดือนก่อน

      @Kats0unam1 ok son. Apparently you have never tried supabase. Good luck when your backend team makes a change and your api breaks because by definition you can't guarantee they are going to match. Have fun with that.

  • @fcnealvillangca7943
    @fcnealvillangca7943 7 หลายเดือนก่อน +6

    it's faster for me to finish in sveltkit so I went sveltekit

  • @GabrielGasp
    @GabrielGasp 8 หลายเดือนก่อน +6

    Unfortunately I don’t have time to study and stay proficient in 2 frontend frameworks, and money is currently in Next, so that’s where I am at the moment.

    • @edgardevelops
      @edgardevelops 7 หลายเดือนก่อน

      same with me.

    • @Indonesia_Emas_
      @Indonesia_Emas_ 6 หลายเดือนก่อน +2

      bruh learning frontend is not that hard, a couple days you are ready to rock, learning ai is something challenging.

    • @GabrielGasp
      @GabrielGasp 6 หลายเดือนก่อน

      @@Indonesia_Emas_ sure, now go and center a div for me.

    • @edgardevelops
      @edgardevelops 6 หลายเดือนก่อน

      @@Indonesia_Emas_ couple of days to learn frontend? have you worked on a large codebase before? Implemented features no library exist to help?
      If you can learn frontend + every popping frameworks + ui frameworks + libraries in just couple of days. Salute to you.

    • @Indonesia_Emas_
      @Indonesia_Emas_ 6 หลายเดือนก่อน +3

      @@edgardevelops yes, the frontend logic are just same, just with different sintax

  • @good-dev-student
    @good-dev-student 8 หลายเดือนก่อน +2

    Any new video using open ai chatgpt project example ? Using sveltkit ?

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +2

      Just built the example project today :)

    • @good-dev-student
      @good-dev-student 8 หลายเดือนก่อน

      @bmdavis419 cool 😎 you the top youtubers that I follow and like you're awesome man 👌

  • @mehdikhody
    @mehdikhody 8 หลายเดือนก่อน +2

    You can have streamed data in sveltekit as well.

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน

      True

    • @ShourovRoy-pk5zm
      @ShourovRoy-pk5zm 4 หลายเดือนก่อน

      But they are not ssr supported like nextjs

  • @0lange
    @0lange 8 หลายเดือนก่อน +3

    Auth with sveltekit still gets me to this day, was trying to implement the auth with supabase but the set up seem so complex

    • @bmdavis419
      @bmdavis419  7 หลายเดือนก่อน

      Its not actually complex, the docs just suck, just the video I just uploaded!

    • @scaffus
      @scaffus 6 หลายเดือนก่อน

      I found it's the other way around for me ahah

    • @Indonesia_Emas_
      @Indonesia_Emas_ 6 หลายเดือนก่อน

      firebase already great and free and you can crate your own jwt token, you just need to practice more and gather more information.

  • @boccobadz
    @boccobadz 8 หลายเดือนก่อน +10

    How can one say that Svelte ecosystem is not great? I guess that's your biased "react devs". Svelte ecosystem is JavaScript ecosystem. You can use any library that is out there. On the other hand, to use libs in React you need some weird bindings (aka "the react way"), which have nothing to do with JS lib, docs often aren't there or are clanky at best, etc - eg Apache eCharts is a great example - amazing to work with in Sveltekit (even when doing the most complicated stuff well beyond the docs) and abysmal experience in React/Next world (to even run the simplest charts). And that's only one example, there are countless out there. With Svelte 5 it will be even better. React is just bloated mess at this point.

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +1

      Yea this is a good point honestly, what I more mean when I say react has better ecosystem is that when a company makes an SDK for their thing, 9/10 they will have a special optimized one for react, but not for the other frameworks and you have to work around it which can be kinda annoying

  • @HONjramiroz98
    @HONjramiroz98 8 หลายเดือนก่อน +1

    I thought I was subscribed
    Sorry, now I am 😊

  • @ShourovRoy-pk5zm
    @ShourovRoy-pk5zm 4 หลายเดือนก่อน +1

    In sveltekit the load function stop the routing until tge data fetching complete and if you are thinking about stream with promises. Then it won't be server rendered. Where in nextjs suspense data can be found in pageview html data.
    Its a huge with for Nextjs

    • @DoctorMandible
      @DoctorMandible 3 หลายเดือนก่อน

      Await each data object seperately in your load return. Like return { await dataObjectA, await dataObjectB}. Then when they are brought into your page they will load individually, lazily

  • @good-dev-student
    @good-dev-student 8 หลายเดือนก่อน +1

    ❤❤ great video 🎉

  • @nrgstudios612
    @nrgstudios612 5 หลายเดือนก่อน +1

    Speaking of more templates for Svelte, if anybody knows any templates for SvelteKit that uses Supabase Auth lemme know

    • @bmdavis419
      @bmdavis419  5 หลายเดือนก่อน +1

      I'll have a video on this pretty soon

    • @nrgstudios612
      @nrgstudios612 5 หลายเดือนก่อน

      @@bmdavis419 Awesome! Please be sure to include the repo as well 😅

  • @NathanielBabalola
    @NathanielBabalola 8 หลายเดือนก่อน +4

    Jack Harlow 😂

  • @greendsnow
    @greendsnow 8 หลายเดือนก่อน +4

    I can't deal with the lack of nice UI kits in Sveltekit anymore. I value my time in that matter... Writing react doesn't seem like a pain after seeing how many hours you need to spend to get a professional looking app with Svelte.

    • @emmanuelezeagwula7436
      @emmanuelezeagwula7436 8 หลายเดือนก่อน +1

      Though I prefer react as well but I saw that svelte has their own version of shadcn ui, skeleton or Melt

    • @Sillyvan
      @Sillyvan 8 หลายเดือนก่อน +11

      "I can't deal with the lack of nice UI kits" sounds like you build multiple sites a month which all of need a completly different UI
      the big names are literally usable in svelte. and saying "value my time" just means ur too lazy to write your own styling. this will be an issue no matter the framework you choose

    • @zBrain0
      @zBrain0 8 หลายเดือนก่อน +3

      Second vote here for shad cn svelte. With either some copy and pasting or a few command lines you have a set of components that have really good defaults and if you want to you can customize them. Problem solved. React had its day in my opinion, but with tiny bundle sizes, soon to be really crazy accurate levels of reactivity in version 5 and just a hell of a lot less boilerplate for me it's not even worth considering react in 2024

  • @AqibRime
    @AqibRime 8 หลายเดือนก่อน

    what about qwikjs?

    • @fcnealvillangca7943
      @fcnealvillangca7943 7 หลายเดือนก่อน

      And yet another virtual dom

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 7 หลายเดือนก่อน

      Qwik is not that appealing because of too many requests for user interaction, normally it is better to expend 3 seconds for the page to load and user interaction be instant than load the page instantly and user interaction takes 500ms
      Astrojs with island architecture is the way if you want really good SEO scores
      Nowadays people are focusing on HTMX to reduce web development complexity

  • @rahem8004
    @rahem8004 8 หลายเดือนก่อน +1

    Can you take a look hugo & svelte?, well explained ❤

  • @twd2
    @twd2 8 หลายเดือนก่อน +1

    Simplified illustration...

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +1

      Very much so yes, there is way more nuance and complexity I obviously did not cover here, but this gets the high level point of the frameworks across

    • @twd2
      @twd2 8 หลายเดือนก่อน

      Yeb, indeed, the way of splitting the client side of server side in Sveltekit is pretty good, plus, if we can call it merging them in the "Form Actions" in a magical way, I think that's what makes Sveltekit more predictable when dealing with "Form Actions" !!!

  • @boot-strapper
    @boot-strapper 6 หลายเดือนก่อน +1

    nextjs suuuuucks. Just use svelte, solid, or hell even vanilla js.

  • @pookiepats
    @pookiepats 2 หลายเดือนก่อน

    I thought this dude was a Go dev…lmao wtf happened

  • @focused_morning
    @focused_morning 7 หลายเดือนก่อน

    Just here to let you all know how great Remix is. Have a good day.

    • @bmdavis419
      @bmdavis419  7 หลายเดือนก่อน

      remix is fire

    • @acopier
      @acopier 4 หลายเดือนก่อน

      it doesnt even have csrf out of the box

  • @quantum-ng8bs
    @quantum-ng8bs 8 หลายเดือนก่อน

    Laravel >> SvelteKit > Next.js

    • @rerere1569
      @rerere1569 8 หลายเดือนก่อน +2

      I used to develop using Laravel, but not going back. I really don't see what's better about it, it works even slower than node/bun based frameworks, worse type safety, the PHP itself is even worse than JS in terms of dx

    • @iulikdev
      @iulikdev หลายเดือนก่อน

      We are in 2024 and you say Laravel?! 🤣🤣🤣

  • @Kats0unam1
    @Kats0unam1 8 หลายเดือนก่อน +1

    Here is an idea from someone who used to follow you and doesn't anymore, because I think your takes are questionable:
    How about we dont use a fake type system like Typescript on the server and use a proper language (C#, Go, Java) on the backend and just use Typescript for what was intended to, aka, manipulate the DOM on the browser.
    I have a medium side project that will go to prod maybe next month with Go, HTMX, Templ, Tailwind, PGX. The only js dependencies I have are arc to display some curved lines on openlayers, htmx, and tippyjs to display some tooltips on the map. I installed tailwind though the CLI which means I have 0 need for node_modules and package.json management. 0 js library dependencies and maintenance in 5 years when I want to add / bug fix my projects ? Count me in.

    • @EECyrpys
      @EECyrpys 8 หลายเดือนก่อน +3

      I'm not an expert, but SvelteKit has this nice thing were you are in a sense more "declarative" in your construction. You load all the data you need to build your page. Then you use the data to build your page. In your page you have a bunch of forms that allow the user to submit information that will potentially change the data on the server. Now the fun part is that you don't have to worry about updating all the potential parts on the page that will have to be updated with the new data - you just call to "invalidate" those fetch requests whose data may have been affected by the form submit.
      You could write an API backend in Go and still use SvelteKit, but it seems the issue is that you end up writing stuff twice, types become more painful.

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +1

      I've said before and I'll say again that I pretty much agree with this, its just that for MY use cases, fullstack TS is better. I am on a small team that has to move fast, I have a separate go in backend in prod rn, and it sucks to maintain. No one disagrees that Go is a faster/stronger language for the backend, its just that TS can get the job done. And it gets the job done way better then I think people give it credit for...

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +2

      "you end up writing stuff twice, types become more painful" EXACTLY I WENT THROUGH THIS EXACT THING

    • @Kats0unam1
      @Kats0unam1 8 หลายเดือนก่อน

      @@bmdavis419
      "you end up writing stuff twice, types become more painful"
      yeah so.. what you mean is... you have to... type.. code ? Crazy concept.
      You write typescript and you dont enjoy writing type for the backend schema. There is a solution for that, its called Javascript.

  • @soulaimanebougraou2363
    @soulaimanebougraou2363 8 หลายเดือนก่อน

    Ur opinion is irrelevant

    • @ElLevidente
      @ElLevidente 8 หลายเดือนก่อน +6

      Why are you watching the video then? Must be relevant to you.

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +3

      based

    • @dave-7117
      @dave-7117 8 หลายเดือนก่อน +1

      I dont understand why people are so mean. You dont Show your face in Public as he does. You can have your own opinion but unless you dont speak in public you wont help anyone or change anything.
      @bmdavis419 Keep on sharing your thoughts, always nice too see how others are looking at the current situation.

    • @bmdavis419
      @bmdavis419  7 หลายเดือนก่อน +4

      @@dave-7117 appreciate it man, honestly I don't really care if people are mean on the internet, it gives more engagement which helps the channel and I earnestly believe in what I'm saying/making and thats enough for me

  • @iulikdev
    @iulikdev 6 หลายเดือนก่อน +2

    Only sveltekit... forever!