Omnis Technical Note TNEX0002 May 2007 (updated July 2008)
The Omnis Remote Studio Applet
For Omnis Studio 4 or after
By Michael Hufschmidt
In more complex development projects you may often have the requirements to re-use parts from other projects that have been developed in other programming languages. After all you don't want to always re-invent the wheel and to re-write code that has already been proven.
The modern answer to this problem is called SOA (Service Oriented Architecture), and from Omnis Studio 4.2 onwards, Web Services are supported in Omnis Studio. With the Web Services component, Omnis can call remote or third-party services as a client, and can act as a server itself providing services for other clients.
However, there is an alternative to using Web Services that may be better suited to your particular project. After all Omnis has always been very open for external extensions: it was possible to integrate external C++ programs in Omnis 7, and since Omnis Studio 4.0 you can also call program modules developed in Java from within Omnis using what is called the Remote Studio Applet (rStudio).
With the Remote Studio Applet you can access remote services or other programs or you can expose your Omnis code to other programming languages. It is now possible to call a method of an Omnis object class from a C++, Java-, Visual Basic-, PHP-, or Perl program and to pass back parameters to Omnis.
You can find a description of how to use the Remote Studio Applet in Chapter 13 of the Omnis Programming manual (November 2005).
To demonstrate the rStudio applet, we have created a demo in which the Remote Studio Applet is called from either a Java, a Visual Basic, or a PHP program.
The following screenshot shows the result of a call from a PHP script. The result is displayed by PHP in a web browser, the return value by Omnis is put into a red frame. (Of course Omnis can directly create dynamic HTML pages; but when you are using PHP it can be more convenient to use the Remote Studio Applet as several different Omnis methods can be selected from PHP.)
The demo library is called RSA_Demo.lbs and can be run in Omnis Studio under Windows, Linux, or Mac OS X. You can download the demo package below, and it includes detailed installation information, an Omnis library, and client programs in Java, Visual Basic (VB6), PHP4, and Java. Version 2 of the package is provided for Windows Vista and Omnis Studio 4.3.1 (July 08).
If you require more information about the demo package, please email the Tech Support team of Raining Data Germany at: email@example.com
The author would like to thank Klaus Schrödl (VB6 program) and Götz Krija (Shell script for Mac OSX) for their collaboration.