Blog

I (Am)bassador

Submitted by mimec on

A few weeks ago WebIssues became a member of the Qt Ambassador Program organized by Nokia in order to promote Qt development. I got a shiny new Nokia C7 phone and I must say that I like it, even though I was generally very skeptical about touch screen mobiles. Obviously Noka's goal in giving away those phone to Qt developers was to encourage them to create applications for Symbian. I don't know if they will be able to defend against growing domination of Android and iOS, but I've been using various Nokia phones for many years (starting with the iconic 8110 model known from Matrix) and I'm kind of attached to this brand. Besides I've been thinking about a mobile WebIssues client as an addition to desktop and web clients for a long time and now that I have the right tools, I will definitely return to this idea once version 1.0 is released.

Being an ambassador of Qt I feel that I should write about it more often, not only in form of articles, but also as a regular blog. The articles became quite outdated; I created a completely new XmlUi toolkit which is already available as part of both Saladin and the alpha version of the WebIssues Client. It replaces traditional menu bar and toolbar with a single ToolStrip control which is similar to the Ribbon known from MS Office, but much simpler. It also incorporates a simplified version of the WindowsModernStyle. Last week I also decided to replace the RDB classes with SQLite based storage which will make the desktop client much more scalable as it won't have to store the entire data cache in memory. The whole subject of integrating Qt with SQLite turned out to be quite complex, so I will write more about it soon.

Initial release of Saladin

Submitted by mimec on

