Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After having tried and given up on so, so many SSG frameworks, I'm loving Astro. In particular:

- Templates are plain HTML/Javascript, instead of some other templating language (e.g. Jekyll/Liquid)

- Typescript out of the box

- SCSS out of the box

- Easy remote builds on Netlify

- Scoped stylesheets

- No overcomplicated build process/customization (e.g. Webpack)

- Supports Markdown, YAML, JSON, all the things

- It builds really quickly

And all of that is with virtually no additional configuration. It's great.

Also a big bonus: the team is super friendly and very responsive!



Also out of the box:

- Tailwind support

- Optional choice of UI framework (React, SolidJS, Svelte etc...)

- Partial hydration. Generates _actual HTML_ on the server-side rather than JS blobs (which is what some other frameworks call SSR).

It really does work nicely. It's very fast, minimal config required.


As someone who started building web pages in the 90s, the "islands architecture" (generating HTML server-side) of Astro and others makes me laugh because it's literally what we used to do with XMLHttpRequest in IE 5/6 20+ years ago.

We generated page partials (or used static ones) and pulled them in with "Ajax" (for the oldies out there) and then inserted them in the right place on the page using innerHTML.

There's nothing wrong with this coming back around, it worked quite well!

It's just amusing how some things come full circle and are now considered innovative again. I'm sure there are advancements under the hood of course.


Sure, and I was also around when XMLHttpRequest was new and innovative. And development then was awful compared to where webdev is today - I've been in the industry that entire time.

And it's not quite the same thing - we're not talking about injecting server-side HTML snippets into other HTML pages (which never actually went away). This is more like optional, self-contained but fully-featured web applications that load after the full HTML renders. You could use that to fetch static HTML, or you could use it to provide an interactive client-side experience that only operates on a portion of the page, up to whatever complexity you like. And if the user has JS disabled the rest of the site still renders correctly.


Yes I understand (and even said) there's a difference and that things are better now, I certainly didn't imply otherwise. :-)


Not only did you imply otherwise, you said it :)

> it's literally what we used to do with XMLHttpRequest in IE 5/6 20+ years ago. We generated page partials (or used static ones) and pulled them in with "Ajax" (for the oldies out there) and then inserted them in the right place on the page using innerHTML.

That’s not what Astro is doing, or how it’ll mostly be used (though you could do that)


And before Ajax you could use a hidden iframe and update the parent page with some JS.


In early 00s, we even had frameworks that would do this all for you.

https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.up...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: