Concepts

Home Overview Concepts

The following text describes the concepts behind MoStacks in a very general way by using a familiar "real world" example of managing data with the help of index cards:

Imagine that you get the task to manage a library with hundreds of books, let's say in the 18th century, before computers are available. How will you keep track of all the books, and how will you make them accessible to visitors of the library?

One good way to do it is write little index cards, where you write info about each book like title, author and year of publication on a separate card, including the physical location of the book within your libary.

Certainly it is a good idea to standardize those cards and always write down the same things on each card, in the same order, e.g. book title always first. For doing so, it helps to design a "background" for the cards that includes lines starting with labels like Title:, Author: and so on, like a little form. Then you somehow prepare a number of cards with this background already printed on them, ready to be filled up whenever a new book arrives.

Finally you arrange all the cards in a way that allows visitors to quickly find the card for the book they want: Probably you will sort them according to some principle and put them into stacks - however not free-standing vertical ones, because that would be unpractical, but "horizontal" ones that you can put neatly into drawers.

MoStacks is based on this concept: A MoStack is a collection of individual cards arranged into a stack. The cards have an order, i.e. one of the cards is the first one, followed by the second one, and so on, up to the last card. MoStacks are stored as files, with each MoStack going into a separate file.

Now, let's say the library expands and starts to include magazines and newspapers beside the books. You find that there are other things to know about magazines and newspapers than about books, so you design two new types of cards, with two new backgrounds.

MoStacks also works with backgrounds. A stack holds the definition for one or several backgrounds, and each card has exactly one background assigned that defines what goes onto the card: The card is said to be "a card of that background". The background of a card is specified when it is created, and cannot change afterwards.

A background is specified by defining fields. In the library example, in the background of a book card, there would a first field for the book title, followed by the author field and the field holding the date of publication, and so on.

In MoStacks, fields have types like text, number, or date, plus various additional information like length to display and maximum length (i.e. number of characters) that is allowed for the content for the field, regardless of visible length. The fields of a background are ordered.

Of course stacks and cards implemented by a computer program offer possibilities that stacks out of physical cards cannot. Although the fields of a background have an order, you can change that order, and all existing cards of that background will instantly and "magically" re-arrange to reflect the new background definition.

You can add fields to a background, and all existing cards of that background will immediately reflect the new field by adding it as a new "slot" for information. If you delete a field, you will loose the information that all the cards store in that particular field, but you are allowed to do so.

Beside fields, MoStacks backgrounds can also hold controls in the form of buttons, e.g. Next Card and Previous Card buttons that allow easy navigation through the stack.

To summarize, a MoStack has the following 4 levels of hierarchy: