Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

231–240 of 268 posts

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

#231
post #205

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

Your website isn't loading for me.

Give it another shot. Azure static web apps are no bueno when it comes to reliable hosting...

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

#232

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

neither for me

Try again, I had to adjust my hosting plan.

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

#233

Just curious if non-techy folks might ask whether Astro is reliable enough for production use, such as e-commerce, marketing sites, etc.

Non-techy folks often don't touch terminal. With astro, you start with terminal. Can it be reliable for production use? Yes. Can non-techy make it reliable for production use? Who knows. E-commerce and marketing sites are at the two opposite sides of complexity spectrum. Astro would be perfect for marketing page (non-techy could approach that) and doable for e-commerce (for experienced dev). Whether it SHOULD be used…

I mean those are decision-makers, like managers or directors, small business owners, who will outsource or delegate the tech decisions to their developers or designers since they don’t have the skillset to design their site and branding themselves.

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

#234

What I don't understand from these conversation is the main selling proposition for Astro: if you have a content-heavy website, you should ship zero Javascript. And I agree with that, most of the websites heavy in content will at most have a couple of pages consumed in a single session. But if my "website" is an application, Javascript makes the whole user experience better, if implemented well. It doesn't matter tha…

The selling point is that you can ship JS, but only when necessary, and only scoped to the components that need it. It's not at all about removing the framework entirely.

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

#235

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.

WebObjects. That is a perfect description of it, released 1996. So far ahead of its time it’s not even funny. Still one of the best programming environments I’ve ever used almost 30 years later.

[dead]

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

#236
post #225

Earlier quoted context omitted.

I'm not a frontend developer so I'm ignorant about this stuff so that's the first I've heard of it. Do you know how you can do this in spring? Let's say I used Thymeleaf, is there a maven target I can use to walk over a database and generate every iteration of a html website?

i dont know anything about spring, thymeleaf etc... I assume google or llms could point you in the right direction. At worst, you could just literally crawl your site with http requests and cache the result. You could even do it from cloudflare workers and with the right caching headers could cache it all in cloudflare cdn.

[deleted]

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

#237
post #104
post #74

Earlier quoted context omitted.

> 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.

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

Web Components are a JavaScript/ECMAscript standard.

So this is like saying: _Their use of Arrays is a nice bet_

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

#238
post #205

Earlier quoted context omitted.

Your website isn't loading for me.

Give it another shot. Azure static web apps are no bueno when it comes to reliable hosting...

The second shot didn't go well :-)

Edit: Ah, finally, it loaded after about 30 seconds.

Edit 2: Fairly neat.

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

#239

What I don't understand from these conversation is the main selling proposition for Astro: if you have a content-heavy website, you should ship zero Javascript. And I agree with that, most of the websites heavy in content will at most have a couple of pages consumed in a single session. But if my "website" is an application, Javascript makes the whole user experience better, if implemented well. It doesn't matter tha…

[deleted]

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

#240

Earlier quoted context omitted.

You're making the opposite mistake: you're seeing someone's description of a tool's feature and confusing it with the way we've already done things without even checking if the tool is transformative just because it kinda sounds similar. Astro's main value prop is that it integrates with JS frameworks, let's them handle subtrees of the HTML, renders their initial state as a string, and then hydrates them on the clien…

I'm sorry to go off-topic, but since when hydrating web pages with JavaScript became a thing? First time I've heard the term. Edit: according to WP history, around December 2020 https://en.wikipedia.org/w/index.php?title=Hydration_(web_de... Second edit: "Streaming server rendering", "Progressive rehydration", "Partial rehydration", "Trisomorphic rendering"... Seems I woke up in a different universe today.

the concept is not new in an sense (duh), I mean, send HTML first send the important CSS first so the browser can show something - and with the correct dimensions hopefully to avoid reflows (and flash of white and so on), and therefore JS interaction "always" got enabled on some kind of trigger (onload, DOMContentLoaded, or simply it the script tag was added after the closing body tag, which as far as I know led to all of the event handlers registering by the time the DOM tree was there)

then chunking was the next step, and basically then logical endpoint is this mix-and-match strategy that NextJS is "leading" (?), by allowing things to be streamed in while sending and caching as much of the static parts up front as possible.

Post reply on HN