Using JavaScript/Rhino with BSF and Apache

The Bean Scripting Framework (or BSF) was originally developed by
IBM and now published as open source. It provides a framework for
using a number of scripting languages with Java. Rhino is one of the
supported languages.

Embed ObjectScript in Java

The Augsburg Version of BSF4Rexx

"BSF4ooRexx",
the Bean Scripting Framework for Rexx, allows one to use the Rexx
and Object Rexx programming languages with the open source Bean Scripting
Framework (BSF) which enables Java programs to easily invoke scripts and
programs written in another language than Java. This article introduces the
"Augsburg version" of BSF4Rexx which incorporates numerous changes and as a
main feature the ability to start Java from Rexx programs. This way all of Java can
be viewed as a huge external Rexx function library from the perspective of Rexx,
available on any platform Rexx is available. This paper gives a bird eyes view of
BSF4Rexx concentrating on this latter ability and introducing Rexx programmers
informally to Java and to the most important object-oriented terms such that the
unacquainted Rexx and Object Rexx programmer becomes able to read the Java
documentation and as a result apply BSF4Rexx to allow (Object) Rexx to use and
drive Java.

Camouflaging Java as Object REXX

The Java runtime environment (JRE) is available for practical every operating system in
the world and installed on most computers. The functionality of the Java classes that
build the JRE has been constantly updated to reflect the advances in the software
technology thereby making bleeding edge software concepts available to Java
programmers. For that reason the JRE has been an attractive target for making its
functionality available to Rexx programs in the form of external Rexx functions, notably
with the
"BSF4ooRexx" (Bean Scripting Framework for ooRexx)
(old: "BSF4Rexx"
(Bean Scripting Framework for Rexx)) technology introduced at
past International Rexx Symposiae. BSF4[oo]Rexx supplies a procedural interface to Java,
such that Rexx programs need to simply use CALL-statements or function-calls to
bridge into Java.

As Object Rexx is object-oriented an object-oriented interface to Java may be desirable
as this may reduce the complexity to refer to Java. This article introduces and
discusses the architecture and the implementation of Object Rexx wrapper classes that
hide the procedural interfaces from Object Rexx programmers by embedding the
procedural interfaces of BSF4ooRexx in Object Rexx methods, allowing e.g. the
invocation of Java methods transparently via Object Rexx messages.

Among other things it will be demonstrated, how Java objects are created and sent
messages to interactively via a keyboard using the Rexx "rexxtry.rex" program in a
command line interface.

Automating OpenOffice.Org with ooRexx: Architecture, Gluing to Rexx using BSF4Rexx

The opensource Microsoft Office clone "OpenOffice" is available on
multiple plat-forms, from Windows, over Linux to OS/2. It can read/write
Microsoft office file-formats, such as Word, Excel or PowerPoint. Its
scripting architecture is radically dif-ferent from what Microsoft has
come up with and appears to be more systematic, al-though there is a
rather steep learning curve to it.

The architecture of OpenOffice is exposed via the UNO (Uniform Network
Objects) interface, which allows C, C++ and Python programs to exploit
OpenOffice. On the Windows platform there is an ActiveX/OLE-interface
supplied, such that ActiveX-script languages like VBS, JS, as well as
ooRexx can be used for scripting purposes, but such programs will lock-in
the company into the Windows operating system.

For the programming language Java, OpenOffice supplies a Java interface to
UNO, which can also be exploited in rather innovative ways, e.g. using
BSF4ooRexx (Bean Scripting Framework for ooRexx) to bridge between OpenOffice
and ooRexx. Such a solution would allow for the driving/scripting of
OpenOffice in a platform independent way, allowing customers to eventually
break out of possibly undesired lock-ins (e.g. Windows operating system
and/or ActiveX/OLE-technology).

This article gives a conceptual overview of OpenOffice UNO and explains in
detail how UNO can get instantiated and interfaced with by ooRexx.

Automating Subversion - An Open Object Rexx Approach

This work explores and implements scripts which allow driving the source
code version control system "subversion" from ooRexx. As there are Java
implementations for subversion it is possible to employ BSF4ooRexx to drive
the application.

