[Xojo Web] cubeSQL Web Admin

For those interested in Xojo Web - have a look at this article: Xojo Blog: Docker, Database Servers and Xojo.

It shows the Open Source Project cubeSQL Web Admin, which is written with Xojo Web:

cubeSQL Web Admin - Databases

Feel free to have a look at the source, which might have some things of interest to you:

  • How to use Xojo Web to build an app that runs in a Docker container.
    See also this Guest Blog Post: Running Xojo Web Applications in Docker
    • A new feature added: The Post Build Script builds a “Multi Architecture” Docker Image (linux/amd64 & linux/arm64v8). This allows to support running the Docker Image natively on Macs with both Intel and Apple processors.
  • How to use Launch Arguments and Environment Variables for configuration.
    This allowed us to configure the Environment Variables in our Docker setup to preconfigure the connection data.
  • The approach with subclassed WebContainer’s that implement the WebDataSource Interface.
    The quite generic base class cntDatasourceBase can be configured to:
    • be searchable (Main Window shows/hides the WebSearchField if the subclassed Container defines to (not) be searchable).
    • define which Fields of a RowSet should be displayed (cubeSQL uses special custom commands for administration, so we can’t select distinct columns ourselves, and there’s no paging within these custom commands).
    • define virtual Fields, which will be shown in the WebListbox, but aren’t part of a RowSet.
      Internally the base class uses a Dictionary Array which gets built from the RowSet, so one could use it with other external DataSources, too.
    • show the Fields in the WebListBox, while allowing each Container to override the default behaviour (see for example the Databases, which use a WebListboxImageRenderer for a virtual field – depending on a couple of Columns in the RowSet an appropriate Status Icon is being displayed).

Should you want to try yourself, but you don’t have cubeSQL installed - then the Xojo Blog: Docker, Database Servers and Xojo explains how you can easily set this up with Docker Compose (and throw it away anytime).
It also contains setups for PostgreSQL and MariaDB - in case you need to test some things with those Database Servers and want to easily set these up without messing up your developer machine.

And even if you’re not intending to use cubeSQL I hope you have enjoyed the Blog Post.

10 Likes