🏝️ The Server Islands hype is real!

  Рет қаралды 7,484

Coding in Public

Coding in Public

Күн бұрын

Join the early preview for my course! learnastro.dev
($20 off with the code SERVER_ISLANDS)
Server Islands are a new paradigm in Astro, letting you stream in MARKUP! from the server. This enables CDN caching of your static content while also allowing for customizable data rendered server-side. Let’s take a look!
🔗 Key Links 🔗
- Announcement: astro.build/bl...
- Blog post: astro.build/bl...
- RFC: github.com/wit...
Example 1
- server-defer.v...
Example 2
- server-islands...
- Github: github.com/wit...
---------------------------------------
📹 Related Videos 📹
- Astro Rendering Options: • Choosing between SSR, ...
---------------------------------------
🌐 Connect With Me 🌐
- Website: codinginpublic...
- Blog: chrispenningto...
- Twitter: / cpenned
- Patreon: / coding_in_public
- Buy Me a Coffee: www.buymeacoff...

Пікірлер: 37
@ComradeIntensE
@ComradeIntensE Ай бұрын
Awesome explanation Chris ! I learned so much from you, thank you 🍻🍺
@CodinginPublic
@CodinginPublic Ай бұрын
Glad you enjoyed it!
@chrispeele3746
@chrispeele3746 10 күн бұрын
Great content as always! I think by “customizable” you mean “dynamic”? Serves dynamic content to the user. Customizable implies the user customizing that element with various options or whatnot. Again, great video!
@Goyo_MGC
@Goyo_MGC Ай бұрын
Would love to see more in depth examples with nested island. What would be your approach on let's say a Server island that would need interactivity ? Would you convert it all to client or would you integrate a client island into the server island ? I like the concept of having multiple rendering pattern but it always scratch the surface and does not go to production level problems that might occur. All the best mate
@simonswiss
@simonswiss Ай бұрын
Awesome video Chris! Love how these server islands are so similar to client islands in concept - and as easy to use with Astro's wonderfully simple APIs 🔥
@masterfraud
@masterfraud Ай бұрын
I’ve been watching your videos for some time now, I really like your explanation and I plan soon to try out astro for my projects, top tier content
@dageddy
@dageddy Ай бұрын
Wonderful new Astro feature and great introductory video!
@MatTeague
@MatTeague Ай бұрын
I hope this comes to the course. Would love a more in-depth example
@facundoleonel487
@facundoleonel487 Ай бұрын
Awesome this feature changes a lot of things. I have a question, have you ever deployed to cpanel in an astro project?
@cb73
@cb73 Ай бұрын
So… basically htmx? I’m not seeing how that is streamed in.
@bobbyb6412
@bobbyb6412 Ай бұрын
still a bit confused how this is done if it's all just html? how is html slotted into a html site without using javascript? or is there like a mini javascript framework added ala htmx?
@dageddy
@dageddy Ай бұрын
There is a small JavaScript together with the main static page that fetches the island content.
@bobbyb6412
@bobbyb6412 Ай бұрын
@@dageddy ah okay, so it's a bit like htmx, was just confused there for a second
@CodinginPublic
@CodinginPublic Ай бұрын
I could have been clearer. There’s a small INLINE script, that does all the work but there’s no extra fetch for a JS bundle.
@bobbyb6412
@bobbyb6412 Ай бұрын
@@CodinginPublic what tripped me up about server islands, is that it seems a lot like HTMX except that you can only dynamically render the islands on a request/reload. seems like there is no way to only re-request a server island once the page is loaded (to check if the number of available rooms has changed in the mean time for example) correct? noob here
@user-tx4wj7qk4t
@user-tx4wj7qk4t Ай бұрын
As typical with web developers they say things that aren't true and then confuse everybody. Like how you typically hear that js only uses one thread. No it also uses the systems threads, having a main loop doesn't mean you can't use anything else otherwise async wouldn't be possible. So yes there's still js, the part that manipulated the Dom client side is the only difference but that doesn't sound as cool
@qazyhn94
@qazyhn94 Ай бұрын
basically react server components?
@user-tx4wj7qk4t
@user-tx4wj7qk4t Ай бұрын
So basically instead of a jamstack fetch that gets you JSON back which is then used by the client side JS to manipulate the DOM with, you do a fetch that has the server generate HTML or grab it from a cache which means you end up with 0 client side js besides fetches for about the same speed if not possibly faster (due to caching)?
@CodinginPublic
@CodinginPublic Ай бұрын
Yep! And you can statically render the pages using SGG if it fits your use case and get that core content cached on a distributed CDN for really fast FCP.
@user-tx4wj7qk4t
@user-tx4wj7qk4t Ай бұрын
@@CodinginPublic so are htmx and vite redundant?
@aldierygonzalez7249
@aldierygonzalez7249 Ай бұрын
@@user-tx4wj7qk4t No from what it seems this only targets initial render. If you were using htmx to do this streaming then you could go ahead and refactor it out 🎉! Otherwise if you were doing something like having a number next to the cart with the amount of items, that would need further interaction as the user uses the site like refetches for that one component.
@ElLevidente
@ElLevidente Ай бұрын
It's crazy how we already solved these problems more than 20 years ago with PHP and now the JS community acts like it's inventing these as new concepts
@chauchau0825
@chauchau0825 Ай бұрын
if anyone points out this obvious fact, they will be offended 😊
@Taddy_Mason
@Taddy_Mason Ай бұрын
Job security maybe?
@CodinginPublic
@CodinginPublic Ай бұрын
Ha well, a few thoughts. I know Astro in particular has leaned into the “back to PHP” memes at least and not everyone has written PHP, so it’s new to a lot of us that have just started in web dev. Nice to have the best of interactivity with JS and some of the tested web patterns. Thanks for your perspective.
@anyadatzaklatszjutub
@anyadatzaklatszjutub 27 күн бұрын
php had client level interactivity 20 years ago? that's new to me can someone link me a source if true? my understanding is that the island architecture in this form is relatively new i've heard Ryan Carnito talk about ... yahoo? or amazon? having some early internal frameworks that was basically islands, they just never used it in production, for reasons
@asimalqasmi7316
@asimalqasmi7316 Ай бұрын
Is it the same as parial rendering in Nextjs?
@CodinginPublic
@CodinginPublic Ай бұрын
Similar. Different infrastructure. Same basically result.
@okkashaally2115
@okkashaally2115 Ай бұрын
What's the difference with NextJS?
@CodinginPublic
@CodinginPublic Ай бұрын
Different infrastructure but same basic result.
@dynamohack
@dynamohack Ай бұрын
use php and forget any of it
@CodinginPublic
@CodinginPublic Ай бұрын
Ha someone else mentioned that PHP has had this for 2 decades. Nice to get it in JS land. Only two decades late. Ha
@petmik5022
@petmik5022 Ай бұрын
same principle XHR uses years Vaadin framework in Java, no js coding, web and server side components comunicate togehter, so Astro is good solution same way like Vaadin, but Vaadin os good for web apps, Astro I will use for more static sites, looks great
@CodinginPublic
@CodinginPublic Ай бұрын
Never heard of Vaadin. Cool. Thanks!
Astro Actions: the missing server action library
19:28
Astro
Рет қаралды 11 М.
Server Islands are really cool
35:07
Theo - t3․gg
Рет қаралды 69 М.
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 19 МЛН
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 41 МЛН
1ОШБ Да Вінчі навчання
00:14
AIRSOFT BALAN
Рет қаралды 6 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 6 МЛН
Choosing between SSR, SSG, and dynamic rendering in Astro
12:19
Coding in Public
Рет қаралды 17 М.
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 193 М.
Astro for Impatient Devs
10:35
Isaac Harris-Holt
Рет қаралды 10 М.
Working with Images in Astro
15:13
Coding in Public
Рет қаралды 7 М.
Is Astro getting too complex?
8:07
Coding in Public
Рет қаралды 4 М.
Why I’m Switching To Go in 2024
8:10
Awesome
Рет қаралды 54 М.
The Future of Astro is...
19:09
Astro
Рет қаралды 13 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 378 М.
Setting up a production ready VPS is a lot easier than I thought.
29:50
Elian van Cutsem - All Things Astro - DevWorld 2024
20:33
JSWORLD Conference
Рет қаралды 984
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 19 МЛН