Published
- 4 min read
The Power of Astro for Business Websites
First, a few words…
This site (https://tolampogiali.com/) was my very first website. I made it all the way back in my early High School years. Since then, it has generated surprising results and has been an important part of the business. Small, a bit plain, but looking back at those 8 years it’s operating, it excelled at its one very specific job.
An Overhaul was due
As I said, I made the site when i was in High School, and not much changed since then - in the site that is - because during that time the technologies that used to power the web shifted. I am really grateful that I did this overhaul now, because the stack that I ended up using is surprisingly performant and built for the modern development workflows.
The Predecesors
Over the years, I looked at solutions over the time. My main focus was strictly serving static files, since the things listed in the site are not in the thousands, it would simply be waistful. Although, I really do think this current stack can scale greatly and - up to a point - the limit is how careful you are with optimizing your build process, really. I even tried making my own small SSR engine at some point(wayyy too ambitious, i know). I remember at some point in an optional class I had, there was this big focus on building a website for a fictional business using wordpress. I always disliked the idea of not optimizing my raw html down to every line of code. I tried it for the first time after returning home by spinning up a docker container to check it out. I noticed that the default “welcome” web page needed a sec to fully load. I opened chrome’s web tools, saw the network delay loaded from my local PC, and that was it, i was out. My website loads in a fraction of that time loaded externally, over mobile data.
Wordpress was appealing for its compatibility and enormous community, but was old, slow, i didn’t like the UI(after all, that is the whole point, instead of code you have to deal with a management UI) and it felt unnecessarily heavy. Frameworks where popping up and were getting abandoned constantly, thus I was hesitant to adopt them. And I’m glad I waited.
The Immergence of Astro
Astro was one of those new ambitious new technologies. What it promised was radically changing the way we develop websites. It was somewhat different from all the other attempts, but, like all the others, Astro was perfect. Way too perfect. So a few years passed and the most important feauture that set Astro apart became apparent, and that was tha it stuck around. Even big businesses started adopting it, removing most fears of abandonment. Astro is here to stay.
What Makes Astro Shine
My original site was written in pure html, css etc. That really allowed me to learn how the web worked and I picked up some tricks during the process. Being used to it and seeing great results from having that level of access, i didn’t want to settle for a managed platform. Instead, I went even deeper, renting a VPS and building the whole stack there, piecing every little bit of software there. Part of that stack is Gitea, which, with its own local gitea runner is like a free and much more powerful GitHub actions.
Astro brings the power of writing raw html and adding logic on it using modern and performant solutions, and the code returned to the user is pure, fast and static. You do the building once, then serve many with blazing fast speeds.
No JS In sight
Another great benefit of Astro is that for the most part, you don’t have to serve the user any js, since the site is generated on your server. Run it once, serve many. Truth be told, although I tried really hard to not include any js in the final build by using all the recent css tricks etc, I ended up adding a little vibration and using it for an animation, but the point is, it’s minimal and nothing is unusable if JavaScript doesn’t run.
Final thoughts
This is my 2nd Astro project, and I have to say, it did not disapoint. I am planning to build so much more with it in the future, as it has the perfect balance of everything I was looking for. If you’d like to check out what I ended up after this process, check it out on https://tolampogiali.com/sakia/.