Menu Chiudi
View Categories

Module Design

Since Data Crow 3 it is possible to create your own modules. I have had many requests to add additional modules like a coin and a wine module. Using the module creation wizard you can now easily create the modules you are missing from the standard Data Crow installation. Additionally you can change existing modules by adding new fields for example.

Using the module creation wizard you can quickly create a new module. This manual has been created to ensure you can create the module you need.

General Tips #

  • Always create a module in a clean installation of Data Crow. Just install a version of Data Crow to a different location than your production version. In this new and empty version you can experiment without having to worry about messing up your current installation. Data Crow asks for the user folder when it starts: choose a new folder for testing (you can also start Data Crow with the userdir parameter).
  • Make a backup before you change or delete modules.
  • You can share a module with someone else, or copy a module you have created in your test installation to the production version. Use [Modules > Export Module Wizard] to export your module and [Modules > Import Module Wizard] to import it into any other Data Crow installation.
  • Describe on a piece of paper the fields you will need. Also define whether you need lists of options a user can select from. You can create managed lists within your module: you can define a field called “genres” and manage its content (the genres) from within Data Crow.
  • A list is a module of its own. You can create it first, or let Data Crow create it for you while you define the field (see defining a field). Most lists are simple property modules for items such as categories and genres.
  • In the field settings step of the wizard you decide which fields make up the name of an item (Descriptive). This name is used to display your items in the views, the grouping pane and the reference fields.

Modules and the server #

When you are connected to a server, administrators can use the module wizards in the full client too: Create, Copy, Alter and Relate Module Wizard, and the Export and Import Module Wizard. The Delete Custom Module Wizard is only available when you use Data Crow stand-alone.

With Add & New you can define several modules before anything is sent to the server, and the next module can refer to them (for example a property module and the main module which uses it). With Send to Server all modules are created in one go: either all modules are created or none. The server checks the changes, makes a snapshot of the data first (it is kept in the backups of the server) and goes back to the previous situation when something goes wrong. A progress bar is shown meanwhile. The server cannot be used by others while it makes the change. The web client shows the changes right away. The full client needs to be restarted.

When you export a module, the server creates the module file and sends it to you. When you import a module, the file is sent to the server, which imports it; after that all users have to log in again.

Modules can be created in the web client as well, see Module Wizards (Web Client).

Module Types #

One of the first things you need to know is what every module type is and what it can be used for. There are three types of modules; property modules, media module and ‘other’ modules.

The type of module determines how the module can be accessed and which predefined fields a module has. Predefined fields (such as the ID) cannot be removed from the module (though they can be hidden using the normal field settings editor).

Property module type #

A property module is the simplest module type. Examples of property modules are the movie and music genres, the software category, the storage media and the platforms. Important to note is that a property module can’t have any reference fields and can’t have a picture field either.

A property module will never show up in the module bar. In fact it will not show up anywhere until used within another module. Its existence depends on other modules. This will be discussed later on in this document when we get to the field creation. When a property module has been used within another module you can manage its items via the [Maintain] menu. Note that this is the [Maintain] menu of the module using this property module.

Among other, system related fields, the following fields will always be present for property modules:

  • Name (name of the item)
  • Icon (icon to represent the item) 
  • Alternative Names (for synonyms of the same items)

Media Module Type #

This type of module is a fully functioning module. After its creation it will show up in the module bar from where it can be opened and used.

Items created within this module can also be managed by using the media module. The media module allows all items from modules of type “Media Module” to be shown in one overview.

Among other, system related fields, the following fields will always be present for media modules:

  • Title (title of the item)
  • Description (item description, long text)
  • Countries (Countries where the item was released)
  • Languages
  • Location (free form location description of the item)
  • Rating (10 star based rating)
  • Year (year of release of the item)

Person Module Type #

The Person Module type has all the fields required for registering person information. Just as a property module will never show up in the module list neither will a person module. Person modules need to be used by other modules to be become apparent as a sub-module (see field creation chapter).

Among other, system related fields, the following fields will always be present for person modules:

  • Name (the full name of the person)
  • First name
  • Last name
  • Webpage
  • Description
  • Photo
  • Tags (tag word registration)

‘Other’ Module type #

The other module type is almost the same as the media module type. The only difference is that it has less predefined fields (such as rating, title) and its items cannot be managed by using the media module.

Only system related fields are added for modules of this type.

Creating a New Module #

There are two ways to create a new module. One way is to manually create an XML file which describes the module and its fields. The second and easiest way is to use the module creation wizard. This document describes the creation process using the wizard.

Start the wizard: [Modules > Create Module Wizard]. The top of the window shows which step you are on. Steps which do not apply to your module are skipped.

Step 1: the module type #

Select the type of the module (see the module types above): Media Module (with predefined fields such as rating, name and description), Other Module (no predefined fields), Property Module (category, genre and so on) or Person Module. The type cannot be changed later.

