Running Zim 9 Applications
Important Notes Before Running Zim 9 Applications
. Existing databases: Existing Zim databases (that is, pre-version 8) cannot be run directly in Zim 9 but must be first converted to Zim 9 (pre-Zim 9 databases contain less information in their data dictionary and will not be properly understood by Zim 9 and will probably result in corruption). You must follow the conversion steps described in Migrating to Zim 9 documentation;
. Zim executables: Zim 9 no longer has ZimMU, ZimRT, ZimRTMU, ZimQRT, ZimQRTMU, ZimPRT and ZimPRTMU;
. Zim architecture: Zim 9 has a Client/Server architecture, with Zim Server being the server and the clients being Zim (for Windows and Unix) or ZimTC (for Windows only). See steps below on how to run Zim 9 applications;
. Release Notes: All Release Notes for Zim 9 must be read in the Zim help file as many changes were introduced in Zim 9. However, all existing applications remain compatible.
. Unix Painter: The Zim 4.2 Painter for Unix is not available in Zim 9 because the file structure in Zim 9 is different than previous versions of Zim. A new cross-platform Painter is being developed and will be available soon. Until this new painter is released, you can use one of the following options for painting forms on UNIX:
1) Use the 7.x screen painter.
2) Develop your user interface from your previous version of Zim, and when completed, export the forms definitions to Zim 9.x.
. Configuration Files: Configuration files have significantly changed for simplification (there are no more config.zim, config.db, config.srv and config.def) but rather zimconfig.zim (for the database) and zimconfig.srv (for the server). Refer to the section Types of Configuration Files for more information;
. Work Path: Zim 9 changed the way work paths and database paths are handled in a much simpler way (there is no config.zim anymore). Refer to the documentation of zimdb.zim, Work Path and User Name Directory.
Create your zimdb.zim File
Before you do anything in Zim 9, you must create your zimdb.zim file which is a configuration file that tells Zim Server which databases will be processed.
The chapter Zim Databases Configuration File describes all the details concerning the creation of this file. In essence, entries like this one:
22; Example; /usr/zim/example
tell the Zim Server that the database called Example is located in the operating system directory /usr/zim/example and has the number 22.
Create the Basic Zim Server Configuration
Zim Server always read a configuration file called zimconfig.srv to adjust internal structures and parameters in order to accommodate the size of shared memory and related functionality.
Of significant importance in order to start Zim Server, you can address the following parameters:
maximum databases 5 % tells how many databases will be handled
maximum tables 500 % how many tables there are in all databases
maximum users 100 % how many users will be connected to the databases
scatter table entries 100000 % how many blocks users will use simultaneously
scatter table links 50000 % maximum size of a single transaction in blocks
The above numbers are just suggestions for this configuration file. Evidently, Zim Server can be started with default parameters but, depending on the requirements, Zim Server might detect a lack of resources later.
After running your Zim applications for a while, you might need to fine tune Zim Server. This is described in detail in the section titled Performance Tuning.
You can now start ZimServer (the chapter ZimServer gives more details on this).
If everything is alright for ZimServer, it will start with a proper message. Otherwise, it will say that there is an error and the file zimsvlog.zim (located where Zim was installed) will describe what was the problem that prevented Zim Server from starting.
Once Zim Server has started, you can run a Zim session, described in the following steps.
Run your Zim Application in Zim 9
If your Zim application was originally written in a previous version of Zim, this database must have been converted first to Zim 9 in order to be run in Zim 9. See the above notes and how to convert a database in the chapter Migrating to Zim 9.
Normally, a Zim client session does not need any specific configuration because the default configuration is good enough for all Zim applications. However, if you need to configure something very specific for a specific database being handled by Zim Server, you can create a zimconfig.zim file as described in Database Configuration File. One such situations is when the number of Zim directories exceeds the default number of open Zim directories.
On Unix, you always develop and run using the ZIM executable as described in the ZIM documentation.
Both on Windows and Linux you develop your application using the ZIMIDE utility but you run your Zim application using the ZIMQTC executable.
Usually, these commands are enough to run ZIM or ZIMTC:
zimqtc -n example
where example is the name of the database you want to run as provided in zimdb.zim for Zim Server.
Stop Zim Server
Normally, Zim Server can be left running. If needed, refer to Zim Server documentation on how to stop it.
Behavioral Differences Between Zim 7 and Zim 9
Zim 9 was built to behave exactly the same way previous versions of Zim were behaving in terms of the Zim applications perspective. However, small differences may happen in the following circumstances:
a) Zim Windows with AutoSize attribute set to off might present scroll bars if the forms being displayed are bigger than the size of the window. Normally, Zim executables up to Zim 7.11 wouldn’t present the scroll bars. ZimQt Client, on the other hand, follows the Microsoft Windows standards and present the scroll bars.
To solve this situation, you can paint again the form, this time checking the AutoSize attribute.
b) Input and Output Masks in FormFields: if there is either an input or an output masks in FormFields but its length is smaller than the real length of the field, than a FORM DISPLAY will present the masking characters “?” filling the remaining of the field.