| Let's start exploring MaxBase features, and how do they work. In this document I will sometimes refer to MaxBase as MB, and to a database (a collection of data organized in fields) as a DB. Please note: reading this page is important also for the developer, because it gives you an idea of what MaxBase can already do on its own, and therefore by knowing what's already there you will know what you don't need to code by yourself. This is how MaxBase in action looks like:
| A couple of visual cues are available to recognize the in use settings for the db: If an asterisk is present in the title bar, on the rightmost character, it means that a filter is in use. The field on which the db is ordered has the caption written with bold characters. The icon-based toolbar gives you direct access to the following features (they are explained below): Add a record. Modify record(s). Delete record(s). Previous page. Go to the first record of the list. Previous record. Next record. Go to the last record of the list. Launch the Conversion utilities. Launch the Visual Form Designer. Launch MERGe, the report generator. In the "File" menu you find the following items: [ New ] This option is used to create a new database. First of all, a file name for the main .dat file is requested to the user and then MaxBase will proceed presenting the db structure customizer (allowing the user to add, modify and delete fields). [ Login ] and [ Logout ] let you connect/disconnect to/from a database, and after having logged in to a database the records that this latter contains will be displayed. [ Load form ] You can use whatever form you like to present your records in form view; by default, if a form that has the same name of the database is present in the database directory, that will be used, otherwise you can use this option to load a specific form. [ Delete this DB ] lets you delete the current database. [ Exit ] will close the MaxBase application and store information for the currently in use settings in the directory you started MaxBase from. In the "Edit" menu the following items can be found. [ DB Structure ] If a database is currently loaded you can edit its structure using the panel that will pop up when you choose this option. Here is a screenshot of the db structure customizer: |
| The panel is divided in three parts: the upper space contains information about field properties (length, name and indexing) and field visual properties (visible?, and alignment). The visual properties can be modified on-the-fly and will be activated all at once when you press "ok", while changes to the field properties have to be confirmed using the "add field", "modify field" and "delete field" on the right part of the panel, and will be activated as soon as you press those buttons. [ Add ] lets you add records to a database. Please note that in order to add records to the db, you must have created and/or loaded a form for that db. If no form is loaded, MaxBase will offer the option to launch the Visual Form Designer in order to create one. [ Modify ] works like [ Add ], but allows you to modify one or more records. [ Delete ] will delete the currently selected record(s). [ Select All ] and [ Deselect All ] select and deselect all the records that are loaded into MaxBase. The "view" menu contains the following items: [ Query ] The query subsystem allows you to set filter conditions and a field to order the database by, using the following interface:
| In the upper text field you can set the filter conditions, while in the lower drop-down choice you should set a field on which to order the database by. The remaining space is comprised of two lists, one containing field names, and one containing operators. Clicking on a field or an operator will add that to the end of the filter conditions text field, therefore you can set them without having to type anything on the keyboard. Note: you can use unlimited levels of parenthesis in your conditions, and you can specify the "&" (and), "|" (OR) operators to create complex filter conditions. You can also use wildcards with = and <> operators: string* will search for every record which has a value beginning with [ string ], *string will look for records which end with [ string ], *string* will show every record which have [ string ] in them, and finally str*ing will look for any record whose selected field begins with str and ends with ing. Filters are case-insensitive. If you specify a filter condition when another one is in use, the first one will be dropped, and the most recent one will be used. Setting an empty string in the upper text field will reset the filter conditions. [ Refresh ] will refresh the current view with the contents of the db stored on disk. Useful if you are using the [ First 50 ] visualization strategy and delete a lot of records. Note: when you add a record it won't be displayed on screen until you push [ Refresh Now ]. [ Form View ] lets you see the records in form view, using the currently loaded form. This can be very useful, for example if you have records whose length makes them not to appear fully in the one-line view, or if you have some kind of data that cannot be expressed meaningfully with plain strings. Once you are in form view you have access to all of the features of MaxBase, and the navigational buttons will let you move forward and backward in the archive. [ Line View ] will tell MaxBase to operate in line view mode (default), as opposed to form view. [ First record ] [ Last record ] [ Next record ] [ Previous record ] All of these menu items can be used to browse your records in form view (or to move te record cursor in line view mode). [ Next page ] [ Previous page ] If the database is displaying only some of the records (e.g. if you have selected the "show 50 records at once" option and the query you have set returned more than 50 records), you can use these two options to switch the record "pages". Right after the query has been performed, you will see the first 50 records fitting the filter conditions; pressing [ Next page ] you will see the remaining ones (or another 50 records page, if more than 100 records have been returned). The "plugins" menu contains the following items: [ Add a plugin ] [ Remove plugins ] [ Save plugins information ] In order to use plugins, you must perform the following steps: 1) Write the code for the new plugin. 2) Let java see the new class(es) by putting them in your classpath. 3) Choose the "Add a plugin" menu option and type, as requested, the plugin name (e.g. "My Plugin") and the complete package+name of the Java class (e.g. "com.myplugins.MyPlugin.class"). 4) Choose the "Save plugins information" menu option so the next time you'll start MaxBase you will have back your plugin. If you don't want one or more plugins anymore, just purge them by the pool of the available plugins by means of the "remove plugins" menu option. The "options" menu contains the following items: [ Show 50 records only] will tell MaxBase to show only the first fifty records if there are more than that to display. This is useful because if you have thousands of records, loading and displaying all of them will take time and resources. Usually you work with filters so you don't have that much records displayed at once. The default, upon MaxBase startup and if not overridden by the user upon exit, is to show only the first 50 records of a database. [ Show all records ] instructs MaxBase to show all the records at once. E.g. if you have set a filter which retrieved 100 records they will all be displayed. [ Network options ] when you are accessing DBs on a remote machine, chances are that someone else is doing it, too, and this means that the records you are seeing have been deleted or changed. By means of this option you can specify how often (in minutes) to refresh the query. [ Colors and fonts ] will let you customize fonts and colors for MaxBase. The "tools" menu contains the following items: [ Database and file utilities ] This menu item will open up a notebook from which you can perform some conversions from/to different database and file formats. [ Form designer ] The visual form designer can be launched by using this option. When you launch the VFD, the currently in use form will be passed to it, and whenever you exit from the VFD, the form you were working on will be transferred back to MaxBase. [ Report designer ] MERGe is the report designer, and you can launch it from this menu item. MERGe lets you print and preview both line view and form view reports; in addition, it can create HTML reports and the Java or NetRexx source code needed to recreate reports in your applications. [ Pack DB ] will eliminate dead records and regain some space on the hard disk. Warning: since MaxBase uses a statistical model to guess where new records will have to be stored, it is recommended that you do not pack your DB too often, since the packing operation will cancel all the statistical work done until then. Packing twice or three times a year should be sufficient. Note: there is an exception to this rule. If you modify a lot of records (e.g. 20% of the total records or more), it's good practice to do a 'pack' on the archive. The "help" menu contains the following items: [ Turn on all tips ] MaxBase gives you to-the-point tips right before you perform certain tasks. Using the buttons on the tips dialogs that will pop up you can selectively turn off some of the tips, or all of them at once. With this menu option you can turn them all on again. [ Turn on active tips ] This option turns on all of the tips that were still active when you decided to turn off all of the tips. [ Turn off all tips ] This option deactivates all of the tips. Please be warned that MaxBase saves (in the current directory) its position and size, therefore the next time it is started it will show up at the same location, with the same size. Other information saved are colors, fonts (if customized by the user), field on which to order the database and active filter (if any): make this work for you - store your databases in different directories and customize differently each DB look'n'feel! Notes And Bits MaxBase can be given a parameter in the command line: the name of the database to log in to at startup (trailing .dat extension NEEDED in case of local database tables). E.g.: java nrio.MaxBase imgs.dat java nrio.MaxBase mbase://greta.flsystem.it:6789 If you provide a name of a directory (without the trailing \ or /) instead, when you'll bring up the [ login ] dialog the browsing will start from the specified directory. Other parameters are presented in the FAQ section, as part of workarounds for problems. Normally you don't need and don't want those extra parameters. You can expand MaxBase functionalities through the use of plugins. Refer to the developer section for more details.