Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

11–20 of 268 posts

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

#12
post #8
post #7

Earlier quoted context omitted.

I'm still a bit dumbfounded, what is the F* a reference to if not the language? Maybe just a typo for some other abbreviation?

F$&@ing

Ah man do I feel dumb now. I guess F/F#/F* hurt me in some way, because now it's obvious, guess I've never seen it written like that. Thanks!

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

#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 when they were young, and things today are bad, but it all differs on when the person was born.

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

#17

I can only approve. To me Astro started as "it's just html and css but with includes." I used it for my personal website, and recently used it when reimplementing the Matrix Conference website. It's really a no-fuss framework that is a joy to use. Among the things I love about Astro: - It's still html and css centric - Once built, it doesn't require js by default - You can still opt-into adding js for interactivity h…

> - It's still html and css centric - Once built, it doesn't require js by default - You can still opt-into adding js for interactivity here and there

I've never used Astro so forgive my ignorance, but isn't that just creating a .html file, a .css file and then optionally provide a .js file? What does Astro give you in this case? You'd get the same experience with a directory of files + Notepad basically. It's also even more optimized for speed, since there is no overhead/bloat at all, including at dev-time, just pure files, sent over HTTP.

> an example is that the css minifier cleverly inlines some CSS to avoid additional queries

Is that a common performance issue in the web pages you've built? I think across hundreds of websites, and for 20 years, not once have "CSS queries" been a bottleneck in even highly interactive webpages with thousands of elements, it's almost always something else (usually network).

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

#18
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 agree with that it’s not a new concept by itself, but the way it’s being done is much more elegant in my opinion.

I originally started as a web developer during the time where PHP+jQuery was the state of the art for interactive webpages, shortly before React with SPAs became a thing.

Looking back at it now, architecturally, the original approach was nicer, however DX used to be horrible at the time. Remember trying to debug with PHP on the frontend? I wouldn’t want to go back to that. SPAs have their place, most so in customer dashboards or heavily interactive applications, but Astro find a very nice balance of having your server and client code in one codebase, being able to define which is which and not having to parse your data from whatever PHP is doing into your JavaScript code is a huge DX improvement.

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

#19
post #6
post #3

> 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." I guess I'd argue "Traditional Frameworks" were the ones that never stopped doing this. Laravel, Django,…

I've replaced the submitted title ("Astro is a developers f* dream") with a representative sentence from the article.

thank you. it was a horrible title

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

#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 Cloudflare, fetches the correct page and from user-perspective works flawlessly. Even though behind the scenes the response was 404 (since that dynamic page was never really compiled). Really nice especially when bundling your app as a webview for mobile.

Post reply on HN