Wednesday, 9 April 2014

Platform Independence

A key advantage of CA Gen is the platform independent nature of the models coupled with code generation for platform specific native code that offers high performance and access to native operating system features and functions.

The abstraction provided by the CA Gen model allows the developer to concentrate on the business requirements without having to be excessively concerned with the details of the underlying technical implementation.

Platform independence means that an application be deployed to multiple target environments from the same model, but also that the model is not tied to a specific combination of operating system, language, compiler, database or framework versions. This means that the underlying third party software stack can be updated without requiring changes to the Gen models.

With Rapide and Gen, the developer is shielded from the often considerable effort required to keep the underlying software stack up to date and consistent. As examples of this, the changes made in the Apple iOS APIs between version 6 and 7 or the complexity of keeping Java frameworks up to date have typically  resulted in a considerable amount of effort for projects that code directly using the native frameworks. With Rapide the upgrade to iOS7 was implemented by simply installing a new version of the Rapide runtimes with no change to the models or generated code.


Rapide extends CA Gen’s capabilities for platform independence by providing support for multiple platforms (Browser, Mobile and Desktop). A Rapide application comprises platform independent generated Java code and a Java based cross-platform runtime that ensures consistent behaviour and single-sourcing for all supported platforms.

Tuesday, 11 March 2014

Rapide Global Listener

A recent enhancement for Rapide was a new Listener feature that introduced the ability to listen for events within the same session, i.e. one p-step listening for events from a separate p-step in the same browser window or mobile device.

Rapide has now been updated to incorporate the Rapide Global Listener (RGL), which allows Rapide clients to receive notifications  issued from any other p-step, either in the same application server, in a different application server (for example when using load balancing) or even from a completely different environment (for example a batch job or server procedure step).

The RGL is implemented as a standalone executable and uses TCP/IP sockets for communication between the RGL and the Rapide runtime.


In the first release, events are posted to the RGL from a Rapide client application. In subsequent releases APIs will be provided to enable notification events to be posted from non-Rapide clients, for example Gen batch jobs or server procedure steps.

A typical use of a listener is to replace the need for a client to poll a server to check for updates. Consider the example of the Rapide sample booking application which lists conference room bookings. If you want the list to automatically refresh to show the latest bookings without the user needing to press a Refresh button, a typical approach to this in a Windows GUI would be to use a timer control to post an event to the client p-step which then triggers a server call to refresh the list.  If the timer is set to perform an update every 5 seconds, then this results in  over 5000 calls to the server in a working day - per client! If the application has 1000 users, then you have 5 million server transactions just to keep the list updated.

If the same requirement is replaced by the Rapide listener, then the client only needs to refresh the list when it receives a notify event from the listener, which is triggered when a booking is made or changed. In our example, you might have 20 bookings per day, so the 1000 users refreshing the list 20 times is a reduction in server transactions from over 5 million to 20,000.

The Rapide controls demo and booking demo have been updated to illustrate the use of the Global listener.

Tuesday, 25 February 2014

Accelerator and Mnemonic Keys

A common practice in designing Windows GUI applications is to use mnemonic and accelerator keys for push buttons, menu items, check boxes and radio buttons. Examples might might include Alt+F for the File menu or Ctrl+P for a push button.


When you run the application in a browser, the browser application itself (i.e. Internet Explorer, Chrome, Firefox) will have its own set of short-cut keys. If the user enters a short-cut key combination that the browser accepts, then this function will be performed in both the browser and the Rapide application. For example, if your application uses Ctrl+T, then if the user enters this key combination, the specified function will be performed by the Rapide application AND a new tab will be opened since Ctrl+T is the keyboard short-cut in most browsers to open a new tab.

It is therefore recommended that you do not use mnemonic and accelerator keys in your application that conflict with the browser since the behaviour is unpredictable and will be confusing to the user.

The Rapide Generator plug-in Consistency Check will now warn you if you are using a conflicting mnemonic or accelerator key combination. The list of keys that the check uses are defined in a file that can be edited to provide your own specific list. 

Monday, 24 February 2014

Sorting Listbox Data

Since day 1 Rapide has provided a capability to allow users to sort the data in a desktop and browser listbox by clicking on the column heading. The actual sort logic is coded in an event in the Gen action diagram since this offers maximum flexibility for the developer, for example to provide complex sort logic involving multiple columns or even hidden columns.

The Rapide Designer now provides a utility tool to automatically generate the action diagram events for all relevant listboxes at once. This will allow you to easily support consistent sort functionality for all listboxes.

There are a few points to bear in mind when using sorted listboxes.