Step 2: the basic information #

Enter the description, the name of the module (it must be unique), the name of one item and the name of several items, and select the icon: click on the icon to choose another one.

Step 3: the options #

This step is skipped for property and person modules. Select the options of the module:

  • Items can be assigned to a container: adds a container field to the module. See Containers.
  • Items represent actual files: adds extra file fields to the module.
  • Items can be lent to other people: switches on lending, so the loan features are available for the module.
  • Items can refer to other items of this module (such as editions): items of the module can be linked to each other. Enter the name of such an item (such as Edition, Copy or Version) and the name of several of them, see Editions.

The options can be changed later with the Alter Module Wizard. When you switch the last option off, Data Crow asks for confirmation: the links between the items are removed and the items themselves are kept as main items.

Step 4: the fields #

Here you define the fields of the module. For a Media Module the predefined fields are shown first: they are there already. Below them are your own fields, with their name and field type. Press the plus icon to add a field. Use the icons in the list to edit or remove a field (they are only shown for fields which can be changed or removed), and the arrows to change the order.

Defining a field

The field dialog asks for:

  • Name: the label of the field. Two fields cannot have the same name.
  • Field type: what kind of value the field holds and how it is shown. The types are grouped, and a line below the selected type explains it.
  • Which list?: only for the two list types. A list is another module, such as Genre or Country. Is your list not shown?
    Press New list… and enter its name, the name of an item, the name of several items and an icon. The list is created together with the module.
  • Maximum text length: only for short text.

The field types are:

  • Short text: a line of text, up to the maximum length.
  • Long text: text of any length, over several lines.
  • Web address: a web address which can be opened from the item.
  • File (path): the path of a file on this computer or on the server.
  • File (opens when clicked): the path of a file which is opened when you click it.
  • Number: a whole number.
  • Decimal number: a number with decimals, such as a price.
  • Rating (stars): a rating which is shown as stars.
  • Date: a date.
  • Yes / no: yes or no, as a check box.
  • Choose from a list (one value): one value chosen from a list, such as the genre. The list is another module.
  • Choose from a list (several values): one or more values chosen from a list, such as the countries. The list is another module.

The standard fields of a new module, such as Title, Description, Year, Languages, Rating and Countries of a media module, are translated in all languages right away.

Step 5: the field settings #

The settings of the fields are set here, for all fields at once:

  • Enabled: the field is used. Disabled fields are hidden entirely within the application, regardless of user privileges.
  • Required: the item cannot be saved while the field is empty.
  • Descriptive?: the value is shown in the title of the item. With several fields the values are shown one after the other.
  • Key: two items cannot have the same value. With several fields the combination counts.

Required and Key are not possible for fields which are not stored with the item itself (such as a list with several values and calculated fields). At least one enabled field has to be marked as Descriptive, otherwise the items have no name and you cannot continue. You can change these settings later in the general field settings.

Step 6: the item form #

Set the order of the fields on the item form, per tab. The fields are shown on the tab in this order. You can create tabs, change and remove them, and move fields to another tab, in the same way as in the item form settings. This step is only available in the full client.

Finishing #

Press Finish to create the module (when you are connected to a server the button is called Send to Server). With Add & New the module is kept and the wizard starts again for the next module, which can refer to it. When the wizard has made a change, Data Crow has to be closed; a message tells you so. Closing the wizard while modules are waiting to be created asks whether to discard them.

Creating a Reference Module #

Referencing one module from another is done through the field creation. Creating a reference has implication in how modules are shown within Data Crow;

  • Property module; not shown until referenced. Shown in the [Maintain] menu after it has been referenced. One property module can be referenced by multiple modules.
  • Person module; not shown until references. One person module can be referenced by multiple modules.
  • Media and Other module; shown in the module list as a main module (just like the Movie, Book and Software module). The selected module can be removed from the main module list after which it will be shown in the drop-down as a sub module (for example the Developers module is only shown as a sub-module of the Software module);

Reference Module #

As shown above you have the option to use information from other modules in your own module. It is very common within Data Crow to use other modules to allow list content to be edited. Deciding to reference another module will also change the way that module is displayed.

How do you create a reference to another module? Simply by creating a reference field (“Reference Field, Single-Select” or “Reference Field, Multi-Select”) to another module. The screenshot below depicts adding a Categories field to the software module. As a field type the “Choose from a list (several values)” has been selected. The module Categories is used to fill the content of the Categories field.

Referencing a Property Module #

The property module type has been described earlier. One of the most important things to know is that this module will only be displayed once it has been referenced by another module. After you have created a reference to a property module it will become available from the [Maintain] menu. A menu option named after the items of the module (such as [Languages]) will be shown there. Using this option you can manage the items for this property module and thus also the available content of the reference field.

