Live data from Hacker News

Astro is a return to the fundamentals of the web

websmith.studio

111–120 of 268 posts

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

#111
post #88

But it has a CMS? The author said that replaced WordPress sites with Astro, and on https://astro.build/ I see a comparison to WordPress. Astro brings a friendly UI to maintain and update the sites? Like the WordPress panel and editor.

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.

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

#112
post #13

Astro is a fantastic project that I would probably use more if SvelteKit didn’t exist (but it does, so Astro is always a downgrade).

Sveltekit doesn’t have islands. That single feature puts Astro ahead in situations where you don’t want an spa.

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

#113

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

The difference, it seems to me, is that astro is a framework and, specifically, meant for server side generated static pages with a bit of dynamic elements in them. I don't think it is all that capable of doing highly dynamic SSR apps (though their server Islands might make that possible? https://docs.astro.build/en/guides/server-islands/)

And, also, "php" in your question could be ruby, go, C or anything else that runs on the server.

I prefer htmx or, better yet, Datastar which are both small, backend agnostic, js libraries for making ssr html interactive to varying degrees. You could, in theory, use astro with them but probably better to just use something else.

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

#114
post #41

Earlier quoted context omitted.

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?

Pretty much every static site generator has an option of splitting a page into reusable components, so something like: {% include "components/head.html" %} {% include "components/navbar.html" %} ... Some even allow you to pass variables, so something like: {% include "components/button.html" text="example" url="https://example.com" %}

Using old school template partials is a massive downgrade in dx compared to Astro components.

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

#115

I this not similar to htmx?

Htmx is just a js library that helps with Ajax. Astro runs on your server to largely do static site generation, and also has htmx-like capabilities.

I prefer htmx and, better yet, datastar as they're backend-agnostic.

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

#117
post #61
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 doubt it to be honest. It's so distinct and non-existing. >With Astro you're not locked into a single way of doing things. Need React for a complex form? Chuck it in. Prefer Vue for data visualisation? Go for it. Want to keep most things as simple Astro components? Perfect. >What struck me most after migrating several projects is how Astro makes the right thing the easy thing. Want a fast site? That's the default.…

I've never seen an LLM use this sort of socratic writing style.

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

#118

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.

I remember Backbone being pure SPA-focused with client-side MVC.

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

#119
post #35

Earlier quoted context omitted.

I remember when it was called AJAX. We have completely lost the plot.

It's why Alan Kay calls our industry a Cargo Cult and says it's much more akin to the fashion industry than engineering.

Absolutely.

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

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

I remember it was called DHTML. ( And the code never works perfectly on IE and Netscape / Mozilla )
Post reply on HN