One Evening = One Application


I was recently asked by someone looking at using OpenInsight for the first time, “How quickly can I really build a small system in OpenInsight 10?”.  Naturally, being a salesperson, the answer was “Very quickly and you’ll be surprised just how quickly.”

This evening I had the opportunity to put this to the test.

As many of my readers will know, I am some months into building a large system that I hope to take to market very soon.  This system uses authorisation keys to set (and update) the user count and the expiry date in the system.  It is nice feature in the application, but it is not overly clever.  However, I find myself having to manually create the authorisation keys from time to time and this was becoming tedious.

I therefore decided to build myself a small application in OpenInsight 10 to help me to generate the authorisation keys and then to keep a history of who has had keys, when, with how many users, etc.

Whilst I did not time this mini- project, all of the following has been achieved by a junior application developer (me) in one evening.  That includes defining the application, building the three data tables, the four forms and all of the popups, messages, etc.  It also involved writing two commuter modules to support the Customers and Key Generation forms.

As is usual for my systems, the application operates from a main MDI Frame window, as shown below.  Granted, I need to tidy a few things up (like the menus), but remember this is an example of what can be achieved in a few short hours and by a junior.

The MDI Frame is used to display all of the application’s windows and these are launched from the three buttons on the toolbar.  The fourth button being the Exit button, which closes down everything.  All of these buttons are operated by CLICK quick-events.  i.e. I did not have to write any code to get anything working in this form.  In fact, it does not even have a commuter module defined for the window.

You could say that the MDI Frame window is a NO CODE form, but that is a private joke which anyone that follows the Google Pick discussion forum will understand ;).

KeyGen-1

The next form is the Customers form, which enables me to capture some basic contact information for my customers.  At the bottom of the screen is a table which uses some symbolic fields, a relational data table and a relational index to display all of the authorisation key records that are linked to the Customer.  This enables me to see when  keys have been generated, the user count and the expiry date for that entry.  It will build into a history of the license over time.

Again, I needed to write very little code to operate this form.  The code is pretty much limited to a Changed and a Clear event to set the toolbar buttons from disabled to enabled (and vice versa), Click events for the Cut, Copy and Paste buttons and a Click event for the Email Address label.  So very little code and what code there is in the commuter module is very basic code.  To be honest, most of the code was pulled in from my commuter module template, which already had the code for the Cut, Copy and Paste buttons and to enable and disable the Save, Clear and Delete buttons accordingly.

KeyGen-3

The Customer ID label will, when clicked, display a standard record lookup window and when the Email Address label is clicked the user’s email client will launch and the system drops in the email address automatically.  Otherwise the buttons all drive the system and the combo boxes are all populated from the System Codes data table.

KeyGen-4The System Codes window is pretty straight forward with (not including the toolbar) only two key controls which use just three dictionary items (fields) in the database.

“Again, this is a no code form where I do not even have a commuter module defined.”

The combo box is populated using the Auto-fill feature in OpenInsight, which means that the pick list will always be up to date as new code categories are added.

The user then simply adds a new code category (COUNTIES in the example) and then in the table, they enter a MultiValued list of code and descriptions.   As soon as the record is saved, those new descriptions are available to the users in the Customer’s data entry form.

KeyGen-2

The last and most complex window is the Authorisation Key Generator window.

The form itself is not at all complicated and it was very easy to build, but the commuter module behind the form took some time for me to build.

The form uses my usual quick event to launch the Popup (record lookup window) and this in turn reads (displays) the record in the form.  A similar popup is used to select the Licensee’s record ID and to write that to the appropriate edit line.  When the Licensee’s ID is chosen the Licensee’s name is displayed.  This is a calculated field (a symbolic) which brings together the customer’s First Name and Last Name from the Customer’s data table.

KGImage-5The system has been designed to cater for 1 to 9,999 users.  A message will display if the user tries to enter 10,000 or more users.  Again, the message (as shown) is created without any code and it is called using only a few very short lines of code.  The code simply checks for the number of users and then it makes a call to display the saved message if the user count is over 9,999. 

The calendar button launches a standard OpenInsight 10 calendar, from which a date can be selected and this is written to the Expiry Date edit line.  The buttons on the toolbar are all Quick Events.

Once the User Count and Expiry Date fields have been completed, the Key button on the toolbar can be clicked and this will format the authorisation key using certain random  characters and formatted with hyphens.  The authorisation key is truly random, with a unique key being generated every time the key button is pressed, even when the user count and expiry date does not change.

Anyway, it is now getting late and I’ll leave the following items for tomorrow evening:

  1. I need to configure all of the menus.  The system is run by the buttons at the moment.
  2. I need to make sure that an expiry date is a date in the future.

It will then be completed and ready for use.  Not too much left to do then, a nice little authorisation key generation application done and a good evenings work.

All thanks to OpenInsight 10 and how easy the tool set makes it
to build systems like this 🙂