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
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.
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.
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.
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!
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.
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.
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” 😊
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.
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
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.
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
"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
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!
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?
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!
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.
"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.
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.
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!
Huh thats a good question. It shows up in the URL if you go to UA-cam studio, but that presupposes it's *your* channel, which it might not be. I'm not sure other than that!
@@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
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!
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
@@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 🙂
@@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.
@@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
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.
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.
why is Aaron so ridiculously good looking?
That's how PHP developers looks 😂
I can only thank my mom and dad, I suppose! 🫶
@@carlosescobar5995unfortunately for me, not all of us... 😢
Genetics 🧬 doesn't care about equality 😂
Bro, you forgot the #nohomo
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
Yessss love to hear it
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.
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.
What do you think of a Hugo AWS S3 Cloudfront solution, for a customer facing SSL site?
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.
This doesn't kill static site generators at all, this is just "I want to use laravel instead of next js"
You can use whichever framework you want! That was kinda the whole point. Is next even an SSG?
@@aarondfrancis yes it is, and more
@@hellelo.5840 cool, sounds great! I'm all for using what you know and like.
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!
Dude, what do I have to spend my time on to come close to your massive database of knowledge?
Haha you just have to be curious and try things! That's about it tbh
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.
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.
@@aarondfrancis Makes sense :)
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” 😊
I'm a big fan of your videos and the Sqlite technique was really impressive. 🤩
Wild right? Thank you!
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.
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
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.
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
"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
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!
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?
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!
Bit much for a markdown based static site no?
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?
Good question! I need to commit the content changes to the repo, so I do it in GHA
1:31 that comment aged like milk Aaron 😅
Static site generators are dead ... proceeds to serve (essentially) static content via CF 🤣
Yes (unironically)
yeah but free hosting
Where do you like to host?
@@aarondfrancis static sites? These days Netlify and Clouflare but I've used pretty much anything under the sun.
Nice, thanks. I've got ideas™️ so that's helpful
Love these techniques. Do you have an anonymized version of this public, or as a package? It all looks so clean!
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
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.
PHP 8.1?! What is this the stone age!? Kidding... nice video. Will do on my site. May video make.
Clever ! Like It ....
Even though this is about avoiding SSGs, do you think it’s possible to use PHP as an SSG?
Are you telling that this is better than a “full stack” NextJS app with a “server-less” Postgres for my blog? Noooooo way!
🤐🤐🤐
Thanks
Everything can be the fastest application framework in the world. Angular did it, maybe Laravel can do it too 😁
Haha true. Laravel is indeed pretty fast already!
It amazes me how clean your glasses are, mine are always dusty. 😊
Not this MF with another great video i can't skip
"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.
Oh shoot! Thanks. One sec
aaronfrancis.com/books fixed! ❤️
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.
Wuh oh! Thanks for the report, I'll check it out
I have pretty good internet but could not get below 500ms loading /lists. Why your time is so different?
haha you must've gotten it when I was playing with Vapor's gateway v2 without cloudflare on. Try again!
@@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 ....
Please, make an video about the Drupal 10?? Thank you!!!
I don't know anything about Drupal!
ssg are dead. however static site is immortal
This title made me happy lol
This was great. It gave me a bunch of ideas for my site. Thanks!
Oh nice! Can't wait to see
Sqlite on prod use case???
Very interesting video!
Big if true
wait! you have a PODCAST?! subscribing, brb
Heck yeah! mostlytechnical.com
Great video! one question, you also pay the Vapor fee no?
Yup! I pay for it for business stuff so I'm paying either way
Hi Mr. Dunphy, although I'm a JS dev I love your videos keep them coming
Happy to be of service!
- Everyone's favorite sitcom dad (apparently)
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!
You're welcome! Glad they are helpful!
Is there an easier way to find the channel Id other than viewing source and searching for channelId in the JSON?
Huh thats a good question. It shows up in the URL if you go to UA-cam studio, but that presupposes it's *your* channel, which it might not be. I'm not sure other than that!
@@aarondfrancis oh so it does!
You know, for someone who hot takes against hot takes...
Hot thumbnail, lukewarm take
Came for the clickbait/hot take title, stayed for the implementation. Neat job!
Whew, the ultimate one/two punch! Glad the content lived up to the thumbnail!
@@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
🎉
I have a genuine question: why do you guys have so many comments in Laravel codebases?
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!
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
Oh ha, I dunno! Maybe it is a cultural thing! I'll start paying attention 🤔
@@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 🙂
How large of an application a SQLlite can handle?
No idea, literally the first time I've ever used it in prod
@@aarondfrancis Thanks.
Sadly the links are not presable on youtube app. Also can't copy it easily..
Huh?
@@aarondfrancis you need to add to your urls in desc :)
Ah cool. Thank you!
"I just happen to work there" 🤣
😂
SSG is just acoustic cache
A-Aron, what code editor are you using please?
PHPStorm
@@aarondfrancis Thanks AAron! Have a great day mate
WOW! a new way of presenting the same good gold SSG (though implementing it the hard way aka. "I prefer php more than js").
My old SSG was PHP also!
@@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.
@@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
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.
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.
Thanks! Bring back the cache!
Cache it all!
Great video!
That mysql+planetscale plug was too smooth 🔥🔥
I'm a pro, what can I say 💅💅💅
is your personal website made by static site generator?
Muy personal website is made using the methods in this video, which features my personal website. It's just Laravel
@@aarondfrancis Thanks, is Laravel slower than next.js?
@@HaifengZhu-pn3uq no idea. Apples and oranges
Wild. I love it.
Madlad, as they say