Mads Cordes
5 supporters
TaaDb - Part 1: What The H..?

TaaDb - Part 1: What The H..?

Apr 29, 2020

A Foreword

First of all. I will mention that this, is the first part of an Nth long blog-series, is a free one. I will try to remember keeping everybody updated of what is happening along with the posts.

Once I feel like the series is finished, or ready for a publishing lengthy book, I will release a such copy.

This means, if one will want this PoC as soon as it arrives, you'll have to read it online, here on BMC. If not, and you have the time to wait, please, by all means, get it once it arrives in book-form! It is both easier and more portable. Alas, you have to play the waiting game for a while.

An Idea

If you, like me, love to manage your tasks via a project management tool, you will love Trello. Even more so, what if we could update our website directly from Trello? Sounds "crazy!", right? Well, it is not. Throughout this series we will be learning different ways, or rather, a setup of how we can manage our website through Trello. We will be using the Trello API to update, and manage, a simple site in the first few posts. Later on we will be able to create a full-blown CMS of cards, lists and boards on Trello.

I hope to see you at the bottom of this post, where I will provide a link for the next post, if it is available.

Who I am

For starters, my name is Cordes. Mads Cordes. Actually I have a middle name too, but let us stick with first- and surname. If you really want, I'm actually known, out in the real world, as Avl. Avl has been hanging along with me, for the longest time. Since seventh grade actually.

There are nine* grades in the Danish elementary school

* - There are actually ten grades, but not all schools are having them, so they are optional for most pupils.

Anyway, coincidentally I've been doing the art of websites since back then.

Defining this

This is not a full blown book, containing all code in the pages. I will be adding code, a lot of it, but we won't be able to perform the CTRL-(C|V). Alas, BuyMeACoffee does not, as of writing this, support code snippets directly in posts.

The series will, however, have code, these will simply be snippets on images. This has to do with the fact, that I really want beautiful colours in here also.

I will, most likely, make a book out of this in the future, however this has already been discussed earlier.

What a PoC is

A Proof of Concept is the non-abbreviated version of PoC. By these means, all in all, this series is about a concept, and not a meaningful one, as it simply demonstrates the usage of something, that is - definitely - not ready for production. Though, it is always fun to experiment around out of the comfort zone of oneself - or even others!

I were talking with a friend, Igor Stumberger, about how we should keep the data of, what should be, a static site generator.

What this is

In these next few posts, we'll be using. Drum-roll please! ... Trello as a Database. TaaDb! This we will do by sending requests towards the Trello API back-end. Along with the neat side-effect that is, we have a completely free, awesome and beautiful CMS running! A sight for sore eyes. Even your non-computer tech-y clients will be able to use it, and you will even be able to help them out, remotely. Magnificent, I must say!

The draw-back

As I see it, we have a few draw-backs about TaaDb. For one, we won't own the content of the cards on Trello's site. Another, even worse one, is the response time. It takes quite a while for the all things to load, as we have to ask Trello for every single thing. Thus, later in this series, I'll take cache-management into account!

Let's Go

As any great programming series, we will be using a language. The Go-language will be used for our API and Scheme for the Trello-API.

We will be creating a - very - basic website, the simple early 00's portfolio, PHP sites. Nowadays, most sites are very cool, beautiful, responsive and interactive. We will be creating a rather old grand-parent for these new young sites out there on the internet.

So, what on earth are we waiting for? Let's get Go-ing!

The investigation

For this to get more knowledgeable, we will get started investigating Trello's API-pages, which can be found here:

As we can easily dig out, is the fact that we can interact with the Boards, Lists and Cards, these are exactly what we need for this simple project!

You might be wondering, what are the Boards-API got to do with us, for this kind of project?

Well, it is quite logical, actually.

Structuring for fun

For this to get exciting, we will write some code. Programming. The Art of Keyboarding. First things first, let us navigate to a directory, where we will be storing our code. Once we have found the perfect spot, my is in ~/Work.

Make a new directory called what you think suits the project you will be making. Navigate into it. Mine is called TaaDb. Here I will run this bash-script. This of course requires the Go-language to be installed, and query-able by the machine. In case it will matter later on, I am on an Ubuntu (Linux) machine. Version 18.04.

This should also create another file within the TaaDb-dir. Now for a couple more files.

To Be Continued ...

P.S. Follow along in the next post, and find how we are going to get the data. And even further to show the data in, a negatively toned, beautiful manner.

The following posts are released:

Enjoy this post?

Buy Mads Cordes a mocha

More from Mads Cordes