Astro Is a Future for Webdev That I Can Get Behind
Damian Thomas
10/20/22
After rebuilding the portfolio site with Astro, I've got a renewed faith in the power of meta-frameworks.
I’m an avid follower of Jeff Delaney’s Fireship Youtube channel where he creates reports about and tutorials around topics in web development. It is on Jeff’s channel that the unbelievable speed that the web development world moves is made most clear - nearly every week a new video appears about this-or-that new shovel for the webdev gold rush.
The enormous number of tools in the web development ecosystem betray a reality that is often hidden by its proponents - the reason that there are so many shovel salesmen in the industry is because the browser is not quite the silver bullet platform that we’re often led to believe. Every framework out there has some kind of critical compromise that it makes in order to successfully balance performance, usability, and compatibility with the wide range of platforms that actually make up “the browser.” The tool most frameworks use to hit that balance is Javascript. Javascript, Javascript, Javascript.
Now, I don’t mean to hate on JS. It’s a language that has certainly risen to the enormous new challenges before it, but it’s undeniable that it was not originally intended to be the tool to tackle those challenges - there’s a reason it needs a thousand different frameworks and superset languages and IDE tools to actually be the all-purpose application development language its been forced to become. This process has gradually had Javascript absorb responsibility for literally everything in the webdev space, as it became easier to use it as an all-purpose solution rather than trying to haphasardly link it with other tools. This came at a considerable cost: sacrificing the simplicity that made HTML and CSS easy to work with in the first place.
The problem with HTML and CSS was never that it was too complicated, but that it was too difficult to modularize. It is undeniably faster to set up a single web page in raw HTML rather than creating a bunch of boilerplate React components, but that development speed comes with technical debt down the line once you start trying to reuse the visual components you create in your raw HTML. As a dedicated React developer, I thought that this was a reality I just had to live with for most applications - they would simply all have to be Javascript from the ground up.
Until Astro.
Astro has genuinely been one of the only new and hip webdev tools that has blown me away by actually making good on all the promises that it makes. It completely captures the simplicity of what it used to be like to build silly little websites when I was younger, but with the option to bring in pieces of interactivity on my own terms. Its seemingly magical ability to use literally any UI framework for an individual component and then switch right back to normal static HTML rendering with minimal performance overhead seemed unreal - until I checked the skyrocketed Lighthouse scores on this site. You should check them yourself.
The speed at which I’ve been able to get this portfolio refresh up and running has dwarfed any other front-end tech stack I’ve used - and the fact that the development speed doesn’t come at the cost of performance makes it even better. I’ve got a ton of projects where a specific framework is needed or I need to use a particular stack - but from now on, whenever I’ve got the option, I’m Astro all the way.