This work explores and demonstrates how OpenOffice.org can be automated
via Object REXX by using the Java programming interfaces of OpenOffice.org
and BSF4ooRexx.

This time specific ooRexx support for OpenOffice (module "UNO.CLS" by
Rony G. Flatscher, derived from OOO.CLS which is based on the Java
interface to the UNO component technology of OpenOffice) is used, which
cuts down the necessary code dramatically and makes those programs easy
ledgible and understandable (looks almost like pseudo-code).

OpenOffice.org Automatisation with Object Rexx

This work builds on the work of Mr. Ahammer (above). It explores and
demonstrates how OpenOffice.org can be automated via Object REXX by using
the Java programming interfaces of OpenOffice.org and BSF4ooRexx.

This time the OpenOffice.org 2.0 scripting framework (written in Java) is
used, which allows to deploy the scripts as OpenOffice.org/StarOffice
macros, in a platform independent manner.

BSF4Rexx and OpenOffice.org Nutshell-Examples

This seminar paper introduces the easy to learn syntax of Open Object Rexx
(ooRexx) and the BSF4ooRexx external Rexx function package, which allows the
weakly typed language ooRexx to interface with (strictly typed) Java.

It defines and explains numerous small (nutshell) examples where the
functionality of Java class libraries is used for ooRexx. In addition,
the students create examples for automating/scripting the opensource
office package OpenOffice.org (OOo) in an openplatform way using the OOo
Java interface for that purpose.

Some of the OpenOffice related nutshell examples can be retrieved from the
official OOo "Snippet" homepage.

OpenOffice.org Automatisation with Object Rexx (Calc)

This paper gives an introduction to the OpenOffice.org architecture and
explains how the OpenOffice.org Calc component can be automated by using
the scripting language Open Object Rexx (ooRexx). This components are
open sourced and can be downloaded free of charge from the internet.

The paper is divided into a theoretical and a practical part. In the
theoretical part, the main components, ooRexx, OpenOffice.org and the Bean
Scripting Framework for ooRexx, will be described and it explains how the
single components can work together. At the end of this part you can find
an short installation guide, which shows you how to retrieve and install
the single components. The practical part provides some nutshell
examples, that should demonstrate how the OpenOffice.org Calc component
can be automated. The concluding part should give a short summary of the
paper.

ooRexx Snippets for OpenOffice.org Writer

This paper deals with the use of ooRexx as a scripting language for
automation of OpenOffice.org Writer.

At first, there will be an introduction to the technical requirements,
which include the software that has to be installed. Concerning ooRexx
there is also a sub chapter about its syntax and common instructions, to
give a feeling for this programming language.

The next chapter is about the architectural approach behind ooRexx and
OpenOffice.org. It is described how OpenOffice.org can be accessed using
ooRexx.

Chapter four is a small installation guide, which shows how to set up the
different software programmes and configure them correctly. Chapter five
and six show how the automation of OpenOffice.org Writer can be done.
Small snippets, which are code examples, demonstrate different tasks. At
last the conclusion gives a small summary and an outlook.

UNO.CLS: An (Open) Object Rexx Module for Universal Network Objects

"The Vienna Version of BSF4ooRexx", allows open-platform scripting of
OpenOffice.org (OOo) with the help of BSF. This is done by using the Java APIs of OOo via BSF to
address the OOo "Universal Network Objects (UNO)" components, which are used to assemble OOo.
Presented at the International Rexx Symposium 2006, Austin, Texas.

The 2009 Edition of BSF4Rexx

With the advent of the ooRexx 4.0 in the summer of 2009 a new, fully object-oriented kernel has been made available, which allows
to close an important gap between ooRexx and Java, namely synchroneous callbacks from Java into ooRexx and allowing Java
methods to be implemented in Rexx.

The article "The 2009 Edition of BSF4Rexx"
gives an overview of the new features made available in the
BSF4ooRexx package (note the change in the name of the package from
"BSF4Rexx" to "BSF4ooRexx"). Self-explanatory
nutshell examples are used to stress the discussed features.