Firstly you need to decide if you will initially re-sort the data when the list is first displayed, or use the sort sequence from the logic that populated the group view, usually as returned from the server.

Secondly, when the data changes (for example you allow the user to edit rows or re-populate the listbox), you need to re-sort the listbox data. Since the Rapide generated sort event generates the sort string, this often simply requires you to include a SORT statement within any event that repopulates the group view.

Thirdly, if your listbox does not contain all of the possible data and a paging function is available, then you need to consider whether a sort function is appropriate.

Monday, 3 February 2014

Exit State CGVALUE

When you reference an exitstate in an action diagram or dialog flow, for example to test the value, you use a statement that references the exitstate name, for example:

IF exitstate IS EQUAL TO database_updated

The generated code does not test the exitstate name, instead it tests a special property of the exitstate called CGVALUE. The advantage of testing the CGVALUE is that this does not change if the exitstate name is changed or when the exitstate is migrated between models.

When you create an exitstate on the toolset, an initial value is assigned, but when the model is uploaded to the encyclopaedia, a new model-wide CGVALUE is assigned to the exitstate that will differ from the value initially assigned in the toolset. This means that any code generated on the toolset prior to re-downloading the model or subset will still use the old value but any newly generated code will reference the new value.

Therefore when you create a new exitstate, you should ensure that any code generated on the toolset that references the new exitstate is re-generated once you have re-downloaded the model/subset to ensure that the CGVALUE is consistent.

Rapide uses the CGVALUE in the window XML files and for externalising the exitstate messages in the strings file and hence you will also need to regenerate the Rapide window manager files and the strings file as well as the generated code.

Rapide Listeners

Listeners are a new feature in Rapide that can be used to synchronise common data between multiple windows, allowing dynamic applications where the displayed data is always up to date.



Sophisticated user interfaces that display the same data in multiple windows often need to have a mechanism to refresh the common data when it changes. In the past this has been difficult to achieve with CA Gen and therefore the developer either ignores the requirement or has to use complex logic to implement the refresh capability.

With Rapide, the developer can register a Listener on a specific object or multiple objects using wild cards or multiple Listeners. The Listener can then trigger an event when the object changes, thus enabling synchronisation of common data between multiple views of the same object.

For example, an order processing application contains multiple windows that display purchase order details.

  • Each window that displays purchase order details registers its interest with the listener using an action diagram function
  • When the purchase order details change, the developer uses an action diagram function to notify the listener that the object has changed
  • The listener automatically posts update events to the interested windows which can then retrieve the details they require and update their display



Thursday, 30 January 2014

Custom Decorations

Rapide has always had the ability to place a mandatory decoration on a field that does not have a value. We have now added a new feature to allow the developer to add custom decorations to a control using action diagram methods.

Decorations can be used to flag the user's attention to a control, for example a recently changed value or a warning about some data.

Decorations can be placed to the left or right of the control and at the top, centre or bottom. Four different images are supported. Some examples are shown below.





There are action diagram methods to apply a decoration to a control (field, button, etc.) and to show or hide the decoration. Decorations are supported for desktop and browser applications.

Tuesday, 14 January 2014

Global allocation of local views

Gen GUI C applications are able to take advantage of an environment variable IEFLOCALVIEWALLOCSCOPE which can be set to GLOBAL causing local view values to be shared across PSteps.  

Thus you can flow to another PStep, use non-initialised views in the PStep or in lower-level ABs, flow back (closing the called PStep), then flow to the same PStep again, or use the same AB, and those non-initialised views are maintained with the same data values.

In CA Gen code this functionality is only available for C clients and not for Java clients.


Rapide has been enhanced to provide similar functionality. However whilst the Gen GUI clients implement this as an environment variable that affects all action blocks and procedure steps, for Rapide to make more efficient use of memory, you explicitly specify which PSteps and ABs should have their local views managed globally for the session.  


Wednesday, 8 January 2014

More JavaScript Controls

The Rapide Controls demo has been updated to include some more examples of JavaScript controls embedded in a Gen window. Rapide makes it very easy to implement a JavaScript control into a Gen window, and they are then available on all platforms - desktop, browser and mobile, unlike OCX controls which have limited portability.

1) Example of a rich text editor control. Data is passed to/from the control in a view containing html markup.


2) Use of Google Maps with a simple input of latitude and longitude:



3) Use of the JSCharts control.


You can try out these controls live on the Rapide Demo here:

Thursday, 19 December 2013

Javascript Controls

Rapide now allows the use of Javascript controls in the user interface design.

In the example (from the updated Rapide sample model) a simple javascript control is created to show a traffic light which the developer can interact with using action diagram functions and the user can press to change the state.