Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

41–50 of 268 posts

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

#41

> When I say Astro sites are fast, I mean properly fast. We're talking 40% faster load times compared to traditional React frameworks. That's a really low bar. Why not static pages? Why even use a framework at all if you're thinking of using Astro?

How do you do server-side rendering without a framework?

If you use static pages, how do you make sure that shared UI like navbars all update if you decide to make a change?

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

#42
Fundamentals of the Web haven't gone away, anyone still coding across PHP, Spring, Quarkus, ASP.NET MVC hasn't noticed that much how bad things have become with JS frameworks.

Unfortunately in fashion driven industry, it isn't always easy to keep to the basics.

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

#44
post #24

> I've found Astro perfect for marketing sites, blogs, e-commerce catalogues, and portfolio sites Basically, not suitable for anything complex.

I find it sad that Astro advertises itself this way, because I think that it is perfectly capable of building web projects of any complexity, simply by means of the component libraries you can plug in.

What makes it so great is not that it serves a particular niche (like "content-driven websites") but that it provides a developer experience that makes it incredibly easy to scale from a static website to something very complex and interaction-heavy without compromising UX.

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

#45
>> See that code fence at the top? That runs at build time, not in the browser. Your data fetching, your logic - it all happens before the user even loads the page. You get brilliant TypeScript support without any of the complexity of hooks, state management, or lifecycle methods.

This is satire, right? If only there was any other server side language that could do the same and produce static compliant super-light HTML-first pages!

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

#46
I ported my personal website from Jekyll to Astro a few weeks back and I really liked it. Astro is much easier to build and extend for me (and that is a personal preference point - I (and by I mostly mean claude) - and it's cool to add react components in to create more interactive points (but I haven't deployed that element yet).

Speed is probably the same as jekyll - but relative to my react vite and nextjs apps it's about 10 times faster.

I would definitely use Astro for more complicated websites than content driven - but would probably return to nextjs or more hefty full stack solutions for complicated web apps.

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

#47
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…

Maybe I am misunderstanding you, but isn't this what Astro's `getStaticPaths`[0] function is for?

[0]: `https://docs.astro.build/en/guides/routing/#static-ssg-mode

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

#48
post #41

> When I say Astro sites are fast, I mean properly fast. We're talking 40% faster load times compared to traditional React frameworks. That's a really low bar. Why not static pages? Why even use a framework at all if you're thinking of using Astro?

How do you do server-side rendering without a framework? If you use static pages, how do you make sure that shared UI like navbars all update if you decide to make a change?

Static site generators?

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

#49
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…

This field (software) in general, and especially web stuff, has no memory. It’s a cascade of teens and twentysomethings rediscovering the same paradigms over and over again with different names.

I think we are overdue for a rediscovery of object oriented programming and OOP design patterns but it will be called something else. We just got through an era of rediscovering the mainframe and calling it “cloud native.”

Every now and then you do get a new thing like LLMs and diffusion models.

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

#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. And there yes, without doubt, vite is amazing.

Post reply on HN