Wednesday, 29 October 2014

Rapide Extension Library for JasperReports

We have recently been working on a project that is migrating an application from MVS to the web. The existing application has a number of reports that are developed as COBOL EABs and they wanted to migrate them to use the opensource JasperReports library.

To assist in running a JasperReport from Rapide and avoid the need to code the report execution in Java, we have developed a new Rapide Extension Library. This allows you to create a JasperReport object, pass in parameters and run the report to produce the output in a variety of formats, for example PDF, HTML or XML. The DataSource provided for the report can either be a JDBC datasource or Rapide can pass records directly to the report from Gen views.

Below is an example of a PDF report produced using JasperReports. The report design was produced using the Jaspersoft Studio which is an Eclipse tool that is a powerful and easy to use report designer. The only other thing needed to produce the report was a few lines of Gen action diagram code that invokes the report via the Rapide Extension Library.


We are also thinking about a name for this technology and are considering calling it Report Object Binding for JasperReports, or ROB Jasper for short ;-)


Tuesday, 7 October 2014

Runtime Translation Facility

A key aspect of the design of Rapide was to enable the development of multi-lingual applications without needing to design a separate window design for each language. This becomes especially important when you want your application to support many languages and the translation will probably be performed by different people and who will not be skilled in CA Gen development.

The solution we adopted was to give each string (literals, prompts, exit state messages, etc.) a string ID and then externalise the actual string values into a separate string property file which could be translated into multiple languages and then the correct translated string file used at runtime based on the user's locale.

Because the strings are stored outside of the model, the translations can be performed by someone who has the necessary translation skills without also needing to use the Gen toolset.

A string translation tool is available with Rapide that can be used by a non-developer, but one issue with this is that the strings are not presented in the context of the application which can make translation difficult if you cannot see the strings on the actual window.

To make it easier to translate the application, Rapide now provides a Runtime Translation Facility.

When enabled, the Rapide runtime provides a right-click facility when you are actually executing the application in a browser or desktop environment on most types of controls in order to dynamically enter translation strings for the item clicked on.  

This can vastly simplify the process of translation for the majority of UI designs, providing an intuitive method of translating.

In the example below, whilst the user is running in a French locale, the text is only available in English.

With the Runtime Translation Facility enabled, they can right-click on a text string and provide the translation.


The window immediately reflects the changed string. These runtime translations are stored in a file containing the changed strings which can then be merged back into the translated strings in the development machine to become part of the next release of the application.