45 comments

  • diggan8 hours ago
    &gt; Traditional frameworks hydrate entire pages with JavaScript. Even if you&#x27;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 &quot;islands.&quot;<p>Back in my days we called this &quot;progressive enhancements&quot; (or even just &quot;web pages&quot;), and was basically the only way we built websites with a bit of dynamic behavior. Then SPAs were &quot;invented&quot;, and &quot;progressive enhancements&quot; movement became something less and less people did.<p>Now it seems that is called JavaScript islands, but it&#x27;s actually just good ol&#x27; web pages :) What is old is new again.<p>Bit of history for the new webdevs: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Progressive_enhancement" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Progressive_enhancement</a>
    • hombre_fatal5 hours ago
      You&#x27;re making the opposite mistake: you&#x27;re seeing someone&#x27;s description of a tool&#x27;s feature and confusing it with the way we&#x27;ve already done things without even checking if the tool is transformative just because it kinda sounds similar.<p>Astro&#x27;s main value prop is that it integrates with JS frameworks, let&#x27;s them handle subtrees of the HTML, renders their initial state as a string, and then hydrates them on the client with preloaded data from the server.<p>TFA is trying to explain that value to someone who wants to use React&#x2F;Svelte&#x2F;Solid&#x2F;Vue but only on a subset of their page while also preloading the data on the server.<p>It&#x27;s not necessarily progressive enhancement because the HTML that loads before JS hydration doesn&#x27;t need to work at all. It just matches the initial state of the JS once it hydrates. e.g. The &lt;form&gt; probably doesn&#x27;t work at all without the JS that takes it over.<p>These are the kind of details you miss when you&#x27;re chomping at the bit to be cynical instead of curious.
      • bryanrasmussen1 hour ago
        &gt;e.g. The &lt;form&gt; probably doesn&#x27;t work at all without the JS that takes it over.<p>What a value!<p>I guess I may be chomping at the bit to be cynical, but I have quite a bit of experience in these fields, and I don&#x27;t think Astro sounds especially transformative.
      • zelphirkalt3 hours ago
        What is the value in first sending dysfunctional HTML and then fixing it with later executed JS? If you do that, you might as well do 100% JS. Probably would simplify things in the framework.<p>Sending functional HTML, and then only doing dynamic things dynamically, that&#x27;s where the value is for web _apps_. So if what you point out is the value proposition for Astro, then I am not getting it, and don&#x27;t see its value.
        • gbalduzzi2 hours ago
          Dysfunctional HTML in the sense that interactivity is disabled, but visually it is rendered and therefore you can see the proper webpage immediately.<p>Just compare the two cases, assuming 100ms for the initial HTML loading and 200ms for JS loading and processing.<p>With full JS, you don&#x27;t see anything for 300ms, the form does not exists (300ms is a noticeable delay for the human eye).<p>With frameworks such as Astro, after 100ms you already see the form. By the time you move the mouse and&#x2F;or start interacting with it, the JS will probably be ready (because 200ms is almost instant in the context of starting an interaction).<p>This is not new at all, old school server side processing always did this. The advantage is writing the component only once, in one framework (React&#x2F;vue&#x2F;whatev). The server-client passage is transparent for the developer, and that wasn&#x27;t the case at all in old school frameworks.<p>Note that I&#x27;m not seeing this is good! but this is the value proposition of Astro and similar frameworks: transparent server-client context switching, with better performance perceived by the user.
      • blackhaj73 hours ago
        &gt; you&#x27;re chomping at the bit to be cynical instead of curious.<p>Nicely sums up a lot of interactions these days
    • skipchris7 hours ago
      Agreed! Astro is fantastic, but the biggest barrier I had in learning it was getting my head around range of terms that developers who entered the workplace after 2010 have invented to describe &quot;how the web works&quot;.
      • rubyfan6 hours ago
        I really appreciate that innovation can sometimes reinvent things that exist out of pure ignorance and sometimes hubris. I’ve seen people turn mountains out of molehills that take on a lore of their own and then along comes someone new who doesn’t know or is a little too sure of themselves and suddenly the problem is solved with something seemingly obvious.<p>I’m not sure javascript islands is that but I appreciate a new approach to an old pattern.
    • chrisldgk8 hours ago
      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.<p>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.<p>Looking back at it now, architecturally, the original approach was nicer, however DX used to be horrible at the time. Remember trying to debug with PHP on the frontend? I wouldn’t want to go back to that. SPAs have their place, most so in customer dashboards or heavily interactive applications, but Astro find a very nice balance of having your server and client code in one codebase, being able to define which is which and not having to parse your data from whatever PHP is doing into your JavaScript code is a huge DX improvement.
      • diggan8 hours ago
        &gt; Remember trying to debug with PHP on the frontend? I wouldn’t want to go back to that.<p>I do remember that, all too well. Countless hours spent with templates in Symfony, or dealing with Zend Framework and all that jazz...<p>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 logic into templates...) and then putting that behavior under unit tests. Basically being better at enforcing proper MVC split was the way to solve that.<p>The DX wasn&#x27;t horrible outside of that, even early 2010s which was when I was dealing with that for the first time.
        • gbalduzzi2 hours ago
          The main difference is as simple as modern web pages having on average far more interactivity.<p>More and more logic moved to the client (and JS) to handle the additional interactivity, creating new frameworks to solve the increasing problems.<p>At some point, the bottleneck became the context switching and data passing between the server and the client.<p>SPAs and tools like Astro propose themselves as a way to improve DX in this context, either by creating complete separation between the two words (SPAs) or by making it transparent (Astro)
        • Vinnl7 hours ago
          Well, that&#x27;s a way to manage server-side logic, but your progressively-enhanced client-side logic (i.e. JS) still wasn&#x27;t necessarily easy to debug, let alone being able to write unit tests for them.
          • diggan6 hours ago
            &gt; but your progressively-enhanced client-side logic (i.e. JS) still wasn&#x27;t necessarily easy to debug, let alone being able to write unit tests for them<p>True, don&#x27;t remember doing much unit testing of JavaScript at that point. Even with BackboneJS and RequireJS, manual testing was pretty much the approach, trying to make it easy to repeat things with temporary dev UIs and such, that were commented out before deploying (FTPing). Probably not until AngularJS v1 came around, with Miško spreading the gospel of testing for frontend applications, together with Karma and PhantomJS, did it feel like the ecosystem started to pick up on testing.
          • evantbyrne5 hours ago
            There wasn&#x27;t as much JS to test. I built a progressively-enhanced SQLite GUI not too long ago to refresh my memory on the methodology, and I wound up with 50-ish lines of JS not counting Turbo. Fifty. It was a simple app, but it had the same style of partial DOM updates and feel that you would see from a SPA when doing form submissions and navigation.
            • Vinnl4 hours ago
              Not usually, but in the context of<p>&gt; Astro find a very nice balance of having your server and client code in one codebase, being able to define which is which and not having to parse your data from whatever PHP is doing into your JavaScript code is a huge DX improvement.<p>the point is pretty much that you <i>can</i> do more JS for rich client-side interactions in a much more elegant way without throwing away the benefits of &quot;back in the days&quot; where that&#x27;s not needed.
        • leetrout8 hours ago
          Bingo.<p>Modern PHP development with Laravel is wildly effective and efficient.<p>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.
    • archerx8 hours ago
      I remember when it was called AJAX. We have completely lost the plot.
      • 0x4454426 hours ago
        It&#x27;s why Alan Kay calls our industry a Cargo Cult and says it&#x27;s much more akin to the fashion industry than engineering.
      • ksec5 hours ago
        I remember it was called DHTML. ( And the code never works perfectly on IE and Netscape &#x2F; Mozilla )
      • nchmy5 hours ago
        Htmx and, even moreso, Datastar have brought us back on track. Hypermedia + Ajax with whatever backend language(s)&#x2F;framework(s) you want. Whereas astro is astro.
    • z3t47 hours ago
      The first web frameworks really got it right with stateless websites and server rendering.
    • api7 hours ago
      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.<p>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.”<p>Every now and then you do get a new thing like LLMs and diffusion models.
      • rambambram7 hours ago
        This. So much this. I&#x27;m not even 42 and I feel old when I read stuff like this. Like you say, there&#x27;s no memory in the web software field.
        • omnimus5 hours ago
          Even if you are 10 years younger than you and youve been doing it webdev in your late teens you’ve seen like three spins of the concepts wheel to come back again and again.
        • api7 hours ago
          Wasted effort reinventing things and rediscovering their limits and failure modes is a major downside of the ageism that is rampant in the industry. There is nobody around to say “actually this has been tried three times by three previous generations of devs and this is what they learned.”<p>Another one: WASM is a good VM spec and the VM implementations are good, but the ecosystem with its DSLs and component model is getting an over engineered complexity smell. Remind anyone of… say… J2EE? Good VM, good foundation, massive excess complexity higher up the stack.
      • daotoad4 hours ago
        Software engineering&#x2F;development has had a long September.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Eternal_September" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Eternal_September</a>
    • steve_taylor8 hours ago
      Back in your day, there wasn’t a developer experience by which you could build a website or web app (or both) as a single, cohesive unit, covering both front-end and back-end, while avoiding the hydration performance hit. Now we have Astro, Next.js with RSC, and probably at least a dozen more strong contenders.
      • d42muna5 hours ago
        WebObjects.<p>That is a perfect description of it, released 1996. So far ahead of its time it’s not even funny. Still one of the best programming environments I’ve ever used almost &lt;checks calendar&gt; 30 years later.
      • diggan6 hours ago
        &gt; build a website or web app (or both) as a single, cohesive unit, covering both front-end and back-end, while avoiding the hydration performance hit.<p>Isn&#x27;t that basically just what Symfony + Twig does? Server-side rendering, and you can put JS in there if you want to. Example template:<p><pre><code> &lt;html&gt; &lt;head&gt;[...]&lt;&#x2F;head&gt; &lt;body&gt; {% if user.isLoggedIn %} Hello {{ user.name }}! {% endif %} &lt;&#x2F;body&gt; &lt;&#x2F;html&gt; </code></pre> The syntax is horrible, and seeing it today almost gives me the yuckies, but seems like the same idea to me, just different syntax more or less. I&#x27;m not saying it was better back then, just seems like very similar ideas (which isn&#x27;t necessarily bad either)
        • zelphirkalt2 hours ago
          I find that syntax more palatable than what is going on in JSX to be honest. I actually like having a separate declarative syntax for describing the tree structure of a page. Some languages manage to actually seamlessly incorporate this, for example SXML libraries in Schemes, but I have not seen it being done in a mainstream language yet.
          • diggan1 hour ago
            Yeah, not a huge fan of either either to be honest, but probably JSX slightly before Twig only because it&#x27;s easier for someone who written lots of HTML.<p>Best of them all has to be hiccup I think, smallest and most elegant way of describing HTML. Same template but in as a Clojure function returning hiccup:<p><pre><code> (defn template [user] [:html [:head [...]]] [:body (when (:logged-in user) [:div &quot;Hello &quot; (:name user)])]) </code></pre> Basically, just lists&#x2F;vectors with built-in data structures in them, all part of the programming language itself.
      • paradox4603 hours ago
        WebObjects and ColdFusion come from the 90s
      • hasanhaja6 hours ago
        &gt; there wasn’t a developer experience by which you could build a website or web app (or both) as a single, cohesive unit, covering both front-end and back-end<p>How much of the frontend and how much of the backend are we talking about? Contemporary JavaScript frameworks only cover a narrow band of the problem, and still require you to bootstrap the rest of the infrastructure on either side of the stack to have something substantial (e.g., more than just a personal blog with all of the content living inside of the repo as .md files).<p>&gt; while avoiding the hydration performance hit<p>How are we solving that today with Islands or RSCs?
        • steve_taylor5 hours ago
          It can cover as much of the back-end that your front-end uses directly as you’d care to deploy as one service. Obviously if you’re going to have a microservices architecture, you’re not going to put all those services in the one Next.js app. But you can certainly build a hell of a lot more in a monolith that a personal blog serving a handful of .md files.<p>In terms of the front-end, there’s really no limit imposed by Next.js and it’s not limited to a narrow band of the problem (whatever that gibberish means), so I don’t know what you’re even talking about.<p>&gt; How are we solving that today with Islands or RSCs?<p>Next.js&#x2F;RSC solves it by loading JavaScript only for the parts of the page that are dynamic. The static parts of the page are never client-side rendered, whereas before RSC they were.
  • thibaultamartin8 hours ago
    I can only approve. To me Astro started as &quot;it&#x27;s just html and css but with includes.&quot;<p>I used it for my personal website, and recently used it when reimplementing the Matrix Conference website. It&#x27;s really a no-fuss framework that is a joy to use.<p>Among the things I love about Astro:<p>- It&#x27;s still html and css centric - Once built, it doesn&#x27;t require js by default - You can still opt-into adding js for interactivity here and there - Content collections are neat and tidy - Astro massively optimizes for speed, and the maintainers know how to do it - It had a very helpful devbar to help you visually figure out what easy fix can make your website snappier (like lazily loading images if it detects them below the fold)<p>For the &quot;optimize for speed&quot; bit, an example is that the css minifier cleverly inlines some CSS to avoid additional queries. The Image component they provide will set the width and height attribute of an image to avoid content layout shifts. It will also generate responsive images for you.
    • diggan8 hours ago
      &gt; - It&#x27;s still html and css centric - Once built, it doesn&#x27;t require js by default - You can still opt-into adding js for interactivity here and there<p>I&#x27;ve never used Astro so forgive my ignorance, but isn&#x27;t that just creating a .html file, a .css file and then optionally provide a .js file? What does Astro give you in this case? You&#x27;d get the same experience with a directory of files + Notepad basically. It&#x27;s also even more optimized for speed, since there is no overhead&#x2F;bloat at all, including at dev-time, just pure files, sent over HTTP.<p>&gt; an example is that the css minifier cleverly inlines some CSS to avoid additional queries<p>Is that a common performance issue in the web pages you&#x27;ve built? I think across hundreds of websites, and for 20 years, not once have &quot;CSS queries&quot; been a bottleneck in even highly interactive webpages with thousands of elements, it&#x27;s almost always something else (usually network).
      • thibaultamartin8 hours ago
        Fair questions.<p>For the first one, the main benefits of Astro over static html and css (for my use cases) are the ability to include components and enforce the properties that must be passed. A typical example would be [here][0] where I define a layout for the whole website, and then [on each page that uses it](<a href="https:&#x2F;&#x2F;github.com&#x2F;matrix-org&#x2F;matrix-conf-website&#x2F;blob&#x2F;main&#x2F;src&#x2F;pages&#x2F;index.astro#L21-L24">https:&#x2F;&#x2F;github.com&#x2F;matrix-org&#x2F;matrix-conf-website&#x2F;blob&#x2F;main&#x2F;...</a>) I have to pass the right properties. Doable by hand, but it&#x27;s great to have tooling that can yell at me if I forgot to do it.<p>Content Collections also let me grab content from e.g. markdown or json and build pages automatically from it. The [Content Collections docs][1] are fairly straightforward.<p>As for performance issues, I&#x27;ve spent quite a bit of time on the countryside where connectivity was an issue and every extra request was definitely noticeable, hence the value of inlining it (you load one html file that has the css embedded, instead of loading an html file that then tells your browser to load an extra css file). The same can be true in some malls where I live.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;matrix-org&#x2F;matrix-conf-website&#x2F;blob&#x2F;main&#x2F;src&#x2F;layouts&#x2F;BaseLayout.astro#L7-L11BaseLayout.astro#L95">https:&#x2F;&#x2F;github.com&#x2F;matrix-org&#x2F;matrix-conf-website&#x2F;blob&#x2F;main&#x2F;...</a> [1]: <a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;content-collections&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;content-collections&#x2F;</a>
        • mbirth6 hours ago
          Embedded CSS circumvents proper caching of the CSS. Also, with HTTP&#x2F;2 your client can download several resources in one transaction. So, it shouldn’t make much of a difference with CSS embedded or separate. Just, that embedded CSS has to be loaded over and over again whereas a separate file can be cached and reused from the local cache.
    • superkuh29 minutes ago
      The best way to do &quot;just html and css with includes&quot; 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.<p>SSI hasn&#x27;t changed in 20+ years and it&#x27;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.
    • weego7 hours ago
      My one criticism which is why I ditched it for now is complex routing gets confusing and abstract quickly.<p>I don&#x27;t know that there&#x27;s a serious solution to it because complexity can&#x27;t come with zero friction but just my gut feeling was to back out and go with something else for now.
    • snapetom1 hour ago
      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.<p>It&#x27;s worked out so wonderfully. By being HTML&#x2F;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&#x27;s so consistently and plainly laid out, the transition happened almost overnight.
  • aswerty5 hours ago
    It&#x27;s clear to me that the frontend conversation space is broken. Not even just the ecosystem being a mess.<p>Boiling down the conversation I see in the article, it just seems to be: the browser as a HMI vs the browser as a an application runtime. Depending on what you want to do one might be a better fit than the other. But the points it puts forward are fluff arguments like &quot;it&#x27;s a breadth of fresh air&quot; or &quot;it loads faster&quot;.<p>It&#x27;s difficult to articulate the source of just how broken the discussion space is; nor have I made a particularly strong argument myself. But I think it&#x27;s important to keep pushing back on conversations that position framework&#x27;s like they are brands winning hearts and minds. Ala the fashion industry.
    • bob10295 hours ago
      &gt; Ala the fashion industry.<p>The fashion industry is the best analogy I&#x27;ve seen so far for frontend frameworks. It&#x27;s obvious that the amount of technical rigor involved with declaring something &quot;content-driven&quot; and &quot;server-first&quot; is approximately zero.
      • voat3 hours ago
        Care to explain?<p>Astro is trying to position itself in opposition to things like Next.js or Nuxt wich are specifically marketed as application frameworks?<p>And the architecture is more suited to something like a content site, because of the content collections, built-in MDX support, SSR, image handling, and server routing?
        • bob10292 hours ago
          Sure, but maybe you need to go first.<p>What do you mean when you say &quot;a content site&quot;?<p>To me, &quot;content&quot; == &quot;literally anything that resides in the DOM&quot;.<p>But, clearly we aren&#x27;t talking about that (I hope).
    • nchmy5 hours ago
      &quot;Loads faster&quot; is fluff? How so?
      • deltarholamda4 hours ago
        Write some straight HTML pages and serve it from bog standard Apache. Heck, get really fancy and do some server-side includes for your CSS or something.<p>It&#x27;s really fast, you can edit it with Notepad, and you can probably saturate your bandwidth with a consumer level PC.<p>It&#x27;s fluff because, well, our expectations are so unbelievably low. By the time you&#x27;ve bolted on every whizbang dingus leveraging four different languages (two of which are some flavor of Javascript), your twelve page site takes a couple of minutes to compile (what?), and it chokes your three load-balanced AWS compute nodes.<p>Web applications are hard. I get that. Web sites? They were, by design, incredibly simple. We make them complicated for often unclear reasons.<p>I appreciate what the Astro folks are trying to do, and it&#x27;s very clever. But your basic Web site need not require freaking npm in order to &quot;return to the fundamentals of the Web&quot;.
        • aembleton4 hours ago
          Astro will generate those HTML pages you can serve &#x27;from bog standard Apache&#x27;.<p>You can then use all of those npm packages to do whatever processing on your data that you want to do to generate the content and the pages and then just serve it as HTML.<p>I&#x27;m a backend dev, but Astro is the first time a front end framework has made sense to me for years. It fits my mental model of how the web works - serving up HTML pages with some JS just like we did 20 years ago. Its just that I can have it connect to a DB or an API to pull the data at build time so that I can have it generate all of the pages.
        • nchmy4 hours ago
          But astro literally generates straight html which can be cached wherever you want...<p>As for build time, I don&#x27;t have a clue - I haven&#x27;t used astro (and don&#x27;t plan to. Datastar + whatever backend framework you want is better). But I&#x27;m generally in favour of the direction they&#x27;re bringing JS frameworks.
  • poushkar8 hours ago
    I am feeling old reading the phrase &quot;traditional frameworks&quot; as a reference to SPA&#x2F;Virtual DOM frameworks all while the actual traditional frameworks like Backbone, jQuery, etc. actually worked the way described in the blogpost.
    • diggan8 hours ago
      &quot;Traditional&quot; always been a measure that depends on when we were born. &quot;Traditional&quot; internet for me is 56kbit modems, vbulletin forums, GTA:VC modding and IRC, while for older people &quot;traditional&quot; internet is probably BBS and such, and for the younger crowd things like Discord is part of the &quot;traditional&quot; internet.<p>You see the same thing in political conservative&#x2F;traditional circles, where basically things were good when they were young, and things today are bad, but it all differs on when the person was born.
      • coldtea5 hours ago
        &gt;<i>You see the same thing in political conservative&#x2F;traditional circles, where basically things were good when they were young, and things today are bad, but it all differs on when the person was born</i><p>when things decline that&#x27;s still an accurate represenation, not just an artifact of subjectivity
    • sesm5 hours ago
      I remember Backbone being pure SPA-focused with client-side MVC.
  • teekoiv8 hours ago
    It&#x27;s baffling to me why more SSR frameworks, Astro and NextJS namely, can&#x27;t adopt static pages with dynamic paths like SvelteKit. So for example, if you have a page &#x2F;todos&#x2F;[todoId] you can&#x27;t serve those in your static bundle and NextJS straight-out refuse building your app statically.<p>Whereas with SvelteKit, it builds happily and does this beautiful catch-all mechanism where a default response page, say 404.html in Cloudflare, fetches the correct page and from user-perspective works flawlessly. Even though behind the scenes the response was 404 (since that dynamic page was never really compiled). Really nice especially when bundling your app as a webview for mobile.
    • littlecranky675 hours ago
      I partly agree with you, but it is a design decision that comes with a drawback. A URL &#x2F;todos&#x2F;123 cannot be resolved in a SPA in a hard-reload. I.e. if a user were to bookmark &#x2F;todos&#x2F;123 or press reload in the browser, the browser would ultimately ask the underlying HTTP server for that file. As you mentioned, you would need a 404 page configured to fetch that - but that requires a configuration in the HTTP server (nginx etc.). So you are not just a static html+js+css+images deploy, you always will need server support. Another issue is, that 4xx errors in the HTTP spec are treated differently than 2xx: most notably, browsers are NOT allowed to cache any 404 responses, no matter what response header your server sends. This will ultimately mean, those &#x2F;todo&#x2F;123 bookmarks&#x2F;hard-reloads will always trigger a full download of the page, even though it would be in the cache. And again, you would always need support in the web server to overwrite 404 pages. While the current NextJS output can be just deployed to something like github-pages or other webspace solutions.<p>Now, these are just the limitations I can think of, but there are probably more. And to be fair, why &quot;break&quot; the web this way, if you can just use query params: &#x2F;todo?id=123. This solves all the quirks of the above solution, and is exactly what any server-side app (without JS) would look like, such as PHP etc.
      • teekoiv3 hours ago
        Interesting. You can set up the server to respond with 200.html as the catch-all so the requests would return 200. There was some issue with it—can&#x27;t remember what—which is why I switched to 404.html. After the initial load though the subsequent navigations would go through pushState so I think they&#x27;d be cached.<p>But I don&#x27;t see this is as big of a problem. With this I can switch and choose—SSR dynamic pages or use hacky catch-all mechanism. For any reasonably large site you probably would SSR for SEO and other purposes. But for completely offline apps I have to do zero extra work to render them as is.<p>Personally, I much prefer route paths vs query parameters not just because they look ugly but because they lose hierarchy. Also, you can&#x27;t then just decide to SSR the pages individually as they&#x27;re now permanently fixed to same path.
        • littlecranky673 hours ago
          I tend to agree that you <i>could</i> come up with a solution using server-side catch-all and custom 200&#x2F;404 routes - and actually I do, as I use nginx with a single line of try_files customization. But this is optional. It shouldn&#x27;t be required to mess with the server config, if you want a static deployment.<p>Besides, if you catch-all to a 200.html page, how would you serve 404s? Yes, you can integrate a piece of JS in the 200.html file and have it &quot;display&quot; 404, but the original HTTP response would have been 200 (not 404). A lot of bending web standards and technology, and I can see how framework authors probably decide against that. Especially given how much shit JS frameworks get for &quot;reinventing the wheel&quot; :)
          • teekoiv1 hour ago
            It doesn&#x27;t really matter from user&#x27;s point of view if the response is 200 or 404 if the end result is the same. This is just a rendered web page after all. But yeah, you can get stuck in the semantics of it but I personally just use what works and move along.
    • exiguus1 hour ago
      Maybe i misunderstood you, but I did dynamic routes&#x2F;pages for Next and Astro static builds. Using contentful or storyblok as a CMS, where the editor defines the routes and the components&#x2F;bloks per page. Basically, the projects had one slug like [...slug].<p>Routes and Components per Page are dynamically created while export Next or build Astro static pages. In both frameworks you create the pages &#x2F; slugs via getStaticPaths. And if ISR&#x2F;ISP is enabled, even new pages (that are not known during build time) are pre-rendert while running the server.<p>In Next it is called dynamic routes[1] and in Astro dynamic pages[2]. Catch all slugs in Next and Astro are [...slug] e.g..<p>[1] <a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;pages&#x2F;building-your-application&#x2F;routing&#x2F;dynamic-routes" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;pages&#x2F;building-your-application&#x2F;rout...</a><p>[2] <a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;routing&#x2F;#example-dynamic-pages-at-multiple-levels" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;routing&#x2F;#example-dynamic-...</a>
    • dschuessler8 hours ago
      Maybe I am misunderstanding you, but isn&#x27;t this what Astro&#x27;s `getStaticPaths`[0] function is for?<p>[0]: `<a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;routing&#x2F;#static-ssg-mode" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;routing&#x2F;#static-ssg-mode</a>
      • threetonesun7 hours ago
        I think since they used [todoId] in the example they mean a static page which does not exist at build time. Which both can do, it’s called ISG (or on-demand in the Astro docs), but it requires a server to work, or you can create a static route that accepts any parameters and pass those to JavaScript to run on the client.
      • teekoiv6 hours ago
        Yeah, what the other commenter said. getStaticPaths still requires you to define the rendered routes build-time
        • shepherdjerred2 hours ago
          <a href="https:&#x2F;&#x2F;astro.build&#x2F;blog&#x2F;live-content-collections-deep-dive&#x2F;" rel="nofollow">https:&#x2F;&#x2F;astro.build&#x2F;blog&#x2F;live-content-collections-deep-dive&#x2F;</a>
          • teekoiv1 hour ago
            That&#x27;s cool but I fail to see how this results in 100% static bundle.
            • shepherdjerred41 minutes ago
              afaik astro will serve a live collection as a static HTML file (unless you explicitly include JS)
    • arminluschin8 hours ago
      I’m also a big fan of static, and nextjs supports this: <a href="https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;app&#x2F;api-reference&#x2F;functions&#x2F;generate-static-params" rel="nofollow">https:&#x2F;&#x2F;nextjs.org&#x2F;docs&#x2F;app&#x2F;api-reference&#x2F;functions&#x2F;generate...</a>
      • teekoiv5 hours ago
        It doesn&#x27;t. Those are executed build-time and you can&#x27;t just set a wildcard so anything outside the given set results in 404.<p>As background, I wanted to make a PoC with NextJS bundled into a static CapacitorJS app somewhat recently and had to give up because of this.<p>You can try tricking NextJS by transforming the pages into &quot;normal&quot; ones with eg query parameters instead of path, but then you need complicated logic changing the pages as well as rewriting links. As you of course want the normal routes in web app. Just a huge PITA.
        • littlecranky674 hours ago
          Not sure why you gave up. All you need to do, is use query params: &#x2F;todo?id=123 and use `const { id } = useSearchParams()` in your code. Yes, the urls won&#x27;t be that pretty, but I don&#x27;t know if this is a road block. I have a NextJS webapp up and running that is 100% SPA (no SSR, full static export) and uses a C#&#x2F;.NET REST Backend for data [0]. Works (almost) flawlessly.<p>[0]: lockmeout.online
          • teekoiv3 hours ago
            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&#x27;s just a huge change, especially if I want to keep the old routes in my web app.
            • littlecranky673 hours ago
              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.
              • teekoiv1 hour ago
                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.
    • nchmy5 hours ago
      I might not be understanding you (or the various frameworks) completely, but are Astro&#x27;s server Islands what you&#x27;re looking for?<p><a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;server-islands&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;server-islands&#x2F;</a>
      • nchmy3 hours ago
        Or, actually, <a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;on-demand-rendering&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;on-demand-rendering&#x2F;</a>
    • steve_taylor8 hours ago
      You can indeed do that with Next.js. In the app router, it’s called generateStaticParams. In the pages router, it’s getStaticProps.
      • pheew6 hours ago
        This isn&#x27;t the same as getStaticProps is evaluated at <i>build</i> time not runtime
  • exiguus2 hours ago
    I think the main benefit is that you are not forced to use any other library or framework like React or Vue on top of it. You can simply use HTML or Web Components. However, Astro can perform similar tasks to Next or Nuxt, such as SSR, ISR, static site generation, and middleware.<p>Another differences and benefit of Astro is the island architecture, compared to other frameworks. This means you can implement micro frontends. Island architecture and micro frontends are features that companies or projects may want if they have multiple teams. For example, one team could be working on the checkout process, another on the shopping basket, and another on product listings.<p>Now, you can use Astro to combine these components on a single route or page. And you control how this components are rendered. Astro also allows you to share global state between these islands.<p>This approach is beneficial because teams can develop and ship a single feature while having full responsibility for it. However, it also has downsides, and similar outcomes can be achieved with non-island architectures.<p>For instance, if all teams use React, it is common for each team to use a different version of React, forcing the browser to load all these versions. The same issue arises if one team uses Vue, another uses Angular, and another uses React or any other framework.<p>I&#x27;am not fully convinced that it will change the web. It is basically a Next or Nuxt without the library&#x2F;framework login. And it overs the Island-Architecture, that is usually only beneficial for very huge projects.<p>But, you should try it. I work with Astro since there first release, now for several years, and I can recommend you to give it a try.<p>It is also a nice tool, if you want to get ride of React or Vue and move to web-components or if you want to replace Next or Nuxt. You can do this with Astro, step by step.
  • rasmus16108 hours ago
    I recently build a website for a medical practice using Astro.<p>I was amazed by how easy it was compared to my experience with Wordpress for this several years ago.<p>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.<p>I even built a very simple git-based CMS so that the client can update the content themselves.<p>Web dev has really come a long way, despite what a lot of people say.
    • ewuhic8 hours ago
      Were you commissioned by a friend? How does one find a gig building a medical practice website?
      • rasmus16106 hours ago
        I’m a doctor myself and thus have contacts to people having medical practices :)<p>But at least in Germany there are some agencies doing nothing else.
    • steve_taylor8 hours ago
      Be careful with Netlify. Their bandwidth charges are even more egregious than Vercel’s.
      • rustc7 hours ago
        &gt; Be careful with Netlify. Their bandwidth charges are even more egregious than Vercel’s.<p>$550&#x2F;TB for those who want to save a search.
      • rasmus16106 hours ago
        Yes, good point. Although the traffic for these websites is so small, that I think I‘m good there for a long time.
        • throwaway773852 hours ago
          Until you get DDoS&#x27;ed and they won&#x27;t let you set a billing cut-off -.-
  • pjmlp8 hours ago
    Fundamentals of the Web haven&#x27;t gone away, anyone still coding across PHP, Spring, Quarkus, ASP.NET MVC hasn&#x27;t noticed that much how bad things have become with JS frameworks.<p>Unfortunately in fashion driven industry, it isn&#x27;t always easy to keep to the basics.
  • kh_hk7 hours ago
    To me no, it&#x27;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&#x27;t need all that js to begin with. islands work until they don&#x27;t, and a lot of stuff gets inlined too. I guess it&#x27;s fine if you stop caring about the final build.<p>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.
    • rustc7 hours ago
      &gt; islands work until they don&#x27;t<p>Like when?
      • mceachen2 hours ago
        Not the op, but I’d guess islands become a PITA when there is user-visible state that must be synchronized and rendered coherently across multiple islands.
      • kh_hk5 hours ago
        Setting `client:load` and `client:visible` for (svelte) islands you want to run on the client ends up inlining script type modules all around the html. It looked like a big hack to me.<p>On the positive side their use of web components is a nice bet.
        • rustc4 hours ago
          And does it break something? I was replying to &quot;islands work until they don&#x27;t&quot;.
          • kh_hk4 hours ago
            It breaks the third wall.
  • ttoinou8 hours ago
    I spent a small amount of time looking into Astro and I didn’t get the difference with the Fresh framework created by the Deno team.. ? Fresh does this Island architecture already, and benchmarks on Astro website dont include Deno+Fresh to compare. So I’m still wondering what’s the benefit of using Deno+Astro vs. Deno+Fresh
    • niam6 hours ago
      Astro and Fresh were both inspired by the islands <i>idea</i> which was iirc coined by an Etsy frontend architect and further elaborated on by the creator of Preact.<p>My understanding is that Astro is able to more-or-less take a component from any combo of popular frameworks and render it, whereas Fresh is currently limited to just Preact via Deno. I think the limitation is to optimize for not needing a build step, and not having to tweak the frameworks themselves like Astro does (did?).<p>I&#x27;m not affiliated; I&#x27;ve just looked at both tools before.
    • pier255 hours ago
      There are plenty of differences. Eg Fresh can only run on Deno and can only use Preact.
  • evklein5 hours ago
    My personal website is written with Astro. I love it! Admittedly I&#x27;m still a little trigger-happy with my JS usage, but overall the ability to write templated pages and utilize islands that don&#x27;t require big dependencies is the most friendly web development experience I&#x27;ve had.<p><a href="https:&#x2F;&#x2F;evklein.com" rel="nofollow">https:&#x2F;&#x2F;evklein.com</a>
  • pentagrama7 hours ago
    But it has a CMS? The author said that replaced WordPress sites with Astro, and on <a href="https:&#x2F;&#x2F;astro.build&#x2F;" rel="nofollow">https:&#x2F;&#x2F;astro.build&#x2F;</a> I see a comparison to WordPress.<p>Astro brings a friendly UI to maintain and update the sites? Like the WordPress panel and editor.
    • rob6 hours ago
      It doesn&#x27;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&#x27;re no longer talking to your client who has absolutely no technical experience, they&#x27;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&#x2F;etc to pull in your changes. They&#x27;ll probably be fuming they have to find a developer that knows how to edit and manage that compared to something like WordPress which is used for the majority of those websites.
      • pier255 hours ago
        It would be cheaper to hire a dev to update some content than to pay a wp host for 5-10 years.
        • bogwog4 minutes ago
          I just did a search for &quot;wordpress hosting&quot; and picked one of the first results without shopping around, and the (clearly overpriced) plan I saw was $9.99&#x2F;mo. In ten years that&#x27;d be $1200.<p>A WP deployment on a simple shared hosting plan like that could run itself without needed a dev or sysadmin.
    • abound7 hours ago
      Not sure if anything major has changed recently, but I think you bring your own CMS. I&#x27;ve used Astro successfully with Strapi, for example.
      • Y-bar4 hours ago
        If they need to bring in a CMS to edit content and juggle assets they could have used Wordpress in headless mode, which the customer was already used to…<p>Eg. <a href="https:&#x2F;&#x2F;www.gatsbyjs.com&#x2F;docs&#x2F;glossary&#x2F;headless-wordpress&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.gatsbyjs.com&#x2F;docs&#x2F;glossary&#x2F;headless-wordpress&#x2F;</a>
  • Zealotux7 hours ago
    Please stop recommending Next.js as the de facto React framework, we need some critical thinking back into front-end. Remix (React Router v7) or TanStack are much better alternatives.
    • throwaway773852 hours ago
      Second this. Next.js had potential, but it feels like it&#x27;s gone downhill majorly since Vercel got involved.<p>Been on the Next.js journey since v10, lived through the v13 debacle and even now on v15, I&#x27;ve very much cooled on it.<p>I find both React and Next.js move way too fast and make incredibly radical changes sub-annually. It&#x27;s impossible to keep up with. Maybe it could be justified if things improved from time to time, but often it just feels like changes for changes&#x27; sake.
    • vidyesh7 hours ago
      Remix&#x2F;React Router v7 was&#x2F;is on a right path. I hope whatever they are planning with Remix with preact and using web standards will bring back the robust way of building websites.<p>I did not like how Remix to RR7 transition was made though, my project built using Remix was not an easy upgrade and I am rewriting a lot of it on RR7 now.
      • Zealotux7 hours ago
        Absolutely agree, the Remix&#x2F;RR7 move was awkward and they have a thing for breaking changes, TanStack seems more reasonable on that part.
        • c-hendricks2 hours ago
          We&#x27;re still on RR5 since they decided to change how nested routes work, a nested router doesn&#x27;t get all params from parent routes, and after advocating absolute paths they switch to advocating relative paths, which are a mess when you want to use a component in multiple places and harder to debug &#x2F; verify (all our routes are fully typed safe)
  • wackget3 hours ago
    &quot;The fundamentals of the web&quot; does not include a build step or the use of a package manager.
    • nchmy3 hours ago
      Backend stuff is orthogonal to web fundamentals. What matters is ssr html.<p>Still, yes, I prefer other tooling in the backend. But astro is a good thing for JS devs
  • braebo8 hours ago
    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).
    • pier255 hours ago
      Sveltekit doesn’t have islands. That single feature puts Astro ahead in situations where you don’t want an spa.
    • steve_taylor8 hours ago
      I was all in on SvelteKit until I noticed weird CSS issues thanks to :global.
  • donatj6 hours ago
    The title change lead to a bit of an unexpected jolt, I assumed I&#x27;d clicked on the wrong link. I&#x27;m not sure where that falls on the guidelines though given the circumstances.
  • sublinear8 hours ago
    &gt; When I say Astro sites are fast, I mean properly fast. We&#x27;re talking 40% faster load times compared to traditional React frameworks.<p>That&#x27;s a really low bar. Why not static pages? Why even use a framework at all if you&#x27;re thinking of using Astro?
    • dschuessler8 hours ago
      Per default, Astro generates static pages. So it makes sense to compare it to an approach that doesn&#x27;t.<p>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&#x27;s just what I value. I whole-heartedly recommend trying it out.
    • zffr8 hours ago
      How do you do server-side rendering without a framework?<p>If you use static pages, how do you make sure that shared UI like navbars all update if you decide to make a change?
      • input_sh6 hours ago
        Pretty much every static site generator has an option of splitting a page into reusable components, so something like:<p><pre><code> &lt;html&gt; {% include &quot;components&#x2F;head.html&quot; %} &lt;body&gt; {% include &quot;components&#x2F;navbar.html&quot; %} ... &lt;&#x2F;body&gt; &lt;&#x2F;html&gt; </code></pre> Some even allow you to pass variables, so something like:<p><pre><code> {% include &quot;components&#x2F;button.html&quot; text=&quot;example&quot; url=&quot;https:&#x2F;&#x2F;example.com&quot; %}</code></pre>
        • pier255 hours ago
          Using old school template partials is a massive downgrade in dx compared to Astro components.
          • hasanhaja4 hours ago
            What about DX in terms of template execution speed? There are many implementations of template fragments on various platforms like Go and Rust [1], which might arguably perform better than their JavaScript counterparts. Wouldn&#x27;t quicker execution give you a faster feedback loop when developing, and also give you a faster UX?<p>[1] <a href="https:&#x2F;&#x2F;htmx.org&#x2F;essays&#x2F;template-fragments&#x2F;#known-template-fragment-implementations" rel="nofollow">https:&#x2F;&#x2F;htmx.org&#x2F;essays&#x2F;template-fragments&#x2F;#known-template-f...</a>
            • pier253 hours ago
              &gt; <i>Wouldn&#x27;t quicker execution give you a faster feedback loop when developing, and also give you a faster UX?</i><p>Yes, I&#x27;ve used stuff like Templ for Go or Razor Pages for .NET.<p>Even if the raw HTML rendering performance is significantly better, there are other factors to consider in terms of dx.<p>1) Most backend languages will not hot reload modules in the client which is what Vite gives you.<p>Very often the whole backend application needs to be recompiled and restarted. Even with something like the .NET CLI which does have a hot reload feature (and it&#x27;s absolute garbage btw) the whole page needs to be reloaded.<p>PHP has an advantage here since every request typically &quot;runs the whole application&quot;.<p>But even with PHP, JS and CSS assets do not have hot reload unless you&#x27;re also running Vite in parallel (which is what Laravel does).<p>With Astro you can run a single Vite dev server which takes care of everything with reliable and instant hot reload.<p>2) With Astro you will get islands which are simply not feasible with any non-JS backend. Islands are so much more powerful than old school progressive enhancement techniques. When we were using eg jQuery 15+ years ago it was a massive pain to coordinate between backend dynamic HTML, frontend JS code, and CSS. Now with islands you can encapsulate all that in a single file.<p>3) You also get CSS co-location. Meaning you can write an Astro server component with its own CSS scoped to the particular piece of markup. Again, CSS colocation is a huge win for dx. These days I write vanilla CSS with PostCSS but with Astro it&#x27;s trivial to integrate any other CSS workflow: Tailwind, SCSS, etc.<p>4) Finally, you have to consider bundling of frontend assets. I don&#x27;t think it&#x27;s an exaggeration to say that solutions like Vite are really the best you can get in this space. Internally it uses Go and Rust but it&#x27;s all abstracted for you.<p>If you have a use case where you really need exceptional HTML rendering performance in a monolithic application, Astro (or really anything in JS) is definitely a bad fit. But you can easily run an Astro server app on eg Cloudflare Workers which could would work in many of those use cases too and reduce latency and adapt dynamically to load.
      • rossant7 hours ago
        Static site generators?
  • pks0162 hours ago
    I tired Astro but not for me. I was upgrading my personal website from Jekyll to Astro couple of years back. It was a steep learning curve with lots of folders. Things used to break all the time. Then I switched to raw html and css
  • mrcwinn1 hour ago
    Tanstack Start is another nice alternative, if you need a bit more, but don&#x27;t want to go with Next.js.
  • ulrischa1 hour ago
    The Island concept is really exactly what php is doing since decades
  • thinkindie4 hours ago
    What I don&#x27;t understand from these conversation is the main selling proposition for Astro: if you have a content-heavy website, you should ship zero Javascript. And I agree with that, most of the websites heavy in content will at most have a couple of pages consumed in a single session.<p>But if my &quot;website&quot; is an application, Javascript makes the whole user experience better, if implemented well. It doesn&#x27;t matter that the user will wait for 1 more second if they will have to spend the entire day working on it.
  • ygritte7 hours ago
    For me, a return to web fundamentals would include not having to use NPM.
  • hiAndrewQuinn5 hours ago
    I&#x27;ve become pretty convinced everyone working in software should have a something like a static site generator somewhere in their back pocket. It could be Astro, Hugo (my choice), or even pandoc running in server mode, which is unhackable because you would have to first understand the Haskell type system to hack it. But it should be there for all the little times you just want to spin up something fast, cheap, and content-driven.
  • sktrdie4 hours ago
    Next.js hydrates only client components - so effectively it&#x27;s doing island architecture. And it&#x27;s react end to end. How&#x27;s that different from Astro? Stating things like &quot;Components without the complexity&quot; doesn&#x27;t really mean anything unless you do some comparisons?
    • voat3 hours ago
      Client vs server routing
  • andybak8 hours ago
    &gt; Traditional frameworks hydrate entire pages with JavaScript. Even if you&#x27;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 &quot;islands.&quot;<p>I guess I&#x27;d argue &quot;Traditional Frameworks&quot; were the ones that never stopped doing this. Laravel, Django, Rails etc. Then the SPA frameworks came along and broke everything.<p>Also - what on earth is &quot;f*&quot;? I originally assumed it was shorthand for &quot;fuck&quot; but is &quot;fuck dream&quot; a common expression? And wouldn&#x27;t you normally write it as &quot;f***&quot;?
    • dang8 hours ago
      I&#x27;ve replaced the submitted title (&quot;Astro is a developers f* dream&quot;) with a representative sentence from the article.
      • andybak8 hours ago
        thank you. it was a horrible title
    • jpc08 hours ago
      &gt; Also - what on earth is &quot;f<i>&quot;? I originally assumed it was shorthand for &quot;fuck&quot; but is &quot;fuck dream&quot; a common expression? And wouldn&#x27;t you normally write it as &quot;f*</i>&quot;<p>I would thinking F**ing, to delve deeper into the meta discussion
    • flir8 hours ago
      I&#x27;m reminded of the fat client vs thin client pendulum. Everything old is new agian.
  • tropicalfruit14 minutes ago
    it says static html and css but open the site and first thing i saw is an npm command. yuck.
  • tajd8 hours ago
    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&#x27;s cool to add react components in to create more interactive points (but I haven&#x27;t deployed that element yet).<p>Speed is probably the same as jekyll - but relative to my react vite and nextjs apps it&#x27;s about 10 times faster.<p>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.
    • hasanhaja4 hours ago
      Do you have an intuition of when something becomes hefty and complicated, and would require a full stack solution like Next.js?
  • FabHK3 hours ago
    Could someone compare it like I&#x27;m 5 to static site generators like Hugo, Jekyll? Does it make it easier to throw in necessary JS (e.g. for comments)? Thanks.
    • todotask21 hour ago
      Coming from Go, I don’t enjoy working with the Go or other template engine, I have comparing various 3rd party Go template libraries, and settle down with JSX-like syntax, which is just way easier.<p>You should try it out, not comparing.
  • todotask23 hours ago
    Just curious if non-techy folks might ask whether Astro is reliable enough for production use, such as e-commerce, marketing sites, etc.
  • mediumsmart6 hours ago
    I have returned to the fundamentals of the web and there is no sign of Astro here let alone JavaScript.
    • nchmy5 hours ago
      What are you using?
      • righthand2 hours ago
        Html + Css would be a good guess.<p>Me? I’m using Html + css + xslt.
  • paradox4603 hours ago
    Return? It never left for many of us<p>Seriously. This is how things are done in most nonjs frameworks
  • lpln34527 hours ago
    I&#x27;ve only heard of Astro before, but I got interested today and it seems like an intriguing framework.<p>That said, Astro also seems to be developed under a venture-backed company. Is it still less likely to end up like Next.js and React under Vercel&#x27;s influence?
  • user____name6 hours ago
    How is this different from something like PHP? I don&#x27;t get it.
    • todotask21 hour ago
      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).<p><a href="https:&#x2F;&#x2F;unpic.pics&#x2F;" rel="nofollow">https:&#x2F;&#x2F;unpic.pics&#x2F;</a><p>I&#x27;m aware there&#x27;s a new PHP web framework that&#x27;s somewhat similar to Astro, but I can&#x27;t recall the name.<p>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.
    • nchmy5 hours ago
      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&#x27;t think it is all that capable of doing highly dynamic SSR apps (though their server Islands might make that possible? <a href="https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;server-islands&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.astro.build&#x2F;en&#x2F;guides&#x2F;server-islands&#x2F;</a>)<p>And, also, &quot;php&quot; in your question could be ruby, go, C or anything else that runs on the server.<p>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.
    • shreddit5 hours ago
      It’s actually a lot like php, just without the php language stuff.<p>It’s php for javascript devs?
    • aembleton4 hours ago
      PHP needs to be hosted on a server that can parse PHP. Astro generates HTML so can be hosted anywhere that can serve HTML.
      • nchmy3 hours ago
        What?<p>Astro needs to run on a server that can run node etc<p>And php can equally have its html cached.
        • aembleton2 hours ago
          &gt; Astro needs to run on a server that can run node etc<p>It needs to run on your computer to generate the HTML, but you can just run npm run build then copy the contents from the dist folder to your apache server, or whether you want to host it.<p>At least, thats how I do it.<p>I haven&#x27;t used PHP for about 20 years so I&#x27;m sure its changed a lot.
          • nchmy1 hour ago
            But what you&#x27;re describing could be done for php, or any other backend language&#x2F;framework... There&#x27;s nothing unique to Astro in this regard.
  • marcosscriven7 hours ago
    Does this have any advantage over something like Hugo, for a static only website?
  • richardfey7 hours ago
    Reminds me of Zola (<a href="https:&#x2F;&#x2F;www.getzola.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.getzola.org&#x2F;</a>), which was a step up from Hugo for me.
  • fuzzy_biscuit7 hours ago
    Astro didn&#x27;t introduce island architecture.
    • pier255 hours ago
      But it certainly popularized it.
      • righthand2 hours ago
        It popularized “islands” term (also debatable), not the “islands” architecture.
  • account-56 hours ago
    I this not similar to htmx?
    • nchmy5 hours ago
      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.<p>I prefer htmx and, better yet, datastar as they&#x27;re backend-agnostic.
      • jadbox4 hours ago
        Why do you prefer datastar vs htmx? Afaik htmx tends to allow progressive enhancement without JS, while datastar requires JS to work.
        • nchmy4 hours ago
          Htmx IS JavaScript...<p>Datastar does everything htmx does and much more. And, iirc, is also smaller. Just explore their site, docs, essays etc
  • yakshaving_jgt7 hours ago
    Gotta say, even as a programmer, my &quot;f* dreams&quot; don&#x27;t involve programming.
  • camillomiller8 hours ago
    &gt;&gt; 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.<p>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!
  • tomashubelbauer8 hours ago
    I misread the title and was quite confused about when the F* programming language connection will take a stage in the article. Spoiler alert: it never does, because the title doesn&#x27;t make a reference to the F* programming language :D
    • diggan8 hours ago
      I&#x27;m still a bit dumbfounded, what is the F* a reference to if not the language? Maybe just a typo for some other abbreviation?
      • stevoski8 hours ago
        F$&amp;@ing
        • diggan8 hours ago
          Ah man do I feel dumb now. I guess F&#x2F;F#&#x2F;F* hurt me in some way, because now it&#x27;s obvious, guess I&#x27;ve never seen it written like that. Thanks!
  • inatreecrown28 hours ago
    [flagged]
  • croisillon8 hours ago
    [flagged]
  • rckt8 hours ago
    &gt; I&#x27;ve found Astro perfect for marketing sites, blogs, e-commerce catalogues, and portfolio sites<p>Basically, not suitable for anything complex.
    • dschuessler8 hours ago
      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.<p>What makes it so great is not that it serves a particular niche (like &quot;content-driven websites&quot;) 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.
    • paintbox7 hours ago
      That&#x27;s the point. It&#x27;s a war on recentish industry standard to develop all projects using same tools made by&#x2F;for huge organizations working on huge projects.<p>Same thing happened with microservice architecture.
    • btbytes8 hours ago
      The number of web projects that fall into these categories vastly outnumber “complex” projects. For complex there is always WASM.
      • hasanhaja4 hours ago
        Yeah, this is my gut-feeling too! Because the alternative for &quot;complex&quot; being discussed is Next.js, but that doesn&#x27;t really help you with &quot;complex&quot; applications, and you still have to bootstrap a lot of infrastructure yourself (with dependencies, or by yourself).
    • hasanhaja4 hours ago
      What do you mean by complex?
      • progx4 hours ago
        More than a blog or a simple static website.
    • willtemperley6 hours ago
      You could have React in one Astro island and SvelteKit in another. That&#x27;s complex enough.
  • ansc8 hours ago
    &gt;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.<p>I can&#x27;t with this goddamn LLM blog posts, it just drowns everything.
    • esseph8 hours ago
      Some of us actually write like that... :&#x2F;<p>Sucks when everything you write sounds like a bot because you&#x27;re autistic.
      • SideburnsOfDoom7 hours ago
        &gt; Some of us actually write like that<p>The fact that LLMs write like that is proof of that people write like this too, as LLMS produce statistical averages of the input writings.
        • aaronbaugher4 hours ago
          It kind of surprises me that they never confuse &quot;it&#x27;s&quot; and &quot;its&quot; and common mistakes like that, when it seems like most human writers today swap them randomly. I suppose that&#x27;s thanks to a lot of the text in the training data predating the collapse of English education.<p>I&#x27;m not sure why em dashes are so popular, though. I don&#x27;t think I&#x27;ve ever seen human writing that had as many em dashes as LLMs use.
          • esseph3 hours ago
            I add them where it makes sense, in more of a way to mimic natural conversations.
      • falcor848 hours ago
        I don&#x27;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.
        • esseph8 hours ago
          Maybe you&#x27;ve never been told you sound like a robot, then.<p>Feeling less-than-human isn&#x27;t great.
          • owebmaster6 hours ago
            Are you the post author?
            • esseph3 hours ago
              No, just a human getting tired of things I type online being thought of as LLM spam.
              • owebmaster2 hours ago
                This sounds like what a bot programmed to engage in HN would do, honestly.
                • esseph2 hours ago
                  I thought I would have more opinions from ivory, gated towers tbh, and maybe a fatter bank account.
      • ansc7 hours ago
        I doubt it to be honest. It&#x27;s so distinct and non-existing.<p>&gt;With Astro you&#x27;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.<p>&gt;What struck me most after migrating several projects is how Astro makes the right thing the easy thing. Want a fast site? That&#x27;s the default. Want to add interactivity? Easy, but only where you need it. Want to use your favourite framework? Go ahead, Astro won&#x27;t judge.<p>&gt;Developer experience that actually delivers<p>I am downvoted so I guess I&#x27;m wrong. It&#x27;s just bland and form in a way ChatGPT usually outputs. Sorry to the author if I&#x27;m wrong.
        • jakelazaroff5 hours ago
          I&#x27;ve never seen an LLM use this sort of socratic writing style.
        • esseph3 hours ago
          Damn, first it sounds like a robot, then it&#x27;s bland.<p>Speak your truth, poster!
    • falcor848 hours ago
      What does this have to do with LLMs? Are you just uncomfortable with dashes?
      • ansc7 hours ago
        You&#x27;re not just venting about me being uncomfortable with dashes — you are making a philosophical claim about what comfortability really means. And that? That is a true super-power.
        • fkyoureadthedoc6 hours ago
          The quote you posted from the article isn&#x27;t even the right size of dash though. It&#x27;s a hyphen, not an em dash. And an LLM would have it properly touching the surrounding text.