Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

31–40 of 268 posts

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

#31
post #21

Earlier quoted context omitted.

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…

> Remember trying to debug with PHP on the frontend? I wouldn’t want to go back to that. I do remember that, all too well. Countless hours spent with templates in Symfony, or dealing with Zend Framework and all that jazz... But as far as I remember, the issue was debuggability and testing of the templates themselves, which was easily managed by moving functionality out of the templates (lots of people put lots of log…

Bingo.

Modern PHP development with Laravel is wildly effective and efficient.

Facebook brought React forth with influences from PHPs immediate context switching and Laravel’s Blade templates have brought a lot of React and Vue influences back to templating in a very useful way.

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

#32
post #26
post #22

>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. I can't with this goddamn LLM blog posts, it just drowns everything.

Some of us actually write like that... :/ Sucks when everything you write sounds like a bot because you're autistic.

I don't think it should suck at all. As I see it, RLHF empirically validated that this is the writing style people find to be the best.

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

#33

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

Per default, Astro generates static pages. So it makes sense to compare it to an approach that doesn't.

Using a framework has upsides over writing static pages manually. Most notably, you can decompose your website into reusable components which makes your implementation more DRY. Also, you can fluently upgrade to a very interaction-heavy website without ever changing tech or architecture. But that's just what I value. I whole-heartedly recommend trying it out.

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

#34

I recently build a website for a medical practice using Astro. I was amazed by how easy it was compared to my experience with Wordpress for this several years ago. And I can host it for free on something like Netlify and I don’t need to worry about the site being hacked, like with WP. I even built a very simple git-based CMS so that the client can update the content themselves. Web dev has really come a long way, des…

Were you commissioned by a friend? How does one find a gig building a medical practice website?

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

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

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

#36
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’m also a big fan of static, and nextjs supports this: https://nextjs.org/docs/app/api-reference/functions/generate...

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

#37
post #24

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

The number of web projects that fall into these categories vastly outnumber “complex” projects. For complex there is always WASM.

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

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

You can indeed do that with Next.js. In the app router, it’s called generateStaticParams. In the pages router, it’s getStaticProps.

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

#39
post #26

Earlier quoted context omitted.

Some of us actually write like that... :/ Sucks when everything you write sounds like a bot because you're autistic.

I don't think it should suck at all. As I see it, RLHF empirically validated that this is the writing style people find to be the best.

Maybe you've never been told you sound like a robot, then.

Feeling less-than-human isn't great.

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

#40

I recently build a website for a medical practice using Astro. I was amazed by how easy it was compared to my experience with Wordpress for this several years ago. And I can host it for free on something like Netlify and I don’t need to worry about the site being hacked, like with WP. I even built a very simple git-based CMS so that the client can update the content themselves. Web dev has really come a long way, des…

Be careful with Netlify. Their bandwidth charges are even more egregious than Vercel’s.
Post reply on HN