SSG is dead. Long live cache.

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 136

  • @alexandruaxentioi3006
    @alexandruaxentioi3006 10 месяцев назад +20

    Rewritten a bunch of my projects in laravel since a while ago, always amazed about HOW EASY it is compared to any js framework + other complications, really similar to ruby on rails on speed

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +5

      Yessss love to hear it

    • @JeremyAndersonBoise
      @JeremyAndersonBoise 10 месяцев назад +1

      It’s like rails but DHH isn’t involved and PHP is measurably less awful than Ruby. Rails still has some juice but Laravel is eating their FOSS framework lunch nowadays.

  • @gradientO
    @gradientO 10 месяцев назад +37

    why is Aaron so ridiculously good looking?

    • @carlosescobar5995
      @carlosescobar5995 10 месяцев назад +27

      That's how PHP developers looks 😂

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +11

      I can only thank my mom and dad, I suppose! 🫶

    • @20toninho
      @20toninho 10 месяцев назад

      ​@@carlosescobar5995unfortunately for me, not all of us... 😢

    • @codedusting
      @codedusting 10 месяцев назад

      Genetics 🧬 doesn't care about equality 😂

    • @tsubasateacher
      @tsubasateacher 10 месяцев назад +3

      Bro, you forgot the #nohomo

  • @randomor
    @randomor 10 месяцев назад +6

    This is great idea for your needs. But if your needs are simpler, like only uses images and markdown files, try zero config ssg like zenmd, one cmd ‘npx run zenmd’ and boom you got a static site that is previewable on your file system (no server needed). Disclaimer: I made it last week.

  • @phpannotated
    @phpannotated 10 месяцев назад +4

    Yay another Aaron video! Thanks for the thought provoking content!
    ☝I do want to point out that the "cache everything with Cloudflare" approach is essentially the same as using a static generator: you're storing your web pages as static HTML and serving them directly. In my opinion, Cloudflare caching is simply another way of doing static site generation. In other words, you've proven that SSG is still the way to go! Always serve static content, unless you have a good use case to make things dynamic.

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      Hey Brent! Yeah the point is that you don't need a static site generator, not that you don't need static content. That's kinda the trick! You can get the best of both worlds without having to learn some cobbled together SSG.

    • @phpannotated
      @phpannotated 10 месяцев назад

      @@aarondfrancis Makes sense :)

  • @joshr96
    @joshr96 10 месяцев назад +4

    The one downside of server side render + cache is the misses but honestly probably not a big deal if your page renders fast enough. In the end probably more comes down to what you enjoy working with and the experience. Most of us are not serving millions of page requests per a day and require the uttermost lowest latency.

  • @kumaraveldotdev
    @kumaraveldotdev 10 месяцев назад +3

    I'm a big fan of your videos and the Sqlite technique was really impressive. 🤩

  • @tannercampbell
    @tannercampbell 10 месяцев назад +1

    5:42 why not use the cron/scheduler with Vapor just curios? My guess is to save a little cost and utilize the free GH actions?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +2

      Good question! I need to commit the content changes to the repo, so I do it in GHA

  • @LenWoodward
    @LenWoodward 10 месяцев назад +1

    Love these techniques. Do you have an anonymized version of this public, or as a package? It all looks so clean!

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +6

      I do not, but I'll write it up and put it on the very site featured in this video 🤯 Inception. I'll comment here when it's done

  • @SRVblueshero1
    @SRVblueshero1 7 месяцев назад

    Even though this is about avoiding SSGs, do you think it’s possible to use PHP as an SSG?

  • @tedmoyses2942
    @tedmoyses2942 10 месяцев назад

    Came for the clickbait/hot take title, stayed for the implementation. Neat job!

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Whew, the ultimate one/two punch! Glad the content lived up to the thumbnail!

    • @tedmoyses2942
      @tedmoyses2942 10 месяцев назад

      @@aarondfrancis this approach makes total sense. I have always thought that most SSGs are kinda neat but often felt like they had features shoe-horned into them awkwardly. Why not use a full fat framework you are familiar with that can do so much more. Front matter be damned

  • @bholmesdev
    @bholmesdev 10 месяцев назад +1

    Thanks for giving SQLite some love! I'll respectfully disagree SSGs are *dead* (HTML is the simplest cache), but I agree you don't need them if you know server-based frameworks like Laravel

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +2

      Sounds like Big Astro™ talking, to me! Haha kidding kidding. Yeah HTML is great, truly my first love. As with almost everything I make videos about, I'm trying to advocate for things I like and offer a different way of doing things, different than what most people are talking about on tech twitter.

    • @bholmesdev
      @bholmesdev 10 месяцев назад

      Haha nice, we need that! I've started playing with libraries from the laravel world like Alpine thanks to these vids. I'll need to try those cloudflare cache settings too 🙌@@aarondfrancis

  • @pixelations188
    @pixelations188 10 месяцев назад

    That mysql+planetscale plug was too smooth 🔥🔥

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      I'm a pro, what can I say 💅💅💅

  • @Pongant
    @Pongant Месяц назад

    Bit much for a markdown based static site no?

  • @JeremyAndersonBoise
    @JeremyAndersonBoise 10 месяцев назад

    Laravel with a well-configured CDN, S3-style object storage and solid caching is darn fast, within a certain scale…one that most sites/apps will never get anywhere near exceeding.

  • @DaviMartins99
    @DaviMartins99 10 месяцев назад

    Hey, Aaron, your website looks great and this was very insightful!
    P.S: I noticed a bit of horizontal scrolling on the homepage, not sure if it's just my PC.

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      Wuh oh! Thanks for the report, I'll check it out

  • @JustinJackson
    @JustinJackson 10 месяцев назад

    This was great. It gave me a bunch of ideas for my site. Thanks!

  • @ChrisSmith105
    @ChrisSmith105 10 месяцев назад

    PHP 8.1?! What is this the stone age!? Kidding... nice video. Will do on my site. May video make.

  • @andresgutgon
    @andresgutgon 9 месяцев назад

    Great video! one question, you also pay the Vapor fee no?

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад

      Yup! I pay for it for business stuff so I'm paying either way

  • @asparuhnestorov
    @asparuhnestorov 10 месяцев назад

    I have pretty good internet but could not get below 500ms loading /lists. Why your time is so different?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      haha you must've gotten it when I was playing with Vapor's gateway v2 without cloudflare on. Try again!

    • @Nikola-Video
      @Nikola-Video 10 месяцев назад

      @@aarondfrancis Yep, now its down to 150ms but I am in Europe. I dont know if cloudflare are supposed to use CDN for the cache ....

  • @adampatterson
    @adampatterson 10 месяцев назад

    Is there an easier way to find the channel Id other than viewing source and searching for channelId in the JSON?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Huh thats a good question. It shows up in the URL if you go to RUclips studio, but that presupposes it's *your* channel, which it might not be. I'm not sure other than that!

    • @adampatterson
      @adampatterson 10 месяцев назад

      @@aarondfrancis oh so it does!

  • @yannicksans7141
    @yannicksans7141 Месяц назад

    Clever ! Like It ....

  • @MrAmG17
    @MrAmG17 9 месяцев назад

    Sadly the links are not presable on youtube app. Also can't copy it easily..

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад

      Huh?

    • @MrAmG17
      @MrAmG17 9 месяцев назад

      @@aarondfrancis you need to add to your urls in desc :)

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад

      Ah cool. Thank you!

  • @codedusting
    @codedusting 10 месяцев назад

    How large of an application a SQLlite can handle?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      No idea, literally the first time I've ever used it in prod

    • @codedusting
      @codedusting 10 месяцев назад

      @@aarondfrancis Thanks.

  • @pablorgto
    @pablorgto 10 месяцев назад

    Please, make an video about the Drupal 10?? Thank you!!!

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      I don't know anything about Drupal!

  • @daethic421
    @daethic421 9 месяцев назад

    A-Aron, what code editor are you using please?

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад

      PHPStorm

    • @daethic421
      @daethic421 9 месяцев назад

      @@aarondfrancis Thanks AAron! Have a great day mate

  • @ricko13
    @ricko13 3 месяца назад

    1:31 that comment aged like milk Aaron 😅

  • @vishaldinesh
    @vishaldinesh 10 месяцев назад

    Hi Mr. Dunphy, although I'm a JS dev I love your videos keep them coming

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Happy to be of service!
      - Everyone's favorite sitcom dad (apparently)

  • @georgemcwilliams4466
    @georgemcwilliams4466 10 дней назад

    Let’s be clear, you proved a dynamic site is as fast as a static site by transforming a dynamic site into a static site. The truth is, you wanted to build static site in php and you were clever enough to do it and make it fun. Sometimes the only reason you really need is “it was fun” 😊

  • @languagelearningexperience6814
    @languagelearningexperience6814 10 месяцев назад

    This title made me happy lol

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq 10 месяцев назад

    is your personal website made by static site generator?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      Muy personal website is made using the methods in this video, which features my personal website. It's just Laravel

    • @HaifengZhu-pn3uq
      @HaifengZhu-pn3uq 10 месяцев назад

      @@aarondfrancis Thanks, is Laravel slower than next.js?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      @@HaifengZhu-pn3uq no idea. Apples and oranges

  • @GergelyCsermely
    @GergelyCsermely 9 месяцев назад

    Thanks

  • @anasouardini
    @anasouardini 10 месяцев назад

    WOW! a new way of presenting the same good gold SSG (though implementing it the hard way aka. "I prefer php more than js").

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      My old SSG was PHP also!

    • @anasouardini
      @anasouardini 10 месяцев назад

      ​@@aarondfrancis
      Ok, good to know, but that was not my main point: SSG is still in the core of your approach.
      Maybe, by "dead", you're referring to the current implementations, in that case, what are the limitations that pushed you towards implementing your own?
      Nevertheless, have you considered ISR/SSG+serverless? Just asking.

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      @@anasouardini I don't think my approach is fundamentally SSG tho. It's just a Laravel app that's super cached. Static content is great, is the SSG part that I don't think we need anymore

    • @anasouardini
      @anasouardini 10 месяцев назад

      ​I re-watched your video, but I still have the same conclusion.
      - You like static content
      - You don't like the generation (?) of it?
      The only difference I see is the output destination.
      The way already existing SS tools output/generate SS is what you don't like, I think. If so, what is the reason? I'm curious.

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      In my view, a static site generator generates a bundle of content, usually html and client side JS, that is then shipped out to some destination. My site is not generating a bundle of static content... It's serving html in response to requests, and then it's cached. That's why it's not a static site generator? I dunno man.

  • @StingSting844
    @StingSting844 10 месяцев назад

    Not this MF with another great video i can't skip

  • @tsubasateacher
    @tsubasateacher 10 месяцев назад

    Thanks! Bring back the cache!

  • @shmuelbisberg4396
    @shmuelbisberg4396 10 месяцев назад

    Sqlite on prod use case???
    Very interesting video!

  • @jsk9559
    @jsk9559 10 месяцев назад

    Great video!

  • @MightyMoud
    @MightyMoud 10 месяцев назад

    I have a genuine question: why do you guys have so many comments in Laravel codebases?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      In the core? I dunno honestly, it's a Taylor thing. I like it because I source dive a lot and I like seeing what the thought process was behind a piece of code!

    • @MightyMoud
      @MightyMoud 10 месяцев назад

      But even in the code you just showed. You had a comment on top of the call to purge the cache. In my company the PHP side codebase is full of comments too. It seems like a PHP developer habit… I find it odd tbh

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Oh ha, I dunno! Maybe it is a cultural thing! I'll start paying attention 🤔

    • @hayopapayo1717
      @hayopapayo1717 10 месяцев назад

      ​@@MightyMoudin Laravel you most often create files per command line. The file has boilerplate code with comments and I guess I am to lazy to delete the comments. But might be different in other places 🙂

  • @grugbrain
    @grugbrain 9 месяцев назад

    "I just happen to work there" 🤣

  • @feldinho
    @feldinho 10 месяцев назад

    SSG is just acoustic cache

  • @nonnnth
    @nonnnth 10 месяцев назад

    Everything can be the fastest application framework in the world. Angular did it, maybe Laravel can do it too 😁

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      Haha true. Laravel is indeed pretty fast already!

  • @pierbover
    @pierbover 9 месяцев назад +1

    yeah but free hosting

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад

      Where do you like to host?

    • @pierbover
      @pierbover 9 месяцев назад

      @@aarondfrancis static sites? These days Netlify and Clouflare but I've used pretty much anything under the sun.

    • @aarondfrancis
      @aarondfrancis  9 месяцев назад +1

      Nice, thanks. I've got ideas™️ so that's helpful

  • @jesseleite
    @jesseleite 10 месяцев назад

    You know, for someone who hot takes against hot takes...

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Hot thumbnail, lukewarm take

  • @swakemudi8682
    @swakemudi8682 10 месяцев назад

    ssg are dead. however static site is immortal

  • @hellelo.5840
    @hellelo.5840 10 месяцев назад +4

    This doesn't kill static site generators at all, this is just "I want to use laravel instead of next js"

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      You can use whichever framework you want! That was kinda the whole point. Is next even an SSG?

    • @hellelo.5840
      @hellelo.5840 10 месяцев назад

      @@aarondfrancis yes it is, and more

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      @@hellelo.5840 cool, sounds great! I'm all for using what you know and like.

  • @roberto_camp
    @roberto_camp 6 месяцев назад +2

    What do you think of a Hugo AWS S3 Cloudfront solution, for a customer facing SSL site?

  • @bigjoey1114
    @bigjoey1114 9 месяцев назад +2

    Interesting implementation. I think this stack would be great if you had a website pages + blog + webapp that all ran on Laravel. I think the beauty of SSGs is the shear simplicity and portability of the generated HTML files. No PHP updates, Laravel updates, or really any server infrastructure to worry about. I've been loving Hugo lately. BUT, if I need the backend capabilities of PHP and Laravel, this is a nice solution. Thanks for sharing!

  • @ripplesr5655
    @ripplesr5655 5 месяцев назад +1

    Dude, what do I have to spend my time on to come close to your massive database of knowledge?

    • @aarondfrancis
      @aarondfrancis  5 месяцев назад

      Haha you just have to be curious and try things! That's about it tbh

  • @engineerallthings
    @engineerallthings 10 месяцев назад +1

    Nice video and left me with some questions. Considering Vapor deploys to AWS, why is Cloudflare needed? Wouldn't caching on the gateway and cloudfront achieve the same thing?

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      TBH I didn't want to go in and figure out Cloudfront caching and I like having Cloudflare in front of everything that I do, it makes me feel warm and fuzzy. Cloudfront might work here just fine!

  • @JeremyAndersonBoise
    @JeremyAndersonBoise 10 месяцев назад +1

    Protip, “it doesn’t.”
    If your site needs to process more than 10k requests per minute consider using something other than Laravel. Don’t make assumptions, make measurements.

  • @JLarky
    @JLarky 10 месяцев назад +1

    "static sites is the only way to get fast response", well, no, static sites is the only way to copy paste my website to any place like 15 years later and it still works

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +3

      Static sites, sure. When was the last time you tried to run even a two year old static site *generator* though? That's what this video is about. Thanks for stopping by, as always. One day I'll make a video you agree with!

  • @SickBeard
    @SickBeard 10 месяцев назад +1

    Static site generators are dead ... proceeds to serve (essentially) static content via CF 🤣

  • @MightyMoud
    @MightyMoud 10 месяцев назад

    Are you telling that this is better than a “full stack” NextJS app with a “server-less” Postgres for my blog? Noooooo way!

  • @simonnjoroge933
    @simonnjoroge933 9 месяцев назад

    It amazes me how clean your glasses are, mine are always dusty. 😊

  • @carnavalesenpanama
    @carnavalesenpanama 10 месяцев назад

    I love all your videos and content from your personal youtube and planet scale youtube channel. I am always learning something new from you. Thank you!

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +2

      You're welcome! Glad they are helpful!

  • @zinatziaee5000
    @zinatziaee5000 10 месяцев назад

    🎉

  • @feldinho
    @feldinho 10 месяцев назад

    wait! you have a PODCAST?! subscribing, brb

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      Heck yeah! mostlytechnical.com

  • @TonyMessias
    @TonyMessias 10 месяцев назад

    Wild. I love it.

  • @nym49
    @nym49 10 месяцев назад

    "Sci-fi Books - This list has its own page."
    LIE!
    I'm not serious, of course. Just a heads up: It currently returns an error 500.
    Really curious to see what's on your list.

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад +1

      Oh shoot! Thanks. One sec

    • @aarondfrancis
      @aarondfrancis  10 месяцев назад

      aaronfrancis.com/books fixed! ❤️