What is JAMStack?

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

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

  • @bawad
    @bawad  3 ปีที่แล้ว +68

    Note: Next.js doesn't only do SSR now, you can also do CSR/static as well

  • @sushilbansalk
    @sushilbansalk 4 ปีที่แล้ว +157

    I have done lot of research (and learning) in this area specifically. There are 4 different models: CSR, SSR, static, pre-rendering. I am sharing my experience (it might not fully accurate as it has been only 1-2 months that i am using nextjs and gatsby):
    1) CSR (CRA): we all are aware. Should be used for applications (like todos, banking/finance etc). There are lot of tools to make it SEO friendly. You can use pre-rendering (react-static, react-snap) with react-helmet. You are good to go.
    2) SSR (next js): dynamic data (which changes quite often like eCommerce products) and you need better SEO. However Dynamic data and SEO - you can get with CSR as well with react-helmet. Main Advantage of SSR is: You get to see the initial html within 5-10 milli seconds. Then server will send you the data and app will get rehydrated. Subsequent pages will behave like client side pages (fast response) and no whole page updates (unlike typical SSR) which feels good. SSR can handle any number of dynamic pages.
    3) Static (gatsby): Blogs. It is fast (super super fast). Can handle dynamic data as well but not the main goal. SEO is built in and caching is awesome. reactjs website is built using gatsby.
    4) pre-rendering (react-static, react-snap): These are built on top of CRA. React-Snap can be used with other frameworks as well. pre-rendering should be used for something in between CSR and Static. If you already have an app built using CRA then use this method. Generally 5-10 lines (depending upon the use case) of coding will get you good results in terms of initial html display and SEO. But it should be used carefully. Pre-redering will build (convert them into static plus dynamic) your pages in advance. If you have got too much dynamic content it will take lot of time. In that case it is better to go with SSR. But you can start immediately before making a transition to SSR.
    There are many options these days. You need to think what is your use case and choose appropriately. Happy holidays and happy coding :)

    • @tobias3581
      @tobias3581 4 ปีที่แล้ว +1

      Thanks so much 🙏

    • @themysteriousindian8694
      @themysteriousindian8694 4 ปีที่แล้ว

      In order to increase the page responsiveness in low time and implementing data compression in images usages of new stacks are being done on a vast scale if you roll over and find you may see a lot of e-commerce page using static site generators earlier there was a problem with language translation now even those are fixed everybody loves speed it maintains reputation with good SEO.

    • @mohammedmaaz1765
      @mohammedmaaz1765 4 ปีที่แล้ว +6

      Nice summary. However two things I want to add:
      1) react-helmet is no way comparable to SEO capabilities of SSR or Static Sites as with react helmet you can't get SEO on fetched content. Which is essentially a limitation of any SPA.
      2) One more significant advantage you get for a SSR or Static Site is security as api calls are being made by the server (at build or request time) and not the client itself.

    • @nidhikaurbagga8482
      @nidhikaurbagga8482 3 ปีที่แล้ว +3

      Note:- there is also (ISR) incremental static rendering or hybrid rendering offered by Next.js and angular respectively.

  • @dariobntz8337
    @dariobntz8337 4 ปีที่แล้ว +80

    this chanell is so under rated

    • @bawad
      @bawad  4 ปีที่แล้ว +16

      thanks :)

    • @l_combo
      @l_combo 4 ปีที่แล้ว +9

      Not enough Angular bashing IMO :)

    • @noah-4482
      @noah-4482 3 ปีที่แล้ว +2

      Agreed

  • @fr3fou
    @fr3fou 4 ปีที่แล้ว +19

    or in short: do as much as you can at compile time not runtime

  • @thewirv
    @thewirv 3 ปีที่แล้ว +3

    This should definitely get an updated follow-up, now that Vercel (formerly ZEIT, who made Next.js) has become such a big alternative to Netlify. Also it's (obviously) so tightly integrated with Next, which has gotten a huge bump with v10 imho

  • @LambOverSpicyRice
    @LambOverSpicyRice 4 ปีที่แล้ว +12

    The absolute best video I’ve come across on this topic. Thank you Ben, JAMStack has finally clicked for me!

  • @deanwalliss8739
    @deanwalliss8739 4 ปีที่แล้ว +2

    Great explanation - especially about the trade-offs involved. However, none of this seems particularly new. People have been deploying mostly-static web sites which front a wall of JSON APIs for the dynamic stuff for years haven't they? Am I missing something?

  • @BenRangel
    @BenRangel 3 ปีที่แล้ว +1

    Haven't heard of Serverless Pre-Rendering but it basically sounds like an age-old practice that many news article sites have done for a long time: basically having SSR on a server and setting headers for edge-cache which means your CDN caches the page after it's been requested once.
    Usually you just cache for a few minutes, meaning that requests for a rarely visited article might go down to your server every time. But popular pages with thousands of visits per minute will often just result in a handful of requests reaching the server, the rest handled just return cached HTML from the CDN.

  • @spongechameleon6940
    @spongechameleon6940 4 ปีที่แล้ว +2

    Man so many terms in this industry!! Had no idea what this was but as it turns out I guess I just built a jamstack project lol

  • @blasttrash
    @blasttrash 4 ปีที่แล้ว +2

    THere is hugo btw, which is very fast static site generator. way faster than gatsby from what I hear.

  • @elvyphie6176
    @elvyphie6176 4 ปีที่แล้ว +3

    thank u mr asexual shirt

  • @SayfSentinel
    @SayfSentinel 4 ปีที่แล้ว +2

    Hi there Ben
    In a previous video you said you hate front-end. And I’m in the same boat as you, I just cannot stand CSS I just hate it with passion.
    But still I see you develop in react which is the view in an MVC model
    How do you manage then the front end development of a project ? If a client come with a PSD design what do you do

    • @bawad
      @bawad  4 ปีที่แล้ว +3

      I don't love working with css, but I know how to do it
      if a client came with a PSD design then I'd be able to build it

  • @Mia-cw1du
    @Mia-cw1du 4 ปีที่แล้ว +3

    1:05 when I first saw it, I thought it's an Twig template as they have almost (if not completely) the same syntax

  • @CouchPotatoWizard
    @CouchPotatoWizard 4 ปีที่แล้ว +6

    mind reader. I was googling about the definition of the JAM stack yesterday.

  • @uelude
    @uelude 4 ปีที่แล้ว

    Do your housemates /family hate you making videos.. on the important points they are throwing plates around and turning the TV right up 😂
    Annoying listening on headphones..
    You need one of those red "REC"recording lamps.. although that might actually make them louder as it sounds like they're doing it on purpose lol 😂
    Love you work anyway 😊😊

  • @boot-strapper
    @boot-strapper 3 ปีที่แล้ว

    pretty sure google crawls SPAs just fine now adays, so thats probably the ultimate way to do this.

  • @JaseyStudios
    @JaseyStudios 4 ปีที่แล้ว +1

    Could I make a JAMstack website without using any libraries (no react, no angular, no vue)?

    • @bawad
      @bawad  4 ปีที่แล้ว

      yeah

    • @aestheticallyamazing2003
      @aestheticallyamazing2003 4 ปีที่แล้ว

      @@bawad how thou

    • @uelude
      @uelude 4 ปีที่แล้ว

      @@aestheticallyamazing2003 use html. watch the video

  • @PlanetComputer
    @PlanetComputer 3 ปีที่แล้ว

    ok

  • @sreekumarmenon
    @sreekumarmenon 4 ปีที่แล้ว +1

    @ben , nice intro to JAMstack, what are your thoughts on headless CMS strapi?

    • @bawad
      @bawad  4 ปีที่แล้ว +2

      Never tried it

  • @generalmorozzzz
    @generalmorozzzz 4 ปีที่แล้ว

    This is a very good video but I think you should just call it client side Rendering if you are not using pre-built markup

  • @mohsinejaz6882
    @mohsinejaz6882 3 ปีที่แล้ว

    Awsome Ben... Your vedios are great for learning. Thanks Alot

  • @mornelouw
    @mornelouw 3 ปีที่แล้ว

    Well done. Just the right info presented in just the right way!

  • @happysloth91
    @happysloth91 4 ปีที่แล้ว

    I'm not sure server side rendering make it your project out of the JAM Stack. I mean, what is a static website anyway, just some html sent to the browser. So prefetching data on the server to send "non empty" html file is kind of the same, no template engine, still just javascript. That said, I don't think it's that important to call something JAM Stack or not. Thanks for your videos mate !

    • @bawad
      @bawad  4 ปีที่แล้ว

      the big deal is being able to leverage a CDN

  • @johnpaulbamberg8954
    @johnpaulbamberg8954 4 ปีที่แล้ว

    Wait so is create-react-app a statically generated site or are SPA statically generated sites? It's definitely not SSR, in the end you get a single html file? So where do these fall?

    • @richard.torres
      @richard.torres 4 ปีที่แล้ว

      It sort of depends on how you're using it. If you host a production build of Create React App on a static hosting site and are fetching data through an API set up elsewhere, then the CRA is considered JAMStack. If you're using CRA on a webserver along side your API framework (like Express), then you don't get the benefits of JAMStack. A SPA, or multi-page application, can fall under either category, depending on how you set it up.

  • @Steve_360
    @Steve_360 3 ปีที่แล้ว

    I really enjoy listening to your explanations

  • @illwilldabeast86
    @illwilldabeast86 3 ปีที่แล้ว

    This is rad. Thank you. Subscribed.

  • @SchockBlocked
    @SchockBlocked 3 ปีที่แล้ว

    Thanks Ben for another "Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh............." moment XD

  • @Christopher-ew7jw
    @Christopher-ew7jw 3 ปีที่แล้ว

    I love Netlify

  • @mufassirshah9376
    @mufassirshah9376 4 ปีที่แล้ว +1

    Most of us already now it's just be given a word that sounds like something really difficult, just they've been doing it from the word go. Strapi, headless CMS and Gatsby is the one that i use. :)

  • @TheRomane71193
    @TheRomane71193 4 ปีที่แล้ว

    How exactly are the CDN's structured ?

    • @bawad
      @bawad  4 ปีที่แล้ว

      I don't know too much about the internals of a CDN

  • @CouchPotatoWizard
    @CouchPotatoWizard 4 ปีที่แล้ว +2

    So SRR SPA is not a duality but a gradation. Can you do a video on different degrees of SSR and a brief advantage/disadvantage on each?

    • @bawad
      @bawad  4 ปีที่แล้ว +1

      What are you considering different degrees of SSR?

  • @dovh49
    @dovh49 4 ปีที่แล้ว

    Hugo site generator is blazing fast! So, if you have a large site this wouldn't be an issue with it. And there are probably some other work arounds you can do. Like breaking up your site into different segments.

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      It will not do your work for you.

    • @dovh49
      @dovh49 4 ปีที่แล้ว

      @@aammssaamm Right, Hugo won't do your work for you. But when you have a large site that you want to be static it is one of the fastest static site generators from what I understand. So, it makes scaling easier.
      But if you have a really large site then you need to figure out different methods for scaling, like possibly breaking the site up into different segments so you don't have to generate quite so many files all at once.
      Then again. Maybe a dynamic site would make sense at that point. Where you might only cache the html file only after it has been requested once. I can't imagine a site that is that large would really need to show every single file in the site. It's more about the meta data and creating links.

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      @@dovh49 Sounds like a mess.

    • @dovh49
      @dovh49 4 ปีที่แล้ว

      @@aammssaamm Yes, for large sites in large companies who need high performance things get really messy. And you sound like a bot.
      Yes, I'm chatting with a bot :-/

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      @@dovh49 I seem to nail it since you went personal :) If you worked for a large company you would know they have enough money for better solutions.

  • @jepoyvelasco4176
    @jepoyvelasco4176 4 ปีที่แล้ว +2

    counted it, 2 eye blinks/ minute.

  • @frankyb702
    @frankyb702 4 ปีที่แล้ว

    How does one handle user specific content like shopping carts? How do sessions work?

    • @panstromek
      @panstromek 4 ปีที่แล้ว +1

      You usually generate only the common stuff and than call the api to fetch the rest, user specific stuff and render that on client.

    • @bawad
      @bawad  4 ปีที่แล้ว

      @@panstromek exactly and then sessions are usually stored in a cookie or jwt

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      API call.

  • @dovh49
    @dovh49 4 ปีที่แล้ว

    I don't see why you can't have static HTML pages and then call APIs that return HTML partials and then include that into your page. I would still think that would be a "JAMStack"

    • @bawad
      @bawad  4 ปีที่แล้ว +2

      I think it would be closer to the JAMStack philosophy if you returned JSON data from your api and you created the HTML partials on the frontend

    • @dovh49
      @dovh49 4 ปีที่แล้ว

      @@bawad Yeah, I agree most of the time most people would be returning JSON. But there is nothing in the philosophy that says it has to be JSON. I could be HTML partials, CSV, XML or some other data exchange. The main point in JAMStack is that you don't rely on a single source for all your APIs that you use third parties where it makes sense so you don't have to scale everything out on your own. jamstack.org

    • @bawad
      @bawad  4 ปีที่แล้ว

      fair enough, JAMStack is a loosely defined

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      You can. It makes your development a breath. The content can be also dynamic.

  • @dykejjj
    @dykejjj 4 ปีที่แล้ว +2

    Congrats to 1k videos!

    • @bawad
      @bawad  4 ปีที่แล้ว

      thank you!

  • @1998goodboy
    @1998goodboy 4 ปีที่แล้ว

    wtf is SEO

    • @bawad
      @bawad  4 ปีที่แล้ว +3

      Search Engine Optimization

  • @youneszadi2332
    @youneszadi2332 4 ปีที่แล้ว +1

    Love what you're doing, keep up this content

  • @meonitelexdee3432
    @meonitelexdee3432 4 ปีที่แล้ว +1

    how come a static generated site is not good for SEO since all the content is there online for google to crawl it ?? I think you did not explain the things correctly

    • @bawad
      @bawad  4 ปีที่แล้ว +1

      static is good for SEO, client side rending is bad

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      @@bawad Don'r render on a client :)

  • @mahmudsajib8648
    @mahmudsajib8648 3 ปีที่แล้ว +1

    Q: What is JAMStack?
    A: Another fancy JS shit.

  • @victormendoza3295
    @victormendoza3295 4 ปีที่แล้ว

    This looks cool, but I don't think I am ready for it yet. I am having enough trouble just keeping up with everything else on the devops/aws side let alone learning a new wheel. LAMP is good enough for now.

  • @shredder_plays
    @shredder_plays 4 ปีที่แล้ว

    Is netlify cms free??

    • @bawad
      @bawad  4 ปีที่แล้ว

      idk never heard of the cms

    • @bibibobs
      @bibibobs 4 ปีที่แล้ว

      Yeah

    • @zenahrb8316
      @zenahrb8316 4 ปีที่แล้ว

      @@bawad It's pretty nice deploy-wise

  • @txshon
    @txshon 4 ปีที่แล้ว +1

    It's kind of like meteorjs with python backend

  • @tractatusviii7465
    @tractatusviii7465 4 ปีที่แล้ว +1

    Dude that'd be so awesome if you made some django tutorials. Or even one about the basic moving parts and how the fit together, the views, the urls etc. Great stuff!

    • @mohamedelidrissi2839
      @mohamedelidrissi2839 4 ปีที่แล้ว +2

      Check out Traversy Media's django crash course

    • @bawad
      @bawad  4 ปีที่แล้ว +6

      no plans to do django tutorials at the moment, I'm enjoying node.js

  • @jrandiny3
    @jrandiny3 4 ปีที่แล้ว

    One of the pain point by loading things dynamically using ajax is that the developer need to manage all the loading state, error, etc compared to the traditional way when the browser handle that for you

  • @kumailn7662
    @kumailn7662 4 ปีที่แล้ว

    It was a good video, but you have overloaded with lots of information, I suggest to keep the video short and specific so things gets easily digested.

  • @FirdavsiWebDev
    @FirdavsiWebDev 4 ปีที่แล้ว

    What about separation?

    • @bawad
      @bawad  4 ปีที่แล้ว

      What do you mean?

    • @aammssaamm
      @aammssaamm 4 ปีที่แล้ว

      You just completely separate JS from HTML and CSS from JS.

  • @UnReaLgeek
    @UnReaLgeek 3 ปีที่แล้ว

    I watched this and grew a two foot long grey beard. Using another language to generate html files? What is this? Why don’t you just write the damn html file? What is going on? How have we gotten this needlessly complicated?
    Why do I have arthritis now?

    • @xfire3778
      @xfire3778 3 ปีที่แล้ว +1

      So you’ve never used react or angular before?

  • @ashuzon
    @ashuzon 3 ปีที่แล้ว +1

    What is jam stack? Well, I'll tell you what it isn't. Joke? Or irony?
    So let me tell you a story.
    When modern front end developers started to touch every area of development in a project, then jam stack was born. Also, hate for big frameworks and good knowledge of inner workings of js factored in its birth.
    Mean stack inst flexible because you're bound to just use the said tech. Otherwise you'll not be working with the mean stack. While jam stack gives you the freedom to use any front-end framework or even just vanilla js, which means jam stack gives you the real flexibility to bend on whatever tech you like the use.
    After, a minute or two I stopped watching the video because the content seemed obsolete and highly unrelatable. Hope, you'll revamp the video with new knowledge and correct concepts. And this time please tell what it really is!