Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

191–200 of 268 posts

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

#191

Earlier quoted context omitted.

No. I disagree, you have to refactor all the pages from using [pathId] folder pattern and change all the links including switching to useSearchParams. It's just a huge change, especially if I want to keep the old routes in my web app.

Yes it would, and I can see with an existing app that it is work. But we are probably talking less than a days work? Not even using AI, but this is straightforward string replacements.

Right. So a custom build system which changes the built pages from dynamic path folders to named folders in a day. No bugs. Sure. Also I serve rich-text content with links so those gotta be rewritten as well.

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

#193

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…

I love Astro so much. After 20 years in data and backend, I got back into frontend for a big project. After banging my head with React, I took a leap of faith and choose Astro with Svelte. That includes an initial try with SvelteKit.

It's worked out so wonderfully. By being HTML/CSS centric, it forces a certain predictable organization with your front end code. I handed the frontend to another developer, with a React background, and because it's so consistently and plainly laid out, the transition happened almost overnight.

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

#194

How is this different from something like PHP? I don't get it.

With a PHP project, you have to make all the decisions yourself, which framework (Symfony, Laravel, etc.), how to structure things, whether you can use JSX-like syntax (you can’t, really), how to handle HTML escaping safely, and how to optimise images during build time. You can use Unpic in Laravel (The Unpic creator, also former Netlify employee is now on Astro team).

https://unpic.pics/

I'm aware there's a new PHP web framework that's somewhat similar to Astro, but I can't recall the name.

Astro gives you sensible defaults out of the box. It’s designed for modern web development, so things like partial hydration, automatic image optimisation, and using components from different frameworks just work.

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

#196

Earlier quoted context omitted.

https://astro.build/blog/live-content-collections-deep-dive/

That's cool but I fail to see how this results in 100% static bundle.

afaik astro will serve a live collection as a static HTML file (unless you explicitly include JS)

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

#197

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…

The best way to do "just html and css with includes" is to run any commonon webserver like nginx and turn on server side includes. It is literally just html and css with includes then. And zero javascript, anywhere, unless you want it.

SSI hasn't changed in 20+ years and it's extremely stable in all webservers. A very tiny attack surface with no maintainence problems. It just does includes of html fragments. The perfect amount of templating power to avoid redundancy but also avoid expoitable backends.

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

#199
post #111
post #88

Earlier quoted context omitted.

It doesn't, which is why all these solutions breakdown long-term compared to things like WP for small biz brochure stuff. 5 to 10 years from now when you're no longer talking to your client who has absolutely no technical experience, they're not gonna know that their website code is in some random GitHub repository that needs to be compiled with vite and then you need to magically wait for Netlify/etc to pull in your…

It would be cheaper to hire a dev to update some content than to pay a wp host for 5-10 years.

I just did a search for "wordpress hosting" and picked one of the first results without shopping around, and the (clearly overpriced) plan I saw was $9.99/mo. In ten years that'd be $1200.

A WP deployment on a simple shared hosting plan like that could run itself without needed a dev or sysadmin.

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

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

>Traditional frameworks hydrate

Dear God. In 20 years people will hire HTML experts as if they are COBOL experts today.

Post reply on HN