loading...

I ignored the internet and built a custom C.M.S.

raibtoffoletto profile image Raí B. Toffoletto Originally published at toffoletto.me on ・4 min read

If you ask anyone: "Should I build my own CMS?", they will answer "NO". And they are absolutely right! The answer should be always NO. However, I decided to ignore the wisdom of the internet (and my own good judgment) and started to write one for my personal website.

Internet Treason

Nowadays, the implementation of a CMS (Content Management System) is essential even for small projects, being them for the web or not. However, to write your own can prove to be a herculean task. It takes a lot of planning, effort and investment to develop a proper CMS. Initial development and deployment aside, a decent custom C.M.S. requires constant development in order to keep up with system compatibility, to add new features, implement third part APIs and apply security patches, thus, making the final cost not viable in the case of most projects.

Instead, there are plenty of alternatives out there (free and paid ones) to solve most of the 'usual' necessities: e-commerces, blogs, news agencies, etc... It is preferable to spend some time trying out and researching about an open source CMS, customizing it and exploring its plug-ins; the end result is better security and a stable environment. Also, it can reduce the initial adaptation time for new users and maintainers who have already worked with that software before or are familiar with it.

There are several articles online to enforce this conclusion (a quick DuckDuckGo search proves my point), like this one by Sean C. Davis where he tell us how after five years invested in the development and maintenance of his Sapwood project he ended up abandoning it. However, Davis's advice isn't only to avoid writing your own and go for the big open-sourced projects, he also acknowledges that in some cases a custom CMS may make sense, either because it's a very specialized or because it's simply a learning opportunity and fun for the developer.

My Case

When I started my personal website project, I decided that I wanted to develop a simple and lightweight markdown based website using Node.js and tools native to linux systems, like Git and SystemD. That lead me to create the Aedifico framework, my own blog/website engine written in JavaScript, a language not loved by everyone (with reason) but if HTML and CSS are the H and O of Internet's base elements, JS is the C that brings everything to life.

JavaScript

The engine itself isn't complicate: Node's Express and Markdown modules make it very easy to serve static pages and Git is the simplest tool you can find to add a version control system. I could very easily ssh into my server, write pages/posts using VIm and this very website wouldn't be any different from what it is. But as much as I love my terminal, I like nice and shiny graphical applications and the option to manage the content from my website from everywhere. So, Sprintplank was born, my own CMS! It's development took me (at least) six times longer than the website engine and it was like...

Internal dialog:
  • "If the CMS is accessible online, I need a Log-In system", so, lets spend a long time researching the best security practices.
  • "The CMS should integrate with Git", ok, I need to read NodeGit's lack of documentation.
  • "The CMS should preview the website and only publish when ready", then, lets create a git repo with two different branches.
  • "These services should've been native", hum... systemd it is!
  • "But how to set up all this mess?", Fine! Let's create an installer written in python.
  • "And how about an update system?" ... 😭 😭 😭

I'm not even counting the time it took for solving bugs created by any new idea I had for the project... the self-update one delayed this very post by four months!

Then, why bother?

Well, my project was specialized enough that the use of any other tool would mean to significantly modify it, besides, I've learned A LOT during the whole process, and that was the main point of rewriting my website (otherwise I'd have used any payed service that my only labor would be to insert the site's content, like squarespace, wix, wordpress, etc). And for sure solving all those puzzles was FUN!

Fun

Is Aedifico the most advanced web framework out there? Not by a long shot... but I'm proud of what it can do and how stable (knock on wood) it is now. This learning process helped me to improve my git workflow, software design, general problem solving and coding skills. The cost of what I've invested is neglectable in comparison with how much I've gained with it and how it fits in my portfolio.

As I stated in the beginning, to build your own CMS usually is not the answer, but you can learn and improve yourself a great deal by doing it.

Posted on by:

raibtoffoletto profile

Raí B. Toffoletto

@raibtoffoletto

Musician by training. Linux enthusiast. Aspiring Developer.

Discussion

markdown guide
 

Who told you that you shouldn't build your own CMS? 😄
Having built my own, I disagree with that statement.

If you're able to do something, why not do it? Worst case - you'll learn something.

 

I agree. I'm in the middle of building one right now too. Great decision.

 

When I started in web dev, I built my own framework that progressively became more sophisticated over time, but it wasn't a well thought out product. It worked well enough, but it was quickly over shadowed by the likes of WordPress and Drupal.

Unfortunately, after many years in service, one of my clients got hacked. I hadn't sanitized a file upload well enough, and the auth was too weak. I had already abandoned my custom framework by the time this happened.

With the big open source projects, you get the benefit of many eyes. Commercial projects (presumably) have security teams. I am curious, how do you plan to ensure your CMS remains secure, both from current and emerging threats?

 

Even WordPress gets hacked, so the big project card doesn't fly here.

It's simple, really:
A. Use (actually use it) it yourself. If you make something but never use it, there's a disconnect which contributes to the problem.
B. Give a fuck. Found an issue? Fix it. Someone else found an issue? Merge the code.
C. Make it public.

 

Making your own CMS maybe a reasonable thing not only for education or improving your skills.
"In what case?" - you might ask. For example, if you build a social network or some sort of a web-service, that can't be built with a template. If you need a tool that can slove you special tasks, so build that tool by your own!