Post Mortem: Failing to create SlothCMS

Rocket targetting a star crash landed on the moon

A year ago when I started with SlothCMS I had some plans. I failed all of them. In this post I’d like to talk where and why I did failed.

At the beginning was my dismay from Gutenberg which was caused partly by not being ready to accept new stuff so quickly and partly by wanting to challenge myself. When I say challenge it’s an understatement.

I started doing everything at once, internals that would power the back-end, user interface and SPA and template engine. So no easy feat for a small army of developers, even huger feat for one woman army, if executed successfully. Or an honorable defeat for one person working on and abandoning such project.

Looking back I do feel proud about the progress because I had only evenings/mornings and weekends while working full time most of the time, during that time my mental health deteriorated but I was still able to rewrite most of it and move significantly more forward compared to where I was before the rewrite.

Template languages

Another reason for my failure was lack of motivation to implement the language that I started with. Don’t take me wrong, implementing a programming language1 compiler was always on my bucket list. What went wrong were my influences. When I started I knew FreeMarker, JavaServer Pages and Twig, so naturally my choice to model my template language was based on them.

Later when I went more deeply into Java and SpringBoot2, I came across template language called ThymeLeaf. The main difference between previously mentioned languages and ThymeLeaf is how the language itself is structured. In the former group there’s a syntax comparable to other programming languages intertwined with HTML markup. ThymeLeaf is different because it utilizes XML and controls the structure of the template through tags and attributes, very similarly to Angular’s and Vue’s DSL3 to allow faster prototyping without the need to render the template on the server.

So after discovering ThymeLeaf I knew that I would be rewriting the template engine soon after finishing first template engine. After that I tried to push forward regardless but my motivation went south because it felt, in a way, meaningless.

Note: I came to a point where I had to rework how variables are handled and couldn’t move forward anymore.

On the other hand I learned a lot and made notes along the way. Also as a result of this work I am preparing a talk about compilers. So not everything is in vain.

What’s next?

There are several ways to where to go from here. One way forward is to remain on WordPress and explore if Gutenberg can meet my requirements. One thing which makes me worried about it is interference either from WordPress itself or from installed plugins. I’d have to check if my custom pages still work as expected after every update.

Second option at hand is to use one of popular static site generators. One issue that I see is the delivery to the server. There’s always the possibility to use Netlify but they don’t have good pricing model with which I’d be comfortable and would suit my needs.

Third option would be to rework SlothCMS again. This time I’d be working more systematically and wouldn’t bite more than I can chew at one time. Meaning that custom template engine would be in the plan but only as a replacement for Twigs. SPA might be in the future but only after non-SPA interface is usable and so on.

  1. Discussion about semantics what is and what is not programming language don’t belong on my web site. Variables, operations and control statements are enough for me to be classified as a programming language.
  2. Not really my choice but my day job needed it
  3. Domain Specific Language