7 ms·
Astro: All-in-one web framework designed for speed
- Obertr 3y agoI really wonder how do those frameworks creators earn for living? And why are there so many even if there are competitors like next.js who obviously hold the market
- aatd86 3y agoThey have a react job to fund their side-project (/jk) :o)
- revskill 3y agoThat's the best feature of React: To pay the bill.
- promiseofbeans 3y agoEternally rasing more VC money. The core devs were previously snowpack and skypack, both VC funded that never got bought or sold a product.
- maccard 3y agoToday, I'm not sure. But a few years ago, you raised VC money, gained a user base, used that to raise more money, and then ran a 10 person team on $20m for a while. I think the next step is a docker desktop move,or a hashicorp move where you offer a managed offering on top of your open source project.
- fyzix 3y agoThere no doubt that writing a popular frameworks boosts your status which could make it easier to get a job at VC funded startups. Vercel hired the top devs working on React and the creator of svelte. Netlify hired the creator of solid. Some rely on donations from companies that use their frameworks. Eg: Evan You (creator of Vue)
- albert_e 3y agoAbstractions all the way down!
- deleted 3y ago[deleted]
- sergioisidoro 3y agoI'm a bit baffled by the focus on SEO on the latest frontend libraries. Sure it makes sense if you're building a store or marketplace that needs to be publicly indexed, but for most web applications SEO is only important for landing page.
- Mandatum 3y agoMost web applications are businesses reliant on income, which is also reliant on organic discovery and growth for new customers.
- satvikpendem 3y agoIf I make an e-commerce page, I definitely want SEO on those products. Why not be able to use my framework of choice while also having SEO? Keep in mind these frameworks are used for making websites like blogs as well as web apps.
- victorbjorklund 3y agoAstro is probably a bad choice for an app. It shines in creating content heavy sites: blogs, marketing pages, etc
- kkarimi 3y agoI have been using it for an app and it’s perfectly fine. It supports middleware and doesn’t do too much magic, less complicated and more straight forward than next and the alternatives
- ricardobeat 3y agoThat’s the balance swinging the other way. Since React came into the scene SEO and accessibility have been afterthoughts, but that didn’t stop millions of static* websites being built with it. It’s still not possible to do partial hydration with the majority of popular frameworks, Astro brings that back. * sites that should’ve been static but were built as an SPA
- c-hendricks 3y ago
- drowsspa 3y agoMy phone is literally struggling to even scroll through this page.
- arcanemachiner 3y agoHalf the reason I keep my mid-range 2018 Android phone as a daily driver, is as a litmus test to see how poorly-optimized a website is. And this page is a very poor sales pitch in that regard.
- drowsspa 3y agoMy phone is middle-tier but it is new. This website has probably the worst scrolling performance I've ever seen while using this phone. Can only imagine the dozens of megabytes of JS it is downloading once the "zero-JS part for SEO" is done.
- sph 3y agoAnd the result is total frustration, because everybody else is designing on their M2 Macbook, so everything is frustrating to use. I have an entry-level iPad from 2018 that crashes on most media-heavy websites, though I also blame Apple because it is obvious that every iOS release uses more and more RAM than the previous one. CPUs don't get slower as they age, but it certainly feels like it!
- deleted 3y ago[deleted]
- resonious 3y agoSame. Very ironic given how hard they're peddling speed.
- jcalve 3y agoI noticed the same, what's going on? Too much complex CSS?
- starlevel003 3y agoIt doesn't even smoothly scroll on my desktop.
- k__ 3y agoI'm not a fan of the SSR hype. What frameworks would you recommend for building CSR apps?
- deleted 3y ago[deleted]
- kmlx 3y agoreact with any bundler out there?
- k__ 3y agoBig fan of React. But it seems the frameworks around it are moving more and more into the SSR direction.
- floydnoel 3y agoThat’s true, which is annoying when all you might want is simple CSR. For that use-case, I have found that Vite works very well these days. It is exceedingly lightweight and fast also. Check it out!
- kmlx 3y agoyes, i have a project that uses it. it’s pretty great, fast too.
- threatofrain 3y agoThe focus has indeed been on SSR but Next is still good for SPA. If you're okay going off the popular main road there's SvelteKit, SolidStart, or QwikCity.
- junon 3y agoSurplus, if you want something lighter weight than most frameworks.
- ohgodplsno 3y ago
- kmlx 3y agohow does this compare to nextjs?
- mhoad 3y agoFor all of its marketing hype, Next is actually kind of dogshit when it comes to performance especially compared to something like Astro https://calendar.perfplanet.com/2022/mobile-performance-of-next-js-sites/ https://calendar.perfplanet.com/2022/mobile-performance-of-n...
- kmlx 3y agothanks. from my experience performance is tricky at best of times. what about APIs, rendering engines, technology stack, replacement for next/image… the juicy stuff…
- ohgodplsno 3y agoAnd this is why we don't let people with absolutely no knowledge on benchmarking do benchmarks. This isn't measuring Next.js's performance, it's measuring the performance of sites that use Next.js. I could run my website on a bare metal server with a custom made, SIMD compatible, Assembly-written web server that only returns contents.html, if contents.html is 45MB including 32MB of tracking JS that has to run synchronously, my performance is going to be dogshit. Proper benchmarks of Next would come from using the exact same site setup, the exact same resources served and comparing various sizes and complexities against other tools. And I say this as a notorious Next.js (actually, *.js) hater.
- mhoad 3y agoStrong disagree on this one. We are talking about the difference between theoretical performance (what you COULD do) vs performance in reality (this is a dataset that measures all the various nextjs websites across the web and then compares them along well established benchmarks against the rest of the internet across time). One of those two things is infinitely more valuable than the other.
- heresjohnny 3y agoI am a Jekyll user that has switched to Astro. I like it a lot, since it provides me with simple templating, bundling, out of the box TypeScript, and Tailwind support. It can do much more (like embed multiple UI frameworks) but I haven’t found the need yet. For anything simple like a landing page, this has become my go to.
- pibefision 3y agoI agree. And it’s faster than Jekyll in terms of building and exporting in Cloudflare, GitHub, vercel, etc.
- promiseofbeans 3y agoGotta apreciate the way the page icon changes to monochrome when you switch away from the tab.
- eis 3y agoIf every site did that then it would be harder to quickly spot one in a long list of tabs. A neat trick but I don't think it is a particularily good idea.
- ohgodplsno 3y agoNo, thank you. Make alternative favicons a standard, and let my browser handle it. Like the other comment says, if all of my icons went grey in a sea of 100 tabs, I'd be royally fucked. Google is already confusing enough with all their icons being basically the same.
- brianolson 3y agoThe homepage is all hype, I'm still not sure what Astro really _is_. From clicking through to GitHub I know you install it with npm, so I guess it's written in JavaScript. I guess it's focused on browser side but for 'all in one's I'd expect something server side too?
- promiseofbeans 3y agoIt's a static site generator (that can also run SSR sites if you need to update pages fast - e.g. for ecommerce) for conent focused sites + a custom templating language that lets you use UI components from any framework.
- rado 3y agoAstro is an all-in-one web framework powered by your favorite UI components and libraries Clear as mud.
- c-hendricks 3y agoNah not really. Are you not sure what a framework is? Or are you confused by there being different UI components and libraries? Either way both are pretty easy to look up!
- rado 3y ago“all-in-one”
- c-hendricks 3y agoYes, that is what it says. all-in-one (new oxford dictionary): "combining two or more items or functions in a single unit" Astro - can do SPA - can do MPA - can use a variety of different view libraries - can write endpoints to serve any data So is your ill-defined issue with "all-in-one" the fact that it doesn't support every single view library?
- lloeki 3y ago
- satvikpendem 3y agoWhat I don't understand about Astro is, if I use React or NextJS, why would I need Astro at all? What does it do that the JS framework doesn't?
- danabrams 3y agoYou wouldn’t use Astro with NextJS, but you absolutely would with react. Astro is an SSR more tuned to generate static sites than SSR with hydration. It uses the islands architecture instead of full page re-hydration. So if you’re generating a static site with a few react components sprinkled in, it’s a good thing to use. Because of the islands architecture, you can also mix and match component libraries. So one component can be react, one can be vue, one can be svelte, etc. Next and remix are both less focused on SSG than Astro. A lot of people are making very content driven sites using react or Next—sites that aren’t really or shouldn’t be SPAs—and this is a great tool for content driven sites that don’t benefit from SPA-level interactivity (which is probably most sites using SPA frameworks)
- satvikpendem 3y agoHow are Next and Remix less focused on SSR, I thought that was one of their main selling points? As well as static site generation. For example I use Next for a blog site that is SSG, works fine. The islands architecture is interesting but in practice I doubt I'd swap between multiple component libraries.
- CharlieDigital 3y agoAstro SSG and Next SSG have vastly different outputs. Astro's image component output is a prime example compared to Next with Astro being much, much cleaner. Astro's output in general is much cleaner, more streamlined, and less JavaScript heavy. With the island architecture, it's not that you would switch between different architectures, but that you can choose which component framework you want to use on top of the same templating framework. Of course, you can mix and match, but that's not really the point.
- t8sr 3y agoWhy is another web framework notable? I’m unhappy to see HN become a place where people just promote their projects, but it’s good if those projects are technical and novel. Another web framework isn’t, especially when the homepage clearly aims at the purchasing department, offers no technical details and the framework itself is built by people who don’t know how CPU cache works, but still like talking about “performance”. In two weeks nobody will remember this exists and everyone will fawn over the next web framework. When that happens, can we please not have it on the front page again?
- 0dayz 3y agoIt needs to be stressed ASTRO is firstly an SSG (Static Site Generator) and MPA (Multi Page Application) instead of an SPA (Single Page Application) focused. With that said, from my experience with ASTRO is very similar to say vue or svelte in how you structure the code and template which I've come to like a lot more than jsx. The biggest negative are more that if you do use other front-end library, you end up with two layers of where bugs can appear (astro + front end). Also getting custom library express reliant stuff was a non starter for me at least.
- Alifatisk 3y agoI hate the fact that I cannot link to specific sections in the page.
- nmcfarl 3y agoScroll to text fragments are your friend (though they are not in Firefox yet): https://astro.build/#:~:text=Learn%20more%20in%20our%20docs https://astro.build/#:~:text=Learn%20more%20in%20our%20docs Docs: https://developer.mozilla.org/en-US/docs/Web/Text_fragments https://developer.mozilla.org/en-US/docs/Web/Text_fragments
- Alifatisk 3y agoDamn it, I am using FF. But had no idea about this feature, I hope it gets implemented soon! I wanted to refer to the "Full speed" section and ask why Nuxt has such a low score? I hope this works anyway. https://astro.build/#:~:text=Full%20speed https://astro.build/#:~:text=Full%20speed
- nmcfarl 3y agoThe feature is pretty awesome - I just learned about it myself last week. And the link totally works! (I have no clue on Nuxt though.)
- reactordev 3y ago“All-in-one” frontend framework designed for load speed. This is the hype train forgetting where the data comes from. I’m pretty sick of it actually. This isn’t all in one, unless you’re thinking about all your frontend dependencies being able to be built together. It completely neglects these aspects of web dev: - Security (the biggest one) - Data exposure APIs (how do you expose and query your data? If you say flat files, I’m ashamed). - Real-time is completely missing. - still relies on other frontend frameworks like Svelte or React. So, what, exactly is Astro other than YACC like Vite? And why do frontend devs insist they have an “all-in-one” framework when they clearly don’t?
- microflash 3y ago> still relies on other frontend frameworks like Svelte or React. It doesn't have to. You can use it without any frontend framework. > So, what, exactly is Astro other than YACC like Vite? Selling point of Astro is the partial / conditional hydration; they call it Island Architecture. This is not unique to Astro, though[1]. It also does some neat stuff with frontmatter [2]. The biggest turn-off for me though is that telemetry is ON by default and you need to manually switch it off. [1]: https://github.com/11ty/is-land https://github.com/11ty/is-land and https://github.com/ElMassimo/iles https://github.com/ElMassimo/iles also offer Islands. [2]: https://docs.astro.build/en/guides/content-collections/ https://docs.astro.build/en/guides/content-collections/
- gabereiser 3y ago> It doesn't have to. You can use it without any frontend framework. Thus defeating it's claims to be an all-in-one framework. It should instead say "non-opinionated" framework. Also, the frontmatter, this is exactly the kind of stuff that should be data driven, the kind of stuff an "all-in-one" framework would fetch from a data source, be it an API or a REST integration with a backend. This post on the deno blog explains it pretty well [1]. To me, someone who has been through the web 1.0, web 2.0, from notepad to IntelliJ/VSCode, an "all-in-one" framework handles: - Security (authentication/authorization/using-standards) - Content (bundler, rollup, however you need to figure it out. web fonts, icons, images, video, sass, less, css, jsx, js, tsx, ts, coffeescript... (sorry @jashkenas)) - API's (I need to provide data to my app beyond what you hardcode in a json, and don't make me fetch across origins). - Data (I need to model my data somehow, and map that to my storage, or dependent apis) - Real-time communications (I want to communicate between processes, between workers, between client and server, and between servers, beyond the long-poll). - Simplicity (all of the above should be done in a way that makes it simple and easy to build web applications). [1]: https://deno.com/blog/the-future-and-past-is-server-side-rendering https://deno.com/blog/the-future-and-past-is-server-side-ren...
- stevage 3y agoAs a full time front end developer, reading the front page I still had basically no idea what it is or does.
- NullPrefix 3y agodesigned for speed but showcase page is jankier than an electron app
- archibaldJ 3y agoAre you using Firefox? Or mobile devices? I'm trying to debug this issue too. https://github.com/withastro/astro/issues/8055 https://github.com/withastro/astro/issues/8055
- NullPrefix 3y agoyes, firefox
- Medicineguy 3y agoThe Firefox Mobile (Android) page is really slow which is ironic as they advertise speed prominently. iOS Safari and Android Chrome work great though...
- deleted 3y ago[deleted]
- jakelazaroff 3y agoLots of comments confused about what Astro does, and apparently their homepage is not the best testament to its performance, so let me explain. (No affiliation, but I’ve used Astro and I really like it.) Astro is a JavaScript framework for building content-heavy websites, like blogs and e-commerce stores. It can be used as a static site generator or rendering pages dynamically on the server, or a mix of both. You can use it with any JS framework — React, Svelte, etc — or none at all. By default, there is no client-side JS.
- cuu508 3y agoThanks. There are many static site generators around. Is there something that makes Astro special or different? What is its unique selling point?
- threatofrain 3y agoAstro also does SSR. I'd say that Astro is special in the ecosystem because (1) they went all-in on MPA and (2) they support many component frameworks.
- mplewis 3y agoAstro is really good at rendering JS on the server out of the box, while letting you quickly fall back to dynamic content as needed.
- steveklabnik 3y agoI chose Astro for my personal website because these things all aligned with my thinking in this space and desires for a tool: https://docs.astro.build/en/concepts/why-astro/ https://docs.astro.build/en/concepts/why-astro/
- _puk 3y agoA big thing is support for island architecture [0]. Essentially it only pulls in the JavaScript it needs to make an element interactive; you can mix frameworks on the same page, and it's very fast. https://docs.astro.build/en/concepts/islands/ https://docs.astro.build/en/concepts/islands/
- go_discover 3y agoI don't see why I would use this over remix
- tamimio 3y agoI don’t know why some people are hating in the comments, I’m assuming most are React devs and this is similar of C++ devs hating on Rust as they would like to be in business and not feeling left behind after all years spent learning the old tool (React/C++ in this situation)? I’ve used Astro years ago, Astro+Solid is one of the best combo for building fast sites, I would choose that (or Sveltekit) over the trashy React any day if I would have to choose, or better, no javascript at all.
- c-hendricks 3y ago> I don’t know why some people are hating in the comments HN gonna HN. > I’m assuming most are React devs ... hating > ... > I would choose that ... over the trashy React The irony is palpable!
- tamimio 3y ago>The irony is palpable! If I got a penny for every time someone points out an “irony” when it isn’t. Hating on a new tool right off the bat without going on an extensive testing because you feel “threatened” that your knowledge in the old tool won’t be needed anymore, isn’t like when you (or in this case myself) dislike the old tool because of how cumbersome it is after actually using it for a while, and you try to avoid using it as much as possible. The only reason React is still around is because it’s popular and mostly are looking for jobs, but it’s definitely not the best nor the fastest out there.
- c-hendricks 3y agoI agree about React, I use it at my day job and the ecosystem is huge, but Solid is winning my heart these days. I just don't agree that it's React devs being curmudgeons, I think that's just HN being HN. So to me, your feelings are ironic, maybe in an Alanis Morissette type of way.
- kunley 3y agoTheir page is unclear and slow as hell, while they claim they're clean and superfadt. So, bullshit detector ernt over the scale for a lot of people.
- sureglymop 3y agoPrefer svelte/kit. Simple and quick and just generates quite simple websites you might have written by hand about 10 years ago. And Rich Harris seems to be a decent guy.
- l5870uoo9y 3y agoA Nextjs competitor sponsored by Nextjs and with its features being integrated into Nextjs.
- deleted 3y ago[deleted]
- intended 3y agohoo boy. Astro, I wish I didn't have to know you, but I am even gladder that I don't know the rest of the SSG tools out there. I needed a project to really kick the wheels of Gen AI as a tool for executing projects. I compounded this choice, by asking a more experienced dev what tools he would learn if he got into web dev today. He suggested Astro and vercel. Chat GPT ended up helping far less than promised. Also if you want to build a ship in a desert, its not going to ask why, its going to tell you how. Apparently doing design, code, content and art from scratch isnt the optimal way to go. Who knew? I suspect its significantly easier to pick up if you are working on web dev every day. The point of jumping through additional hoops didn't make sense until it finally clicked. Once you wrap your head around it, your components start to just work. Ideally like lego. Does make maintenance and management easier. Either that, Or I am simply sufferring from stockholm syndrome. I don't know. I did wish there were more templates to learn from.
- uxcolumbo 3y agoAnybody else experiencing really bad scrolling performance? I'm using Firefox. In Chrome it's a bit better, but still not smooth. I wonder what causes the lag - the page doesn't look complicated.
- Saris 3y agoYup, very poor fps on Firefox Android, it's odd I don't think I've come across an issue like this before.
- amelius 3y agoDesigned for speed, not latency.
- deleted 3y ago[deleted]
- archibaldJ 3y agoI'm experiencing the same thing in Firefox too. Anyone knows why? I was thinking about giving Astro a try but this looks like a deal breaker
- archibaldJ 3y agoI just submitted a Github ticket; hope it is an easily solvable problem. https://github.com/withastro/astro/issues/8055 https://github.com/withastro/astro/issues/8055
- suby 3y agoYeah FF on Android has choppy scrolling for me.
- russellbeattie 3y agoIt took a day to write my own Node.js static blog generator in a single script. The over architecture of Astro and other similar projects is absolutely epic. First, read a bunch of static text files. Throw them all into RAM. This is amazingly fast. If you include meta data in the files, you don't need a database or JSON index. I use my own HTML document editor so I start with that and use JSDOM to parse and add in stuff like scripts or tags, but if you're an MD fanboy, that would be just as simple. I then use an EJS template to update the index pages and an RSS library to crank out a feed and an exec call to sync to my S3 server with a command to cloudfront to invalidate the cache. Its not even slightly optimized, and yet I would have to have hundreds of pages for this to take longer than 30 seconds. If you have enough JS knowledge to use Astro, then you've got enough to write this sort of script.
- sebastianconcpt 3y agoHow does it compare when you SvelteKit versus Svelte on Astro?
- fyzix 3y agoSveltekit has ISR, form actions and e2e type safety. Not sure how astro handles middleware and cookies on the server side but SK's hook system is very powerful and intuitive.
- todotask 3y agoIn the upcoming Astro 3.0, it will have ISR on middleware that’s also available for a few adapters for easier deployment.
- n6h6 3y ago> designed for speed > website lags