[Top] [Prev] [Next] [Bottom]
[Contents]
The Sapphire/Web Java Framework
The Sapphire Java Framework is provides a set of "data" enabled classes and interfaces to produce efficient, interactive Java applications in the client browser with little or no code. The business rules and enterprise "data" remains on the server and represents two-thirds of the application. The client framework implements simple display logic and as much application logic as you want, thus completing the application solution.
The framework is designed to meet the thin client paradigm and, through its unique design, uses the least number of byte codes to deliver all applications.
Web applications developed using the Sapphire Java framework run everywhere and produce applications that are ultimately scalable and very productive for the end user.
This section describes in detail the major classes and interfaces of the Framework, parameters, and the script API for the Sapphire Java Data Control.
The Sapphire Java framework contains three packages: Sa, SaVj, SaC.
- 1. The Sa package is the base framework and contains the key framework classes.
- 2. The SaVj package is a framework extension which allows the building of framework views from any Java development system.
- 3. The SaC package contains a number of classes which implement key interfaces of the framework. These provide field validation, field formatting, statistics, and data transforms instances.
The source for the framework is also provided. We included the source for several reasons: as a form of documentation (some learn by looking at code), as a way of learning Java, and to allow inspection of the client framework code that you will be using. Java is too important for us to hide. The code is built on JDK 1.0 and is written purely in Java.
A vendor who does not provide source is either proprietary, hiding multiple native methods, or has unresolved design issues to hide. In both cases, they are not meeting important requirement of the Web: openness and standards. The source is however protected by the license agreements that come with the Sapphire tool.
The docs directory under the saclasses directory contains HTML files generated from javadoc
which further document the framework.
To install the framework on a Web site, copy the Sa, SaVj, and SaC directories from the saclasses directory of Sapphire to an saclasses directory at the document root of the Web server. Do this for any framework updates. Install additional classes in the same place.
If you wish to change this directory just change the codebase tag in the applets and move the class files to the corresponding directory. The class files were built using the JDK 1.0.2 Java compiler with optimization turned on. If for any reason you rebuild these class files (not recommended,) you should build in the same manner as we did.
The Framework contains two classes derived from java.applet.Applet.
The Sapphire distribution contains several tutorials that show the use of these two classes. In addition, a pre-built Sapphire project showing several applications built around the drill down applet, javaclient
, demonstrates key framework capabilities and contains a set of on-line HTML documentation files.
The Sapphire framework works off the paradigm of a master view of a data rowset and as many detail views related (although not required) to the selected row of the master. Each can perform insert, update, delete, login, and refresh.
You specify an instance of a framework application through the applet tags. This minimizes the number of classes used, which reduces the download time to the client and its memory usage on the client box. It also produces a common look and feel across many applications which can be updated easily when a newer version of the framework is installed. It also allows many applications to be written and deployed without writing any Java at all.
In fact, you can design many applications with no code whatsoever and no extra byte codes are used.
Applet tags which end in a number are sent to a detail of the same number. Tags without the trailing number apply to the master view. The framework uses generic text view classes for the master and detail views by default. You can change any view with the applet tag rsview
. The framework also contains a graph view.
The framework is extensible. For example you could add you own generic view classes (inherit from the Sapphire base classes). These can then be used by others in your development team, who will again have to write no lines of code. Just add a parameter tag to the applet and the Sapphire framework will load the view class dynamically. You can design view classes by plugging in existing Java classes (spreadsheets, graphics, statistical analysis, ORB's).
There are two types of view classes - pop-up detail views and master views. Usually you implement the master view and the pop-up detail is simple wrapper code around it. The framework contains 2 base classes specifically designed for building specific view classes which integrate with your Java development system. A typical process for creating a project utilizing Java would go as follows on the NT platform:
- 1. Using Microsoft Visual J++, build a view template with their layout tool and component palette writing no lines of code.
- 2. Use the Visual J++ resource wizard to produce the Java view class for that view.
- 3. Use the Sapphire Java class wizard to produce the framework views.
- 4. Build the classes and move them to Web site (if not already there).
At this point all the Java bytecode is completed and some HTML parameters merely need to be added.
- 5. Change or add the
rsview
tag. You are done. No lines of code needed to be written. The application runs everywhere and works in a similar fashion for all Java development systems.
You can add as much Java code to the generated view classes as you want. You can leverage the Sapphire framework API in doing so. Sapphire provides the data exchange functions between the view and the data rowset. It also contains a rich set of data validation routines.
The class Sa.SaJavaDrill.class implements the Sapphire drill-down framework. It builds large scale database applications through applet tag specification.
The framework provides generic text and graph views, can integrate specific views designed with GUI painters, the ability to integrate third party classes from the growing Java component industry, and the ability to integrate generic and specific views designed by you. The Framework provides these additional capabilities:
- 1. Help framework
- 2. Data validation routines in Java and through powerful interface implementations loaded through applet tags.
- 3. Data formatting routines in Java and through powerful interface implementations loaded through applet tags.
- 4. Data exchange functions with all
awt
components and with any other component whether GUI or non-GUI.
- 5. Integrated support to invoke the browser from within the framework.
- 6. Dialog framework.
- 7. Statistics calculation routines through powerful interface implementations loaded through applet tags.
- 8. Data transformation routines through powerful interface implementations loaded through applet tags.
- 9. Searchable view capabilities.
- 10. The ability to "page" through data.
- 11. Login with encryption.
- 12. The ability to define your own encryption.
- 13. The ability to dynamically change the data validation and data exchange functionality.
- 14. A powerful message passing mechanism available to any framework view so that you can design your own applet tags or ease third party Java class integration.
- 15. The ability to run in stand alone mode without a Web browser.
The Sapphire framework leverages the most powerful Java technologies to deliver a thin client solution that is unrivaled in performance, polish, scaleability, and productivity. Several of the key elements are its use of Java interfaces to overcome the single inheritance limitations of Java and its use of dynamic inheritance through class factories and dynamic loading of classes.
- The heart of the framework is the class Sa.SaJavaRowSet. This class provides a programmable object in the client browser. The framework is built around this class.
- The Sapphire framework allows the class factory for the row set to be replaced dynamically thus allowing you to override or change key functionality without changing the framework.
- The Sapphire framework contains 2 generic text view classes (the framework default):
- Add data validation checks and format transforms through simple applet tags. These powerful interfaces are for the end user, developer, and enterprise's benefit. See the discussion below for more on this powerful technology.
- The Sapphire framework contains 2 generic graph view classes:
- Add format transforms through simple applet tags. Add statistics and data transforms. These powerful interfaces are for the end user, developer, and enterprise's benefit. See the discussion below for more on this powerful technology.
- The Sapphire framework contains 2 generic base classes for integration of views generated from any Java development system:
- Provides data exchange functionality with
awt
and the embedded rowset.
- Add data validation checks and format transforms through simple applet tags. These powerful interfaces are for the end user, developer, and enterprise's benefit. See the discussion below for more on this powerful technology.
- The interface, Sa.SaFieldCheck, is used for designing data validation routines which can be dynamically loaded and applied to any rowset with simple applet tags. Sapphire's framework contains a variety of class implementations of this interface. Design once, apply anywhere. Need a change later? Update the class, all applications get the change. Field checks are applied to data that the user enters before an insert or update in sent to the server. They provide very readable and friendly messages to the user.
- This saves the network, the HTTP server, the database, and the enterprise from wasted processing just because the user made a typo. It also eliminates the user waiting for the error message and keeps them concentrated on their work, thus boosting the productivity of all involved. They also give a better message to the user than a database may (ugly error codes and messages too tied to SQL).
- It is anticipated that an enterprise data object (stored procedure, database rule, or check) may do final validation. This is an optimal scenario: fast, efficient, and user friendly field check and enterprise rules so that all input operation logic is used every where). You can also apply validation logic in the server application process, but this is less desirable since logic tends to be duplicated).
- The interface, Sa.SaFormat, is used for designing data format routines which can be dynamically loaded and applied to any rowset with simple applet tags. Sapphire's framework contains a variety of class implementations of this interface.
- The interface, Sa.SaStatistic, is used for designing statistics which can be dynamically loaded and applied to any rowset with simple applet tags. Sapphire's framework contains a variety of class implementations of this interface. Design once, apply anywhere. Need a change later? Update the class, all applications get the change.
- The Sa.SaDataFilter interface is used for designing data transforms which can be dynamically loaded and applied to any rowset with simple applet tags. Sapphire's framework contains a variety of class implementations of this interface. As with the other interfaces, design one and apply anywhere. Update the class in the future and all applications get the change. You could rotate data, integrate, do DSP operations, moving averages, etc.
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.