ks.priv.no

First thoughts on Gatsby

January 03, 2020

These days I am reading up about Gatsby. I wanted to note down some of my thoughs about it, before approaching more technical aspects. I think Gatsby is a great website platform, and I will explain why.

My first point will concern learnability. Gatsby is written in Node JS and React JS, both very relevant technologies in web development, and rewarding to learn on their own. When someone starts learning web development, they don’t know HTML, CSS, Javascript, or any other language. They will have to learn what is a client and a server, what is SSL, what is version control software. The wall is steep. When someone starts learning web development, I believe every new technology they learn has to count, be relevant and rewarding to learn.

I also believe in static web platforms. I will explore the reasons aftewards, but the point is that there are many other static web platforms, such as Hugo. Hugo is written in Go. While Go is a perfectly great language, how useful is it for someone who is just starting out? I would say not so much - you still have to learn Javascript. But by just learning Javascript, you would also get a head start with Node and React JS, which are other cornerstone technologies and used by Gatsby. Gatsby in general is very concious about approachability - it allows a beginner to be productive by editing Markdown files, while more advanced users can create their own React components, and power users can benefit from creating their own plugins and themes.

I expressed that a widely used web platform will have to be static. The primary reason here is motivation of web development, and internet security. Usually the goal is to deliver a project in as little time as possible, and then forget about it. That’s exactly why I always refused to create WordPress sites. It’s a giant liability to make a dynamic website, especially without knowing the extensions it’s composed of, and then forgetting it. Such sites are soon hacked into, defacetated and it will probably become part of some criminal botnet. A dynamic page needs to receive maintenance and security upgrades. It is simpler with static pages, as infrastructure is typically maintained by hosting companies, and there isn’t much that the content creator has to worry about.

There is another reason why I think static websites are great, and that has to do with reusability. If you want to push out a product as soon as possible, you will want to invent as little as possible. Unfortunately, in dynamic languages, reusability is done at runtime, causing a performance overhead on the client machine. While it’s usually neglible, in static pages most of this overhead is shifted to build time, resulting in faster end user experience.

There are the main reasons why I think Gatsby is a great fit for tomorrow’s web development. While the content creator still has to learn many languages, each language or technology related to Gatsby is relevant and rewarding on it’s own. I also don’t think the learning curve will or should be zero; just like if you are writing a book, you should know your spelling and grammar. A content creator for the web should know what is a non-breaking space, how to write alternative text for the images, semantic structures, and so on, so the end content would be usable on print, mobile and desktop for diverse range of end users.


Kristjan Siimson

Written by Kristjan Siimson who lives and works in Trondheim.