Astro is kinda nice
What is Astro
?
Astro is one of the new trendy frontend web framework in the recent years. Astro is advertised as a framework specialize in content-driven type of websites. So blogs, news and such are their target usecases. The performance is supposed to be very competitive. And the public opinions I gathered all giving Astro a lot of praises and hype.
Why did I choose Astro?
Believe it or not, I wasn’t planning on starting with Astro at first. There are so many options to start one’s own blog nowadays:
- You can simply use the blogging platforms like Medium or Squarespace to start a blog with no programming skill required.
- Or you can use a meaty CMS like Wordpress if you want a little bit more effort.
- Or with even more effort, you can go the Static Site Generator (SSG) route with a framework like Gatsby, Hugo,…
- And the last option is to built the blog fully from the ground up on your own.
To be honest, I’m not that type of person who love to spend time and effort on coding outside of work. Yes, I love this job. Yes, I truly love programming. But same as everything else, I have to do it at a reasonable pace. I have to code at work, then getting home just to code some more? I would burn out super fast if my life keep on being like that.
Naturally, I started out with an easier option. I went with Wordpress the CMS. It was quite simple to set it up and running. And unlike using an existing platform like Medium, it could still give me some real technical challenges when I wish to customize the site. So it was the best of both world: has a low floor so easier at start, and an actual ceiling with some height so I can play around with it.
But then it turned out that it’s more of a compromise than a best of both world. All the fun related aspects weren’t fun at all. I have no interest in PHP or anything related to it. It was much more of a hassle because of that.
So then I went seeking for an alternative. And I want something a little more technical than a CMS, I went for an SSG. And I picked Astro:
- It was quite a new framework. Who doesn’t love some shiny new toy? Not me!
- It uses Javascript, or TypeScript. And I thought working with JS or TS would be much more enjoyable than PHP.
- Although it can simply be used as an SSG framework, Astro is actually a whole frontend framework, in the same category with React, Vue,… Astro would sit in between using an SSG framework versus building the blog from scratch. I found that very interesting.
- It’s been receiving lots of praises from other people on the internet.
And after experiencing the framework all this time, here are my opinions on it.
The pros
It supported so many things out of the box, especially for blogging purpose. There is very little need for reinventing the wheel because of that. It has a great starting template. It supports Markdown by default. Tailwind, and many things else, is only a command away. It supports using other CMS as headless right off the bat too. The list continues.
The framework itself is simple enough. I’m not saying that the technology underline is simple.
Quite the opposite, their islands
concept is really interesting and a marvel of engineering.
What I mean is just that it’s super easy for someone to pick it up and make something out of it. Especially if we compare it to something like React (Next.js) or Angular.
The documents are very hand-holdingly and easy to understand. I didn’t run into any problem that the documents couldn’t answer. Even though I only use it for a simple blog, I’ve seen way worse documents out there for the same purpose.
If you also like React, you can actually use React together with Astro! I haven’t tries that for this blog. But the idea is very interesting.
The performance is supposed to be really great. This blog is just too simple as a measuring tool so I can’t tell for certain yet. And since I use it for SSG, I can only measure the build time anyway. But from what I’ve heard, Astro’s performance is nothing to scoff at.
The cons
The biggest downside is that it doesn’t seem to be quite extendable or customizable, especially comparing to something like React with Next.js. Although that’s exactly what the Astro team said: Astro is intended for content-driven websites. And they fully commit to that purpose. So, if you’re planning to make a super complex single-page app then you probably better look somewhere else.
Summary
Astro will never be another React. There is only so much you can do with Astro before you run into a wall. Having said that, I don’t think Astro is really that limited as it sounds. Yes, it’s no way in the same league with something like React. But it’s still be flexible enough for a lot of usecases out there. Furthermore, you can use other frameworks together with Astro anyway.
But does it really matter though? At the end of the day, I only use it to make a personal blog. And Astro is extremely great for this purpose. Not everything nowadays has to be another generic multi-purpose framework to replace React. I’m happily using Astro as long as it continues doing great at what it promised.