< Return to Blog

This Rails blog gets a complete overhaul

Monoliths are back in vogue.

It all started on 29th October 2011 when I created my first "TODO" app equivalent of the ubiquitous "Hello World" that many of us programmers are familiar with.
Its domain modal was a simple case of User and Post.  That's it.  And Rails 3.1.1.  Back then I wanted a workflow that was primarily markdown driven and Zurb Foundation was my go to frontend of choice, mainly for its grid system etc.  Twitter bootstrap was well, starting to become rather common and I wanted to go with something different.
Much of its later years were spent on integrating a 'Newsletter' style module integrating Mailchimp and OmniAuth for user login.  My User's table started to acquire a few users along the way, although I've purged all of that along with this new reboot.

...and we thought microservices were a good thing, right?

Those were the days when "microservices" were the words you'd throw at VCs, just because it made you sound smart.  Today it's "Machine Learning" and "AI".
Around this time, I created a site with this same domain to serve as my online resume - it was a Rails code-base but one that I had taken apart literally into pieces and even completely removed ActiveRecord.  All it became was a HTML front end that would process resume details held in a YAML file.
I also bootstrapped it with Docker and docker-compose (which takes a docker-compose.yml) and that site has been running for years on EC2 with little to no maintenance.  At one point, I hadn't even updated it in over 3-years.

2020 happend.

As a species we zoomed past the year 2020, and as a (Ruby) community, or I suppose even as a developer community, we've all come to realise the overhead and cost of maintaining microservices are incredibly dire.
Towards Q4 of 2019 I joined E-Accent BV, where the tulips grow fair and wide, and this journey has been fantastic as it gave me the opportunity to further hone my CloudOps/DevOps voodoo and take it to the next level.
During this time, I worked on:
  • Creating a NPM library to decouple Froala Editor, then EditorJS, and finally TinyMCE.
  • The first attempt was made with Froala, as that had been the preferred editor at the time, based on previous work that spanned many years. This had many pain points as Froala provides its plugins as minified-JS and to extend any existing plugins this requires reading lots of minified-code and writing JS in a minified fashion.  It's terribly brittle and it was not a fun time at all.
  • During further standups and discussions we were also working on some reference text, which needs to be pulled in via XHR requests and embedded into the editor.  We were looking to separate styling (presentational) concerns from the actual text and there was work done looking into XML/XSLT.  This discussion tied in with my looking at EditorJS (https://editorjs.io/) since it is a very clean editor that did not demonstrate bugs that many WYIWYG editors have.
  • EditorJS was a sight for sore-eyes, quite literally! I had a lot of fun writing custom plugins and the NPM package this time around was far more Vanilla JS driven allowing me to ditch a lot of reliance on jQuery.
  • However, unfortunately, EditorJS was quite minimal in one particular area - handling paste content from the most evil bit of software around - Microsoft Word.  Further investigations led me to TinyMCE and we found this had an incredibly rich plugin eco-system and handled content from Word like a champ.
  • Creating separate NPM packages for EditorJS and TinyMCE were a great learning exercise, and I feel it did a far better job of it in the final round with TinyMCE as it allowed me to incorporate things I'd learned during the first two rounds.
One particular approach taken by TinyMCE that takes a bit of getting used to is that within their plugins and editor instance, it isn't always straight forward to access and mutate the DOM itself.  You have to work with various methods that allow you to alter CSS styling. Starting out, I generally found this to slowdown the dev experience in general.
The older views in my blog used Ace editor and I've finally switched over to EditorJS (for the time being), and at a later date, I may end up shifted over to TinyMCE. For the time being though, I appreciate the minimalistic approach to EditorJS. Having a small code-footprint means there is a much less code and docs that need to be read up.

Many abstractions later...

You will find the resume portion of my details now listed on the about page, accessible via the menu.
I will add more details on this setup which ties into my compute infrastructure running on my homelab.