Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

101–110 of 268 posts

Re: Astro is a return to the fundamentals of the web

#102
post #16

I am feeling old reading the phrase "traditional frameworks" as a reference to SPA/Virtual DOM frameworks all while the actual traditional frameworks like Backbone, jQuery, etc. actually worked the way described in the blogpost.

"Traditional" always been a measure that depends on when we were born. "Traditional" internet for me is 56kbit modems, vbulletin forums, GTA:VC modding and IRC, while for older people "traditional" internet is probably BBS and such, and for the younger crowd things like Discord is part of the "traditional" internet. You see the same thing in political conservative/traditional circles, where basically things were good…

>You see the same thing in political conservative/traditional circles, where basically things were good when they were young, and things today are bad, but it all differs on when the person was born

when things decline that's still an accurate represenation, not just an artifact of subjectivity

Re: Astro is a return to the fundamentals of the web

#103
post #35
post #10

> Traditional frameworks hydrate entire pages with JavaScript. Even if you've got a simple blog post with one interactive widget, the whole page gets the JavaScript treatment. Astro flips this on its head. Your pages are static HTML by default, and only the bits that need interactivity become JavaScript "islands." Back in my days we called this "progressive enhancements" (or even just "web pages"), and was basically…

I remember when it was called AJAX. We have completely lost the plot.

Htmx and, even moreso, Datastar have brought us back on track. Hypermedia + Ajax with whatever backend language(s)/framework(s) you want. Whereas astro is astro.

Re: Astro is a return to the fundamentals of the web

#104
post #74
post #50

To me no, it's not. It works well for some of the use cases, but if all you needed was offline rendering of your js in a build step to generate static html then you really didn't need all that js to begin with. islands work until they don't, and a lot of stuff gets inlined too. I guess it's fine if you stop caring about the final build. I feel a lot of the hype around Astro has more to do with vite than anything else…

> islands work until they don't Like when?

Setting `client:load` and `client:visible` for (svelte) islands you want to run on the client ends up inlining script type modules all around the html. It looked like a big hack to me.

On the positive side their use of web components is a nice bet.

Re: Astro is a return to the fundamentals of the web

#105
post #99

It's clear to me that the frontend conversation space is broken. Not even just the ecosystem being a mess. Boiling down the conversation I see in the article, it just seems to be: the browser as a HMI vs the browser as a an application runtime. Depending on what you want to do one might be a better fit than the other. But the points it puts forward are fluff arguments like "it's a breadth of fresh air" or "it loads f…

"Loads faster" is fluff? How so?

Re: Astro is a return to the fundamentals of the web

#106
post #20

It's baffling to me why more SSR frameworks, Astro and NextJS namely, can't adopt static pages with dynamic paths like SvelteKit. So for example, if you have a page /todos/[todoId] you can't serve those in your static bundle and NextJS straight-out refuse building your app statically. Whereas with SvelteKit, it builds happily and does this beautiful catch-all mechanism where a default response page, say 404.html in C…

I might not be understanding you (or the various frameworks) completely, but are Astro's server Islands what you're looking for?

https://docs.astro.build/en/guides/server-islands/

Re: Astro is a return to the fundamentals of the web

#107
My personal website is written with Astro. I love it! Admittedly I'm still a little trigger-happy with my JS usage, but overall the ability to write templated pages and utilize islands that don't require big dependencies is the most friendly web development experience I've had.

https://evklein.com

Re: Astro is a return to the fundamentals of the web

#108
post #94

Earlier quoted context omitted.

Back in your day, there wasn’t a developer experience by which you could build a website or web app (or both) as a single, cohesive unit, covering both front-end and back-end, while avoiding the hydration performance hit. Now we have Astro, Next.js with RSC, and probably at least a dozen more strong contenders.

> build a website or web app (or both) as a single, cohesive unit, covering both front-end and back-end, while avoiding the hydration performance hit. Isn't that basically just what Symfony + Twig does? Server-side rendering, and you can put JS in there if you want to. Example template: [...] {% if user.isLoggedIn %} Hello {{ user.name }}! {% endif %} The syntax is horrible, and seeing it today almost gives me the yu…

[deleted]

Re: Astro is a return to the fundamentals of the web

#109
post #23

I spent a small amount of time looking into Astro and I didn’t get the difference with the Fresh framework created by the Deno team.. ? Fresh does this Island architecture already, and benchmarks on Astro website dont include Deno+Fresh to compare. So I’m still wondering what’s the benefit of using Deno+Astro vs. Deno+Fresh

There are plenty of differences. Eg Fresh can only run on Deno and can only use Preact.
Post reply on HN