In the example below a references field was created to the Language module for the Software module. The languages can now be maintained through the [Maintain] menu of the Software module.

Referencing any other type of module #

Creating a reference to any other kind of module works exactly the same as for property modules. However the result is little bit different. When creating the reference field you will be asked whether the selected referenced module should still be shown on the module bar. If you do so, nothing will change. However if you choose to no longer show the selected module on the module bar, the referenced module will be displayed in the module list, underneath your (main) module. An example is shown below.

The software module has two reference fields, one to the developer module and one to the publisher module. These modules are shown by hovering over the software module.

Selecting either of these sub-modules allows you to administer the containing items.

Relating Modules #

It is possible to create a parent child relation between two modules. A parent child relationship is something different from creating a reference between two modules. When a module becomes a child module its items can only exist when they have a relationship with a parent item. An example of this is the Music Track module, which has a parent child relationship with the Music Album module: music tracks cannot exist without a music album. In case of a reference between two modules this is not the case: an actor can exist even when it is not referenced by a movie.

Start the wizard: [Modules > Relate Module Wizard]. Select the parent module (the one which will contain the items of the other module) and then the child module. The modules are selected in a tree with a filter; double click to continue. Data Crow asks for confirmation: the modules are changed right away and this cannot be undone afterwards, except by restoring a backup.

After the relationship has been created the items of the child module can only be managed via the parent module. The item form of the parent module has a separate tab where the child items are shown.

This tab also allows you to create, update and remove child items. In case you want to manage the child items using a view the table view is your only choice. The music album module is a good example where you can see this in action.

Copying Modules #

Instead of creating a module from scratch you can also base a new module on an existing module. Start [Modules > Copy Module Wizard]. In the first step you select the module you want to use as a template (a tree with a filter; double click to continue). After that you follow the same steps as for a new module, with the fields and settings of the copied module already filled in. Give the new module its own name and item names.

Deleting Modules #

Custom modules, modules not delivered with Data Crow, can be deleted with [Modules > Delete Custom Module Wizard]. The wizard is only available when you use Data Crow stand-alone. All items of the module are deleted as well, and this cannot be undone: make a backup first.

Select the module (a tree with a filter). The next step shows the modules which depend on it, and is skipped when no module is affected:

  • the relationship of modules which refer to the module is removed (their reference fields are removed; deleting a list which is used by several modules removes the fields of all of them);
  • a child module of the module is deleted as well, including all of its items;
  • when the module is a child module, its parent module loses it.

Data Crow asks for confirmation before the module is deleted. After that Data Crow has to be closed. Standard modules (delivered with Data Crow) cannot be deleted, but you can hide them with the enabled modules settings.

Distributing Modules #

After you have created and tested your module you might want to distribute it to other persons.

Exporting a Module #

Start [Modules > Export Module Wizard]. The wizard exports the module and the modules it refers to (at every level, also the lists of the lists) to one module file, named after the module. The file holds the pictures and attachments of the exported items, the settings of the module and the names of the module and its fields in every language.

  • Select the module to export (a tree with a filter).
  • Related modules: choose per referenced module what to export: none of its items (the field stays empty), only the items which are assigned to the exported items, or all of its items. This step is skipped when the module refers to no other module.
  • Configuration: choose the folder where the export file is saved, and check Export the items of the main module when the items of the module have to be part of the export.
  • Export: the progress and the event log are shown; press Finish when the export is done (Cancel stops it).

Importing a Module #

Start [Modules > Import Module Wizard] and select the module file (ZIP). The module is imported with its settings, names, pictures and attachments, with a progress bar and an event log. A module which refers to a module which is not in the file is refused, with a message which says which module is missing. After the import Data Crow has to be restarted to see the module.

Altering Modules #

To customise an existing module start [Modules > Alter Module Wizard]. The wizard shows the modules as a tree: the main modules, below them the modules their fields refer to, and below those the modules these refer to. Modules which are not used yet are shown separately. Use the filter to find a module and double click to continue.

The next steps are the same as for a new module. You can change:

  • the description and the icon of the module (the name and item names cannot be changed here);
  • the options, such as whether the items can be lent or can refer to other items;
  • the fields: add new fields, change or remove existing fields;
  • the field settings of the new fields and the item form.

Fields which the module needs (for example for online search or the file information import) cannot be removed, and some fields cannot be changed: the edit and remove icons are only shown when the change is possible. The name of an existing field cannot be changed. Changing the type of a field might result in data loss: always make a backup before applying these changes. Only the types a field can be converted to without losing data are offered. For example:

  • a single list field can become a list field with several values (such as the Storage Medium field): Data Crow converts the values for you;
  • a single line text field can become a file field, a web address, a long text or a list field; when it becomes a list field, Data Crow creates a value in the list for every existing text and assigns it to the items which held the text.

Removing a field removes what was stored in it for all items. After a change Data Crow has to be closed.