Documentation

Summary for programmers

This page is written to explain Axisbase to programmers.

Programming model

I'm assuming you've done some scripting or programming in some other database tool, such as FileMaker or Microsoft Access. The basic idea is to do what you can without code, and use code when you need more flexibility. Axisbase doesn't change that basic idea, but it changes how it is done. Instead of working in a built-in language, you work in C# or another .NET language. There are two basic ways to extend Axisbase with code:

  • Add external DLLs that are called from within the Axisbase client and/or server.

  • Write your own shell that replaces the Axisbase client, and use the lower level functionality.

Code you don't need

There are several areas of code that Axisbase has designed out of existence, so you may need less code than you think:

  • Navigation code - You can build a menu in Axisbase and provide hyperlinks from one building block to another, all without code. Menu forms are no longer needed.

  • Multiplicity code - You can multi-purpose display blocks (lists, reports) with different data sources, all without code. For example, if you want to give the user the option of printing a report of sales either by date range or by customer or both, sorted different ways, you only need to build multiple data sources, but they can all feed into one display block. Connecting them does not require code, because it is a property of the hyperlink.

  • Parameters - You no longer have to build forms to ask the user for parameter values (like a date range). Axisbase does it for you. Scratch that one off your list!

  • Business rules - Desktop databases are notorious for having business rules embedded in the presentation code. The Axisbase answer to this is to collect all security and business rule code in one server level DLL, and not write it into the client.

  • References - In most tools you have to code (or otherwise specify) a dropdown list or search form so that the user can select a record by name instead of just seeing the primary key value. For example, choosing the customer for a sale from among thousands of customers is normally something you have to code for. But Axisbase handles this for you.

  • Report anomolies - Because traditional reports only draw from one SQL select statement, you've probably had to be creative about getting certiain things to show on reports correctly. For example, if you want a summary table at the top of a report followed by detail, or if you need two unrelated lists side by side, that tests the limits of most report systems, and often requires coding. Since Axisbase reports can contain any number of lists placed anywhere, this design problem is avoided.

  • Upgrading from single-user to a server solution - With some upgrades (for example, Access to SQL Server), it can involve significant coding to work around the differences in behavior and performance between systems. With Axisbase, you just copy the database file to the server, start serving it, and continue working as before.

The layers

The architectural layers are in executable files as follows:

  • Axis1.Util.dll - Utility classes required for all other layers

  • Axis1.Win32.dll - Classes that depend on Win32 (If you are using Mono instead of Windows, these classes are not used.)

  • Axis1.Local.dll - This is the basic database driver for local files, used by the Data layer.

  • Axis1.Data.dll - This layer implements the AxPond class, which is the database. You could include Data, Local, Win32, and Util in a project, which total about 300 k, and have an embedded database with your own user interface.

  • Axis1.Forms.dll - This layer contains all the "building blocks" (called "nuts" in code), and uses all of the above layers. You can include this in a project to take advantage of the building blocks in your application, such as lists and reports.

  • Axisbase.exe - This layer is the client executable.

Plugging in your DLLs

Not only can you use Axisbase as an embedded database in your applications, you can also customize it the other way around, by plugging in your code into Axisbase. You can create custom forms and controls, as described here: Using custom code in building blocks

(c) 2014-2015 Divergent Labs, Inc.