Today I officially released the first version of Saladin. I've been preparing the new website, along with the release packages, for a few days, and now it's officially on-line. If you are using Windows Vista or newer and you are looking for a lightweight, user friendly file manager, go ahead and take a look. One of the principles of Saladin is that it is a simple front-end for the Windows Shell, so it relies completely on shell integration for icons, contextual menus, drag and drop and most file operations. Although such approach is sometimes tricky (due to the nature of the Windows API), it allowed me to complete a quite usable version (at least I've been successfully using it for a few months already) in more or less half a year while simultaneously working on WebIssues as my primary project.

I would like to especially thank my wife who's also been testing Saladin and providing useful feedback and ideas. There is certainly still a lot to do, at the very least I would like to create an integrated file viewer and search engine, but the most important thing is that I reached the first milestone with this project and I can go back to working on a new version of WebIssues.

Tags

Fifth anniversary

Submitted by mimec on

When this website was created five years ago, there was little more than a few articles and an early version of Fraqtive. It was simply a continuation of my personal site at the university web server which I created in my spare time while I was a student. It turned out to be just the beginning of an exciting adventure with open source development. The fact that I kept working on the same projects for such a long time was perhaps the biggest success.

Back then in 2005 I created the first prototype of WebIssues as my master's thesis and I wasn't even thinking about continuing it, not to mention publishing it. Now I'm making great progress in working on version 1.0 and the release I made just yesterday was another important milestone on this very long road. It may not be the most popular program in its class, but it has its loyal and satisfied users and that's the ultimate goal of every open source application.

At the same time I'm also progressing in completing the first version of Saladin, the dual pane file manager for Windows which I announced some time ago. Unlike my other projects, this is a very recent idea and also a new approach to development: I'm simply creating an application that I am using myself on a daily basis. As Windows 7 is quickly gaining popularity (last month I had almost exactly the same visitors using Windows 7 as those using all variants of Linux), this may turn out to be a good choice. Although my time estimates are often quite wrong, if everything goes well in January you can expect the first version, which will already be quite functional.

Simple template-based relational database

Submitted by mimec on
RDB

Introduction

RDB is a set of class templates implementing simple, generic and fast collections of objects called tables. Each table can store objects of any class with one or more integer attributes called keys. The table has a separate index for each key for fast retrieving and iterating items.

In addition, this package contains adapter classes for using RDB tables with the Qt Model/View architecture.

Depending on your needs, you can use just the 'core' components of RDB, or use them together with the model components. The core RDB components have no external dependencies. The model components require Qt 4.2 or newer.

Core RDB classes

An RDB table is an indexed collection of objects, similar to a hashed map, but with the possibility to have multiple indexes for different attributes in one table. It can be used to organize data in memory in a similar way to a relational database. Note that RDB provides no support for serializing data or for binding with an external database.

Many applications need to store complex data structures in memory. They often do so by using collections of objects, which in turn contain their own collections of objects, forming a tree structure of relations. The downside is that in order to find data stored on a deep level of the tree, you have to traverse through all parent branches, which may lead to inefficient and difficult to understand code.

The situation gets even worse if the data structure is not a tree, but contains cross-references, circular dependencies and many-to-many relations. This makes memory management difficult and error-prone, especially in a language such as C++ with no automatic garbage collection.

A relational database is a simple and well established model of storing data with complex relations. Databases are excellent for storing persistent data, but cannot be used for working with data which has to be stored in memory for performance reasons. Even if an application works with a database backend, it still usually maps retrieved data to collections of objects, which are subject to the problems described above.

The purpose of RDB is to combine the efficiency and ease of use of simple containers like lists and maps with the idea of a relational database which uses keys and indexes for modeling relations between data.

Adapters for the Qt Model/View architecture

The RDB package contains adapter classes for using tables with the Qt Model/View architecture in an easy and comfortable way. This is useful if your application needs to displays various lists and trees of data stored in RDB tables. The adapter model automatically populates the view, and also provides support for automatic sorting and filtering and makes customizing columns in the view easy.

The Model/View architecture in Qt is an excellent and powerful solution, but implementing a model from scratch is not very comfortable. One of the problems is that the indexes used to identify cells are based on the physical row and column number in the view, which has to be translated to the appropriate item of data. This can be difficult when rows can be sorted, columns can be reordered and especially if the view is a tree with multiple levels of items.

The RDB::TableItemModel class solves this problem by acting like an additional layer between QAbstractItemModel and simplified models called table models. Table models operate on item identifiers (which simply correspond to keys in the RDB tables) and column identifiers, without having to know the layout of rows and columns in the view. In addition, each table model is associated with a single level of items in the tree. This way you can, for example, create a list of all persons and a tree of persons grouped by company, and reuse the same table model in both these views.

Documentation

You can find the full documentation for this component at doc.mimec.org/articles/rdb/. It is also included in the source package.

History

1.2 (2010-10-08)

  • added the findRow utility function
  • fixed wrong sorting by non-unique column
  • fixed validation of input data

1.1 (2009-11-23)

  • added: method for finding a cell in the model
  • added: default argument values for TableItemModel methods
  • fixed: possible crashes when invalid model indexes are passed
  • fixed: prevent updating the view when columns don't change

1.0 (2008-06-09)

  • initial version

Downloads

This code can be freely used and modified in both open source applications (including GPL) and commercial applications.

Back from Madeira

Submitted by mimec on

There is another photo gallery in the Photos section, this time from the honeymoon trip to Madeira. Since the first question most people ask is "where is it?" - it's an island located on the Atlantic Ocean, about 500 km north from the Canary Islands and 700 km west from Morocco. It's not very big (57 km long and 22 km wide) and politically it's an autonomous region of Portugal, so it's one of the most exotic parts of the European Union.

You won't find anything interesting there if you're looking for night life, clubbing and rich all-inclusive offer. Especially if you stay on the northern side of the island, like we did. The hotel was literally wedged between a very steep mountain slope and the shore of the ocean; the nearest town had just one church and a few shops. But it's a great place if you are looking for a place away from civilization and enjoy the view of mountains, forests and the sea. It has a very gentle climate - not too hot or too cold - and a lot of sun. Within the last 10 years a new airport and modern roads were built, so the communication is also very good.

I returned from vacations two weeks ago (in the meantime briefly visiting Slovenia as a member of my company's management team) and it's been quite a busy time. Very soon you can expect a new stable release of the WebIssues Client with some bug fixes and new translations. I'm also in the planning stage of the third alpha release of WebIssues 1.0. Saladin, which I introduced in the last post, it also coming into shape and in fact I'm already using it as my personal file manager. But I would like the first public version to make a really good impression, so it's going to take a while before I release it.