SWD GmbH QNX-Logo Windows-Logo Linux-Logo
Home
About SW Datentechnik
News
Products
  Catalogue
  Bargain offer
  Data Sheets <
  Product assistant
  Technologies
Services
Documents
Contact Us
Search


SL-GMS Run-Time Library for Java SL-GMS Code Generator

The SL-GMS J/Developer package offers a unique and flexible solution to providing dynamic graphics in Pure Java applications, or from within HTML pages as Java applets.

It is easy to use the SL-GMSRun-Time Library and Code Generator for Java to display graphic models built with the SL-GMSDraw Dynamic Graphic Editor.

SL-GMS Run-Time Library for Java SL-GMS Code Generator
Using SL-GMS J/Developer for "thin clients"

A requirement today is to view some of the information from these operator station on remote PCs running a browser, such as Netscape Navigator or Microsoft Internet Explorer, or running a "thin" client application written in Java.

One approach to providing an optimal solution to this requirement is found in source code generation.

The Code Generator for Java allows for the seamless integration of dynamic graphics into a cross platform Internet Web environment as a Java Applet or a Pure Java application. SL-GMS dynamic graphical models can be converted into source code for Pure Java Classes which can then be integrated into a Java applet or application to perform the dynamic graphics operations. Click here for examples of SL-GMS models converted to Java applets.

Code Generator for Java

An application developer can generate Java applets with pre-existing SL-GMS dynamic models, or use SL-GMSDraw to create new models to integrate into a Web environment. The Code Generator for Java utility converts .m1 files (optimized binary dynamic models) into a combination of Java applets, classes, and HTML pages.

The Code Generator for Java currently supports a subset of the primitives, dynamic attributes, and dynamic expressions available in the SL-GMSRun-Time Library for Java. (allowing applications to provide a useful snapshot of the status of real-time applications to managers and web-based end-users.) Only those attributes that are available in a Java environment are included in the applet, creating an optimized applet, well suited to provide quick performance in either an Internet or intranet environment.

Another feature that makes the Code Generator for Java a powerful tool for the application developer is conversion of hierarchical SL-GMS submodels into Java classes. The strong object oriented architecture of SL-GMS has always helped developers reduce their time-to-market by creating submodels, encapsulated objects of reusable dynamics and graphics. These submodels can be converted into Java classes, merging the power of the SL-GMS object oriented graphical modeling system and dynamic runtime engine with the flexibility and marketability of Java environment.

Also provided is a Java API which permits applications that include SL-GMS generated Java code to dynamically instantiate individual submodels from within the application.

SL-GMS provides a simple, powerful, and extensible interface to data sources, providing the application developer with the flexibility to dynamically update the Java application running in an internet environment from an unlimited array of data sources. A sample Datasource module, the DsModel Class, provides the variable table necessary for the Model, and can be modified and enhanced by the user.

The code that is generated can be constrained to contain only Java 1.0 features. This provides the benefit that the applet generated can be run on earlier versions of Netscape Navigator (3.0) and Internet Explorer (3.0).

Additionally, SL-GMS has been the tool choice for application developers because it allows OEMs and VARS to easily customize the SL-GMS editor and their own applications for use in specific industry environments. The same flexibility inherent in SL-GMS is also provided in the SL-GMS Java Code Generator.

Refer to the "Code Generator for Java User's Guide" documentation package for more details. It outlines the design and structure of the SL-GMS Java Code Generator and demonstrates how an existing dynamic graphical application can be quickly and effectively converted to a Java applet.

Support for Code Generation in SL-GMS

SL-GMS has long provided excellent solutions for applications that require code generation.

Using code generation, graphical models and screens used in an application are constructed using an editor, such as SL-GMSDraw, and then output as source code descriptions for the low level graphics system, thereby improving performance by eliminating overhead.

Experience with other types of code generation done in SL-GMS yields significant advantages when applied to Java code generation.

A version of SL-GMS for the Silicon Graphics IRIS-GL graphics system includes a powerful code generation capability which produces highly efficient source code for the GL graphics library. This capability of SL-GMS is used widely in avionics simulation applications, where real-time motion is desired, requiring updates of complex graphics displays at 30 Hz. It includes many advanced features such as hierarchical grouping of dynamic objects, and support for complex expressions in dynamic property descriptions.

Code generation is an optimization technique which is used when one part of a complex system may be out of balance. Normally, the graphical models constructed in SL-GMS are interpreted by the dynamic graphics run-time engine almost as fast as they could be rendered in straight native code, so there is little gain from code generation. But, in the GL case, the graphics are drawn so fast by hardware display processors that the speed of the code setting up the calls to the graphics library becomes a significant contributor to the overall execution time. Thus the generation by SL-GMS of highly efficient code significantly improves performance.

Networked applications generally require a lot of computing power and bandwidth. As a result, performance is important, particularly regarding the overhead of supporting libraries; optimization is necessary in order to provide acceptable response times. Code generation is an important option that is provided in SL-GMS to address this need.

For a networked application, efficiency in the size of the modules used is important. Java classes need to be downloaded and hence need to be compact and optimized. So, code generation is extremely important if it provides a compact efficient representation for the dynamic graphics information.

Benefits and Uses

The code generation capability is important to SL-GMS system integrators because it provides a way in which existing models and applications can be leveraged beyond the graphics of the operator station. The same dynamic graphics screen elements designed for use in operator stations can be translated into the source code for a Java applet or Java classes that may be included in a user's application.

This source code can then be compiled into modules which can be used within either a client-side browser applet, or in a complete application running in the client. The framework for this can either be a Java program or a browser, such as Netscape 3.0 or Internet Explorer 3.0, or greater, which include Java 1.0.

Some benefits to this approach are:

  • Many customers have a large investment in SL-GMS models and submodels with custom dynamic properties.
    Since these models are maintained in SL-GMS, they can be run with the dynamic graphics engine in an ActiveX or Java Bean component as described in the first section, or they can be converted to source code, which can be compiled and included as needed in an application or applet.
  • The user has complete control over the source code that is produced.
    The code produced by the Java Code Generator is very compact and lightweight. It can be edited, enhanced, and reused in many ways, if needed.
  • The original graphical models are stored in editable graphics form, not in arcane source code.
    The advantage of storing the dynamic graphical model description in an SL-GMS model is that it can later be edited, copied and modified, and source code regenerated as needed from the model. By defining dynamic graphics components in SL-GMS, the description of an component's graphics and dynamic behavior is independent of the implementation for the component. The Developer is shielded from the details of the Java code that is used to implement it.
For many network management applications and web-based systems, an application or applet written in Java is the best solution. Dynamic graphic models are stored in the common SL-GMS format, and used as needed in Java applications or applets, as well as other means of deployment. The generated source code can be used in a variety of ways:
  • In the simplest of cases, the Java Code Generator produces source code for an individual model, output as a Java applet, and referenced in an HTML file accessible from within a browser. The user has control over the datasource and the activation of the model code.
  • The generated source code may be incorporated into a Java application, where the dialogs and forms windows are constructed in the Java application, perhaps using a Visual Development tool to build them.
  • In another case, the output of the code generator will define individual graphics components as Java Classes, readily usable in many Pure Java applications. An application constructed this way may use many instances of several different Java-defined objects (submodels).

Catalogue entry

 

Seitenanfang
© 2008 by
SWD
GmbH