Server Islands are really cool

Поділитися
Вставка

КОМЕНТАРІ • 261

  • @svuvich
    @svuvich 5 місяців тому +257

    hx-trigger="load" hx-get="/count" hx-swap="innerHTML"

    • @pooyatolideh9527
      @pooyatolideh9527 5 місяців тому +27

      red pill gang

    • @owenwexler7214
      @owenwexler7214 5 місяців тому +14

      How to pwn your frontend with thousands of extraneous network calls in one line of code
      I would definitely use Alpine for something like a counter that is heavily interacted with over HTMX (to be clear, I’m about mixing HTMX and Alpine and using each when appropriate to do so)

    • @rikschaaf
      @rikschaaf 5 місяців тому

      @@owenwexler7214 You could technically have the cdn go through an edge and have it strip out the hx-trigger="load" requests and have the edge do these calls and stream this to the client. It'd be as complex as PPR though.

    • @duckeggcarbonara
      @duckeggcarbonara 5 місяців тому

      Alpine AJAX is better than HTMX especially if you're already using Alpine. It's a very good plugin.

    • @theairaccumulator7144
      @theairaccumulator7144 5 місяців тому +14

      imagine putting application code in the markup. unmaintainable mess in the making

  • @O_Eduardo
    @O_Eduardo 5 місяців тому +109

    I´m genuinely confused... How´s that different from what we used to do 15 years ago by hosting static html and using js to fetch api and replacing some part of the view?
    Am I missing something?
    I´m starting to believe that people just forgot the way we used to do sites before SPA´s....

    • @ceigey-au
      @ceigey-au 5 місяців тому +13

      It’s the same concept (and also similar to HTMX), they’re just supporting it out of the box for their framework, which also supports other techniques eg client islands (parts of the page which are handed over to client side rendering for some frontend framework eg react or vue).
      So things are just returning to normal I guess 😅

    • @lucasmarin4040
      @lucasmarin4040 5 місяців тому +2

      Was it really like that? I don't remember hosting the static content in a cdn, I think thats the main difference.

    • @O_Eduardo
      @O_Eduardo 5 місяців тому +7

      @lucasmarin4040 I don't think so... we used to host static sites even before javascript. That technique regarding host static content and replace it with some dynamic content was popularized by ajax technology in the early 00's.

    • @orterves
      @orterves 5 місяців тому +2

      @@O_Eduardo it's harder!

    • @CodecrafterArtemis
      @CodecrafterArtemis 5 місяців тому +7

      Yeah. The novel concept of... Not having your entire page be one huge component.

  • @Drezden79
    @Drezden79 5 місяців тому +92

    I used to do this with JQuery and partial templates rendered by my MVC backend. 😂

    • @O_Eduardo
      @O_Eduardo 5 місяців тому +16

      Everybody used to do that... I believe that Theo just started front-end after SPA era...

    • @IvanRandomDude
      @IvanRandomDude 5 місяців тому +1

      Oh yeah. AspNet MVC + Partial Views + JQuery was indeed very hot back when I first started learning web.

    • @IngwiePhoenix_nb
      @IngwiePhoenix_nb 5 місяців тому +3

      Circles do have a tendency to close ;)

    • @valsopi
      @valsopi 5 місяців тому +3

      Thought the same exact thing immediately. Not that they've given it a name, they make it sounds they've invented something new.

    • @marlonsabijon1500
      @marlonsabijon1500 5 місяців тому

      lmao.. yeah! SPA frameworks simplified this part so we don't need to do this 🤣🤣🤣
      now they saying like this is the big issue..
      Dang, we already have code splits and lazy load in react to minimize initial load times.. we don't need to do this 🤣🤣🤣🤣

  • @asdqwe4427
    @asdqwe4427 5 місяців тому +9

    Islands architecture, when your app does not need to be a spa, but you still want the headaches

  • @ChristopherCricketWallace
    @ChristopherCricketWallace 5 місяців тому +8

    re-learning the same front-end lessons over and over--but with a new name and more dependencies and complexity.

    • @Tekner436
      @Tekner436 5 місяців тому

      yes, but this time we are re-learning the lessons much faster and more efficiently!

  • @oliverhughes169
    @oliverhughes169 5 місяців тому +3

    This was a great demo to explain these concepts. Kudos! I am loving Astro more and more. However, if this is all you need, I'd still go HTMX route and use whatever you want to build the static files to host on a CDN.

  • @zoti-it5yd
    @zoti-it5yd 5 місяців тому +24

    All this complexity just for Vercel to make more money from hosting. Nice! I miss good old Gatsby SSG. Astro is great though

  • @IainSimmons
    @IainSimmons 5 місяців тому +2

    I think most people commenting here that this is just like htmx are only partially right. Server Islands are like a shortcut to hx-get a dynamic route (params = props) with a partial HTML response and with hx-trigger="load" to start the request once the initial page and JS has loaded.
    You definitely can do it with htmx, along with so much more, and even use both together on an Astro site. This just saves a ton of time and gives a nice DX for hybrid static/SSR apps.

  • @jurassicthunder
    @jurassicthunder 5 місяців тому +289

    wake up honey, a new framework that takes months to learn to be replaced by another dropped.

    • @PraiseYeezus
      @PraiseYeezus 5 місяців тому +34

      when does this ever actually happen? or are you just memeing like most youtube commenters

    • @jurassicthunder
      @jurassicthunder 5 місяців тому +6

      ​@@PraiseYeezusha?

    • @Mempler
      @Mempler 5 місяців тому +4

      Welcome to Microsofts GUI frameworks.... Wait, this is the web

    • @pokefreak2112
      @pokefreak2112 5 місяців тому +9

      skill issue

    • @null_spacex
      @null_spacex 5 місяців тому +20

      @@jurassicthunder Astro has been around for years. When last has a new framework been released?

  • @wengel_eth
    @wengel_eth 5 місяців тому +27

    I sat through 18 minutes thinking you were describing Server Islands just to be revealed that Server Islands is just HTMX rebranded.

    • @dddddeeeevvvvvv
      @dddddeeeevvvvvv 5 місяців тому

      Really? HTML serves a static layer and then client request for the dynamic content?

  • @TheNiters
    @TheNiters 5 місяців тому

    This reminds me of how we used React when it first came out. We had static web apps where we built a React app and mounted it in a specific div on the page (for adding a comments functionality, for instance, you should typically insert a div with a data attribute and a specific class name, and then mount React into that div and supply the data attributes to the main component being mounted.

  • @andresgutgon
    @andresgutgon 5 місяців тому +1

    First time I understand Edge. Thanks

  • @autohmae
    @autohmae 5 місяців тому +6

    14:19 this seems unnecessary, if you are building for the CDN, you can also build an optimized version which doesn't have the content which the CDN already delivered ????

  • @denzilv
    @denzilv 5 місяців тому

    Great video, I really enjoyed watching your explanation of Astro's new feature. 🤙

  • @mateogalic7128
    @mateogalic7128 5 місяців тому

    Awesome video Theo! Love the sketches. Greetings from Croatia! Yes, we don't have just football players, we have developers as well in Croatia :)

  • @miroslavhoudek7085
    @miroslavhoudek7085 5 місяців тому +2

    As someone who knows nothing about frontend, I'm shocked that all of this functionality hadn't been there for at least 5 years.

    • @MrMudbill
      @MrMudbill 5 місяців тому +3

      Oh, it has. For about 25 years.

  • @siya.abc123
    @siya.abc123 5 місяців тому +32

    No way! Is this HTMX? 😮

  • @StephanHoyer
    @StephanHoyer 5 місяців тому

    Did this 10+ y ago with server-cached (varnish) magento frontend (it's so slow). We only fetched the dynamic parts (cart, user-login) via ajax. Worked great for simple stuff, but get's pretty convoluted when it gets more complicated.

  • @jakesarjeant8326
    @jakesarjeant8326 5 місяців тому +5

    Didn't deno/fresh do this like three years ago?

    • @necmttn
      @necmttn 5 місяців тому

      was looking for this 👍

  • @JoelPeltonen
    @JoelPeltonen 4 місяці тому

    Reminds me of Java portals :)
    For example Liferay basically works like that; you create a portlet, add that to a layout, it takes care of its own UI, backend and connections. Granted, nothing about that is fast or optimized for loading speed, it's all about isolation

  • @manaflask8826
    @manaflask8826 5 місяців тому

    The server endpoints for server island components needs to be dynamic URLs, since a user hitting site when you've deployed version A1 will hit server component at /MyComponent, then when you deployed site version B2 that same user will still be hitting /MyComponent endpoint expecting content from site version A1. Unless somehow you're forcing all users viewing site to reload when you deploy a new version, which isnt feasible at all since many people have inactive tabs viewing older versions of your website.

  • @CombobreakerDe
    @CombobreakerDe 5 місяців тому

    Ok, maybe I'm getting something wrong. But this feels like we are going back to where we started. I like that.

  • @tinytim42
    @tinytim42 5 місяців тому

    This is is the go-to progressive enhancement vanilla JS approach for years - I did this well over 12 years ago. It’s a great approach, it always has been. It’s just baffling that it’s this new/foreign to the JavaScript/React/web app community. Anyway, great feature, great explainer, and glad you’re putting this out.

  • @PushkarAnandDE
    @PushkarAnandDE 5 місяців тому +2

    This is like SPA with the shell being pre-rendered and served from the CDN. The benifit here over SPA would be less JS that we ship to the client.
    However there is one area where NextJS approach might prove better is SEO. This the same reason why people started SSR their SPA page and then hydrate on client. Relying on JS to load content negatively impacts SEO which is a deal breaker for blogs/news articles/e-commerce etc.
    Or am I missing something?

    • @keke772
      @keke772 4 місяці тому +1

      You’re wrong since the SEO will be the same for both. Both ship the unchanged content first and that’s the content that will be used for SEO

  • @vaibhavpathak6721
    @vaibhavpathak6721 5 місяців тому

    I love astro, it's actually my favourite javascript framework, reason being it's really simple, not as crazy as NextJS

  • @JD-rd4pk
    @JD-rd4pk 5 місяців тому

    As a backend dev who felt at loss of sanity coding fromt end, this feels exponentionally easier and intuitive to code and maintain.

  • @gearboxworks
    @gearboxworks 5 місяців тому +10

    Feels like HTMX in terms of requesting snippets of HTML. 🤷‍♂️

  • @judgewest2000
    @judgewest2000 5 місяців тому

    Yay - ANOTHER framework!
    I now feel like an idiot I wrote all my previous stuff in all the frameworks I've used to date!

  • @MaxPicAxe
    @MaxPicAxe 5 місяців тому

    This is very tempting to use

  • @TBTapion
    @TBTapion 5 місяців тому

    Hey YT comments: I'm confused by the PPR example. What's the benefit/purpose of having the "server" run the exact same first response as the "CDN" just to kill it on the "edge" section? I don't have the correct words for it I think, but it seems a bit needlessly complex?
    I understand it's a hard problem, but the confusion is still there.

  • @stevenstark-com
    @stevenstark-com 5 місяців тому

    ooh perfect timing, I just got into using Astro and have loved it! SSG boiiii!

  • @alterX2ego
    @alterX2ego 5 місяців тому +1

    Why not PHP?

  • @JaimeMendozaZambrano
    @JaimeMendozaZambrano 5 місяців тому +10

    So basically htmx

  • @p1mml
    @p1mml 5 місяців тому +5

    Regarding the island architecture, revisit Deno Fresh?

  • @johannesmariomeissner7262
    @johannesmariomeissner7262 5 місяців тому +1

    Would it actually be possible to have an Astro Server Islands approach in NextJS? What if I want a fully client-less page but with dynamic chunks, and without the complex edge-server ordeal? Is that achievable?

    • @t3dotgg
      @t3dotgg  5 місяців тому +1

      Export the route statically, and load components with `ssr: false` using next/dynamic and you can have very similar behaviors (this is how Ping, UploadThing and my new picture service's homepages all work)

    • @johannesmariomeissner7262
      @johannesmariomeissner7262 5 місяців тому

      @@t3dotgg I understand how next/dynamic with ssr:false can help improve FCP, but does it mean you do data fetching client-side on the lazy-loaded components? (Otherwise I don't see the parallel with Server Islands).

  • @zcjbrew
    @zcjbrew 5 місяців тому

    This pattern has been around since 2001 with ESI tags and Varnish Cache has been able to process them since 2010 😅

  • @jakemangan9534
    @jakemangan9534 5 місяців тому +2

    Genuine question, why is this news? I thought this concept/feature was already something Astro supported and was the whole idea of what Astro was based off? I already had the assumption that you were able to render sections of a site dynamically with a separate JS framework while having the rest of the site loaded via SSR or something else SEO friendly?

    • @aldierygonzalez7249
      @aldierygonzalez7249 5 місяців тому

      Coding in public has a great video explaining what was going on before and whats actually new. TLDR though basically before it would still be hard to cache pages with ssr with a CDN, since you had to run the generation function. Now you can hit a cdn and your page can still stream in stuff from an ssr provider.

  • @CreativeB34ST
    @CreativeB34ST 3 місяці тому

    Nice video Theo! Would it be an option to share your excalidraw diagram with us? I would love to use this to explain this to colleague devs.

  • @2u841r
    @2u841r 5 місяців тому

    ISR and DSG, also Gatsby left the conversation.

  • @igorduino
    @igorduino 5 місяців тому +6

    Thx for cool video, are there something similar for Svelte?

    • @t3dotgg
      @t3dotgg  5 місяців тому +5

      Not at the moment no

    • @HugoDuprez449
      @HugoDuprez449 5 місяців тому

      In Svelte you can just fetch dynamic content in the client.
      I do prefer how data is handled in Svelte:
      - Static is pre-rendered
      - Dynamic data can be fetched in your server load functions
      - If it’s better suited, you can also fetch dynamic data directly from the component

  • @LegitBanananas
    @LegitBanananas 5 місяців тому +6

    so now i have another thing to debug when a script doesn't work :)

  • @SXsoft99
    @SXsoft99 4 місяці тому

    so basically like Laravel Livewiere and push js from that component to the main stack when the component is loaded

  • @pouyan
    @pouyan 5 місяців тому

    "What happens after, is Afterwards" -- teo

  • @orterves
    @orterves 5 місяців тому +28

    All this work to meet the functionality of the simple Go+Echo+Templ+HTMX stack

  • @Debargha16
    @Debargha16 5 місяців тому +1

    Is this similar to parallel routes?

  • @ParasBansal10
    @ParasBansal10 4 місяці тому

    Sometimes I think like Apple trying to make the iPhones thinest possible instead of making them better. We as developers are fixating on trying to make the site load faster. Below 200 ms is still fast enough to anyone to notice the difference. We don't really need solutions to get from 50 ms to 10 ms.

  • @GreatBritton
    @GreatBritton 5 місяців тому

    This is a real question but isn’t this the same thing that qwik does? Basically serializing data as html (json) instead of the cdn?

  • @Zephury
    @Zephury 5 місяців тому

    what about comparing astro islands with nextjs standalone? I actually find it to be a lot faster than non-standalone outputs. Even with 1 server on a different continent than my user, it's still extremely fast. no cold starts, cdn responses are not noticeably slower.

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 5 місяців тому

      I did not understand what you mean
      What is faster? Astro Island? NextJs standalone?
      Normally serveless is always slower than a hosted app except when the hosted app is doing garbage collector or have a memory leak

  • @IngwiePhoenix_nb
    @IngwiePhoenix_nb 5 місяців тому

    What about deduplication? If I have three React components, will the runtime only be sent once or thrice?

  • @thephoenix215-po2it
    @thephoenix215-po2it 5 місяців тому +7

    Strangely, I can image Theo as a cop similar to Reno 911 or a cop from super troopers cause of the stashe, anyone agree with me here?

  • @mattythebatty1
    @mattythebatty1 5 місяців тому +7

    Also possible with Edge Side Includes (and Varnish)

    • @autohmae
      @autohmae 5 місяців тому +1

      32:33 I remember a time when the hitcouter was just an image tag on a HTML file which points to a URL which dynamically put some images with numbers together and record the count.

    • @nicejungle
      @nicejungle 5 місяців тому +2

      Clearly
      I'm amazed how javascript dev are trying to reinvent the wheel everyday

    • @autohmae
      @autohmae 5 місяців тому +1

      @@nicejungle I'm not against it, but I wish people who are doing it didn't have the disconnect with the past.

    • @bartek.igielski
      @bartek.igielski 5 місяців тому +2

      it's worth watching the whole video before writing comments
      no one states it's a breakthrough, but it's an easy way to do it
      just add a prop to an existing component, and it works
      no additional libs, services, weird config files for ESI living somewhere on the servers and being hard to update when shipping new app version

  • @perogycook
    @perogycook 5 місяців тому

    Didn't Deno Fresh coin the term islands a year+ ago?

  • @saryakan
    @saryakan 5 місяців тому +23

    It's the classic difference between an inventor and an entrepreneur. The inventor invents something, while the entrepreneur is the one who figure out how to make things useful for many people.

    • @srymisclick
      @srymisclick 5 місяців тому

      Then the salesman gives it a catchy name, adds some vendor buy-in ("you're gonna have a hard time if you try to set it up in your own infra, just use our service!") and you end up paying for something that was already practiced 20 years ago and for free, before the terms "CDN" and "Edge" were coined.

  • @rverm1000
    @rverm1000 5 місяців тому +1

    you should bring back small talk since it was the true first oop language. glad you show how you code.

  • @ldlework
    @ldlework 5 місяців тому

    Please follow up with an Astro + Qwik dive.

  • @judgewest2000
    @judgewest2000 5 місяців тому +1

    Is it okay for me to say at this stage I am not interested in this and have zero consideration I might use it?

  • @ac130kz
    @ac130kz 5 місяців тому

    well, you can just cache the response with any server you want and that's it

  • @andreilucasgoncalves1416
    @andreilucasgoncalves1416 5 місяців тому

    It seems that most devs here are not understanding what are the benefits of using Server Components streamed. The only "real" benefit comparated to use something simple like HTMX load is that it reuses the same network connection and probably the database connection saving lot of computation power and costs for high demand apps
    For any common app the old simple way is probably way better and simpler to maintain

  • @null_spacex
    @null_spacex 5 місяців тому +46

    The bots love your content

    • @peekachugaming3231
      @peekachugaming3231 5 місяців тому +2

      Currently, 22 Minutes after your comment - there are just 13 Commentarys visible to me and none are bots. I believe your comment that they're was bot comments, but they appear to be deleted/not visible anymore. Someone is cooking.

    • @kicknate195
      @kicknate195 5 місяців тому

      Idk some of these comments lol... 👀👀

  • @gruntlord6
    @gruntlord6 5 місяців тому

    Is this different then how remix handles it?

  • @gobeksalata
    @gobeksalata 5 місяців тому

    cool stuff.. what about form actions that next offers or... cache invalidations right from the server actions?
    so in a way this is just good old critical-css stuff?

  • @manuelquiroga8022
    @manuelquiroga8022 5 місяців тому +3

    Stupid tangent question, but does anyone know what the vscode color scheme he's using is called?

  • @danieleverstoun5705
    @danieleverstoun5705 5 місяців тому +1

    Finally! Astro video

  • @johannesmariomeissner7262
    @johannesmariomeissner7262 5 місяців тому

    How is Astro Server Islands different from fetching data with something like React Query? I guess the benefit is that Astro prepares the server APIs seamlessly for you, rather than us having to create a server API separately.

    • @johannesmariomeissner7262
      @johannesmariomeissner7262 5 місяців тому +1

      Oh I guess "less javascript" is a big one, astro's approach of fetching the data from its own server is probably more lightweight (and wouldn't even necessarily require client-side React code to work).

  • @dumbfailurekms
    @dumbfailurekms 5 місяців тому +1

    Can someone with an actual understanding of RSCs explain to me the difference between
    Having a RSC in next that calls a client component inside of it
    Having a react component in astro with no client directive that calls a component with a client directive inside of it
    Does astro basically achieve the same end goals of the RSC paradigm without actual RSCs?
    is the only difference that a server component (no client directive) in astro will "let" you call browser APIS like useState, but they wont work, whereas next will give a legit error? is that really it?

    • @t3dotgg
      @t3dotgg  5 місяців тому +2

      The difference on a technical level is not that different as you’re realizing here
      The difference in functionality, integration etc is much larger but in the sense that it’s a TON of “small differences”. In RSCs, you can mount a client component and pass it a server component all within React. In Astro, the “boundaries” have to be described with Astro’s syntax outside of React
      Fwiw, Dan Abramov has used Astro as the “server side react” example and tRPC as the “server actions” example to explain in the past

    • @dumbfailurekms
      @dumbfailurekms 5 місяців тому

      @@t3dotggThat's super cool you reply to yt comments. Thank you!! It does make sense!

  • @VolodymyrMoon
    @VolodymyrMoon 5 місяців тому

    The story about how a User become an Edge, which sounds like obvious thing🎉

    • @VolodymyrMoon
      @VolodymyrMoon 5 місяців тому

      I wouldn’t even surprise if HTMX is evaluating that “needSomething”

  • @bbqchickenrobot3
    @bbqchickenrobot3 2 місяці тому

    So essentially we're coming back to the xmlhttp requests started back in the days of Ajax making "island" calls to fetch dynamic data 😂😂

  • @thomasv1999
    @thomasv1999 5 місяців тому

    Can someone help me understand "why" you would want a cart component to be server side? Since it's different for each user, what's the benefit to having this on the server? Why don't we just do this client side and let the browser handle it?

    • @DiogoSilva-xx8nz
      @DiogoSilva-xx8nz 5 місяців тому +1

      having it rendered by the server gives the user a faster ui presentation

    • @thomasv1999
      @thomasv1999 5 місяців тому

      @@DiogoSilva-xx8nz not really tho? Fetching the cart needs to happen each time (no caching). So in this use case I don't know the benefit of doing it on the server vs the client side. You'll show a loading state regardless

    • @PanosPitsi
      @PanosPitsi 5 місяців тому

      @@thomasv1999you should keep track of what your user is trying to buy on the server so you have info to show recommended products maybe display a you have already ordered badge on some product cards etc

    • @DiogoSilva-xx8nz
      @DiogoSilva-xx8nz 5 місяців тому +1

      @@thomasv1999 Only the first hit is rendered by the server

  • @afsalkhan4423
    @afsalkhan4423 5 місяців тому +1

    What about seo?

  • @azazinlove7514
    @azazinlove7514 5 місяців тому

    isn't this the same as adding a counter component to nextjs with a use client?

  • @Danielo515
    @Danielo515 5 місяців тому

    Picture this: because the astro server has to serve small bits of html, it can be a cheap server, running all the time. Boom! You don't have cold startup

  • @C4CH3S
    @C4CH3S 5 місяців тому +26

    no. svelte already got it right.

  • @MelihKiraz
    @MelihKiraz 5 місяців тому

    People seems to have missed how great of a presentation this video was. Theo, your a legend.

  • @dotnetapp
    @dotnetapp 5 місяців тому +3

    sounds also somewhat scary.
    How secure is this? I mean, normally, developers don't need to care that much what the user puts inside the component as it's on the client, but when it's run on the server it seems to open new attack possibilities

    • @CoDEmanX47
      @CoDEmanX47 5 місяців тому +1

      You would typically have the static parts of the site rendered on the server, like the general layout and blocks that anyone can see, and anything that requires authentication would not use server islands because it's dynamic content (e.g. displays the name of the logged-in user)

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 5 місяців тому

      It normally reuses the same network connection for streaming components which means it is usually "more secure"

    • @dotnetapp
      @dotnetapp 5 місяців тому

      @@andreilucasgoncalves1416 its about that i can now easily change the javascript and send stuff to the server which could be exploited.
      You can do it also on the client with the difference that it can't do anything as everything happens on the client , but its different when the page gets rendered on the server and than gets to a server.
      a quick way would be something if a component takes a path in or something like
      "./assets/" or whatever (just an example) and now i give in "../../../home" and i can view stuff on the server.

  • @vasaniyakush
    @vasaniyakush 5 місяців тому

    This was very interesting

  • @undertale-15075O
    @undertale-15075O 5 місяців тому +3

    Nuxt?😢

  • @einargs
    @einargs 5 місяців тому +2

    It's crazy how many of these features leptos (Rust client side and SSR framework) already has.

  • @27sosite73
    @27sosite73 29 днів тому

    ty mate

  • @olivierbossel
    @olivierbossel 5 місяців тому

    The wheel is turning and we start to see new developers re-inventing basics, thinking they are inventing the wheel… 🎉 life is life…

    • @glader88
      @glader88 5 місяців тому +1

      this is what happens when you take a bunch of smart people and don't give them a concrete problem to solve.

  • @jeffreyblack666
    @jeffreyblack666 5 місяців тому +3

    I disagree with some key points.
    No, it isn't about the speed of showing the person something. It is about showing them something meaningful which they can interact with.
    If I see the framework of a site load, yet not the thing I need to interact with, and I have to wait for it to load, that is worse than if the page itself just took longer to load.
    And it is even more annoying if some elements are there, but I can't interact with them until the page fully loads, and if I do I then need to refresh the page.
    And likewise it is very annoying if it loads, so I can interact, but then something else loads which pushes it around making me click the wrong thing.
    Also, if I understand this correctly, this then makes individual requests for each dynamic component.

    • @jeffreyblack666
      @jeffreyblack666 5 місяців тому +2

      And related to that, showing me a useless message that you are loading is no better than just leaving the default browser page. If that means you site takes longer to actually load, then it is a worse experience.
      The only time such loading information is useful is if it is showing progress, which is only useful if it is something that takes a long time and the progress indicator is meaningful and usable.

  • @aghileslounis
    @aghileslounis 5 місяців тому

    This video is a masterpiece, thank you Theo!
    You explain in such a comprehensible way, pure talent.

  • @mythicaldata6297
    @mythicaldata6297 5 місяців тому

    I thought this video would be about physical islands, with server facilities lmao

  • @crossrambles
    @crossrambles 3 місяці тому

    So what I’m seeing here, is that Astro Server Islands is similar to AJAX? Interesting…

  • @spgaming1272
    @spgaming1272 5 місяців тому

    would this work with routers?

  • @nemopeti
    @nemopeti 5 місяців тому

    Oh yeah, and thats how the history repeats itself. Uset to be its called XHR / AJAX :)

  • @kaimetaev46
    @kaimetaev46 5 місяців тому

    Islands is not something new. They have been here for several years already and astro was ignored for around two or three years. I'm glad that now devs starts to experimenting with it.

  • @fsbgaming1588
    @fsbgaming1588 5 місяців тому

    marketing language used so very often to hide what actually its 'magic. its more than a decade tech. ssi or ajax or jquery😊

  • @mrmakra-eo1kx
    @mrmakra-eo1kx 5 місяців тому

    that's how htmx works ?
    except the cdn stuff i guess
    so cdn is the talk nvm

  • @marlonsabijon1500
    @marlonsabijon1500 5 місяців тому

    at this point, I think we should have just improved jquery and add virtualization to speed up animations... lmao

  • @realalphas
    @realalphas 5 місяців тому +2

    Qwik moment

  • @Binuralka
    @Binuralka 5 місяців тому +1

    Thank you for the video

  • @monstercameron
    @monstercameron 5 місяців тому

    why not web components? This seems unnecessarily complex. Write a webcomponent to do something interactive, embed it in the page.

    • @t3dotgg
      @t3dotgg  5 місяців тому

      This has nothing to do with interactivity lol

    • @monstercameron
      @monstercameron 5 місяців тому +1

      @@t3dotgg my understanding of your explanation is that static parts or the page can come quickly from cache while dynamic parts come from a streamed response. My question is why not just send down discrete webcomponents down with the cached page that will fetch dynamic data? I dont see the benefits of this complexity.

  • @hereallyfast
    @hereallyfast 5 місяців тому +5

    I see why htmx is banned on r/webdevs 😂

    • @DiogoSilva-xx8nz
      @DiogoSilva-xx8nz 5 місяців тому

      the reason is because some tools are used by non web devs to create endless dooms day discussions, like when web assembly came out

  • @skapator
    @skapator 5 місяців тому

    I think of Theo as both an extremely useless and extremely skillful developer. It’s like two unstoppable forces colliding, ultimately leaving behind a sense of nothingness and a broken time machine.

  • @kettenbach
    @kettenbach 5 місяців тому +1

    Is Astro going to win the framework wars? I have never even tried it. FOMO 😔

    • @fabianletsch1354
      @fabianletsch1354 5 місяців тому

      I would argue that React has pretty much won them already, but astro can integrate all the other frameworks, so it is basically a meta framework. I used astro before and really like it.

    • @pooyatolideh9527
      @pooyatolideh9527 5 місяців тому +1

      Astro doesn’t have shared state or client-side routing. so not really, unless you building a blog or ecomm site

    • @kettenbach
      @kettenbach 5 місяців тому

      @@pooyatolideh9527 yeah I agree. Astro seems targeted at blogs. Not real apps

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 5 місяців тому

      I don't use Astro, neither Next or Sveltekit because of too complex build steps
      Most devs I know prefer just use Vite with SPA because it is simple, easy and fast enough

  • @prometx2137
    @prometx2137 5 місяців тому

    a workaround in nextjs would be to have a static side and just fetch the data needed through client fetching (react query).
    obviously more work, and not as elegant but probably kind of similar in speed.

  • @portusdelphini
    @portusdelphini 5 місяців тому

    Wooooooow! Streeeeeeeaaaaams

  • @axMf3qTI
    @axMf3qTI 5 місяців тому +3

    I just want to use Go, Pocketbase and HTMX

    • @axMf3qTI
      @axMf3qTI 5 місяців тому +3

      Some Alpine too

    • @habong17359
      @habong17359 5 місяців тому +1

      Neh . You saying this bc you have not worked on enterprise level product. For side projects, your mentioned stack would work

    • @axMf3qTI
      @axMf3qTI 5 місяців тому

      @@habong17359 lmao

    • @planetchubby
      @planetchubby 5 місяців тому

      @@habong17359 Nope. Go with HTMX (and some Alpine) is a good choice for enterprise projects, and JS mess for side projects.

    • @snaddyvitchdispenser
      @snaddyvitchdispenser 5 місяців тому +1

      You don’t have to use a JavaScript framework for enterprise stuff - all the enterprise web stuff I’ve ever touched has been written in C# and Razor with a bit of jQuery lol

  • @REDIDSoft
    @REDIDSoft 5 місяців тому +7

    Sounds like PHP LOL, wait! SOUNDS LIKE PHP!

    • @StiekemeHenk
      @StiekemeHenk 5 місяців тому +2

      Not really, it's direct html and js with no server for the initial request.

    • @nicejungle
      @nicejungle 5 місяців тому +2

      Looks like PHP & Varnish infra 10 years ago
      What a discovery

  • @schtormm
    @schtormm 5 місяців тому +13

    [insert comment whining about "muh more Javascript frameworks" here]