Saturday, October 12, 2013

Making progress

I’m aware I didn’t publish a post in more than a month, but during the time I was (and still em) cracking on the final cut of QetriX for PHP.

So far I have the object and database model, I have HTML template for all major components: page, table, navigation, time sheet, form with controls etc.

I also determined file uploads and messaging/notifications thru the system. Still need to implement user accounts though, that involves user groups, roles and privileges as well. There’s no general configuration at the moment, but it’s also designed.

I tried to recycle some code from the previous version, but It was mostly useless, which made me to realize, how different these versions actually are, even if I’m doing pretty much the same.

It takes quite a lot of time, because I’m developing many different things at once – to make it as similar as possible across different platforms and languages it’s not only PHP and HTML, but also C# with WPF and Java with GWT and Spring. I heard many great stuff about Node.js, so I’m going to include it to the process as well.

Everything I figure out I immediately publish on Wiki.

Tuesday, October 1, 2013

History of QetriX

I wrote about [2013/02#prehistory-of-qetrix prehistory] of QetriX, now I'd like to write about it's history.

The first foray was a wiki encyclopedia QeXpedia (enc.qex.cz, 09/2006 – 07/2007). I planned to extend the article-based core by so-called “extended database schema”, but it ended up just as an idea.

But based on this idea I created Kilopedia (02/2007 – 03/2008). The name was derived from limiting size of an article to 1024 characters (1 kB), because it was focused on mobile applications. This limit was introduced just because the whole project was supposed to be primarily around the extended database schema with articles just as an addition.

This was as a result of my dissatisfaction with Wikipedia, where you have to create a semi-complex page and elaborate, even if you just want to put the thing in. Moreover, it must be done like this for every single language, whilst semantic data would be sufficient for the time being. WikiData existed, but wasn't a thing yet at that time.

And there were several numbers, that editors had to recount for different units by hand, which resulted in wrong values:


This time I did create the extended database schema. For every category I had a table in the database and created a schema-aware editor, that generated and processed edit forms accordingly. It worked pretty well, but still didn't felt right.

Nevertheless, it fitted nicely together with my diploma thesis “Server Orientated Data Processing in Mobile Applications” (2006-2008), for which I also created a multiplatform (mobile+desktop) client application and XML structure definitions for form and data.

In the late 2009 I started experimenting with a single-table schema. The idea wasn't new, it first emerged in 2003 for Multiportal QeX (2001-2006) in it's third iteration as an effort to be able to create any kind of content (picture, table, poll etc-) among discussion board posts. Original author of this idea was the co-author of QeX, Paul.

At first I tried module-attribute (EAV) model, later I added a third table for relations. But every one of them required a dedicated enum for types and together with tables for users and system stuff it bloated too much for my taste. So I started reducing them.

I figured out those three tables (modules, attributes, relations) overlapped quite a bit, so on November 18-19, 2009 I tried to reduce them to a single table. From 18 tables I went down to just 6.

A column for value in “data” table was obvious, but I didn't want to use it for foreign keys of relations as well. So I added an extra numeric column, which looked promising. In fact, that was the major decision for the QetriX Data Particle. Later I added an extra decimal column for combined order and significance (e.g. 3.14 would mean significance = 3 and order = 14).


I developed QPDB (QetriX Particle DataBase) side by side with my CMS Dynamic (2009-2011), a successor of XMS (2005-2010). First release of QPDB was at the end of February 2010. Initially QPDB was supposed to be a module of Dynamic, but the delight from totally sufficient two-table design prevailed, so I wrote-off Dynamic instead and it's good parts ported to QPDB.

Eventually I named this new system “Q3S”, an essential server-side part of the whole QetriX at that time. In about six months, after some performance tests, I decided to split the combined decimal column into two numeric ones and few years later I merged them to a single numeric column.