|
|
|
 |
Product demonstrations
Each of these demos is designed to highlight a feature of the Janus
Product family or to provide User Language functionality to supplement
the core products. Please
let us know if you have any problems with any of this code, or if you
have suggestions for other samples we could provide.
Janus Web Demonstrations
Janus Web provides full web server functionality inside Model 204.
The product consists of a command language for building and configuring
web server ports, and a $function API that enables UL programs to
receive web requests, and build and send web pages.
|
Excel integration with Web apps
|
Sample code and instructions on how to integrate web data with
non-web browser applications, like spreadsheets. Samples on this page
include a full, object-oriented Excel class using Janus Web and Janus
SOAP methods, a SirMon extension for spreadsheet-formatting historical
performance data, and a simple comma-separate-values demonstration for
quick-and-dirty data-distribution.
|
|
Ajax
|
Ajax is an approach to interactive web design that
incorporates XHTML, CSS, dynamic page display and interaction using
the Domain Object Model, data interchange and manipulation using XML
and XSLT, and asynchronous data retrieval using the JavaScript XMLHttpRequest
method. Javascript is the key to tying all these technologies together.
It sounds confusing, but in practice anyone who's written web pages has worked with
the technologies.
The Sirius Ajax demo calls the HttpRequest method on a keystroke event,
invoking a User Language program to suggest possible valid entries for a
form entry field. The demo could be altered to respond to any event in the
browsers DOM, and the called User Language could, of course, be altered to
respond with any sort of text stream.
Ajax tutorials and primers abound, including
Jesse James Garret's primer,
The Open Ajax Group's informative site
on the topic,
Wikipedia's AJAX entry which is always evolving,
and the W3 Schools' excellent AJAX tutorial.
Clients who own a copy of any of the latest UL/SPF products can see more Ajax User Language samples
in the SIRIUS file in the code used for the webbified SirMon. Ajax
calls are embedded in the procedure MOPR-WEB.NOSCROLL. The Javascript in this proc
dynamically adds rows onto a table as each system-level performance snapshot is taken.
|
|
Upload a local file
to a Model 204 procedure.
|
File upload routine that lets you select a file off your local machine's hard drive,
and store it in a Model 204 procedure in base64 or plain-text format. Note that this routine
autoselects base64 or plain-text mode based on the suffix of the uploaded file, but it can
easily be converted to force the desired format or to allow the user to select the format.
|
|
HTML Header Parameters
|
Along with the visible html, a browser sends a set of parameters
in the "header" section of each packet sent to a web server.
Usually these parameters contain a browser identifier, a "method"
identifier and any number of other things. This demo application
uses the Janus Web functions to query the header section of a
packet and display the parameters sent by your browser, and it
uses those parameters to determine whether it should send you the
way-cool Java version of the page.
|
|
Janus Web support for Cookies
|
"Cookie" is the name given information which allows an HTTP
server to maintain state information (e.g, preferences or
selections) for a set of URLs across multiple accesses by
a particular client.
Janus Web supports cookies, and so does Strand Travel,
Sirius' favorite fictitious travel agency.
|
|
Command Level Interface
|
Allows submission of Model 204 commands to the server region.
(try "VIEW USER", or "VIEW SYSTEM", as the default user id won't
have permission to do much else).
|
Janus SOAP Demonstrations
Janus SOAP (Simple Object Application Protocol) is the product
at the center of web services. Web services provide data in XML
format over the web. The Janus SOAP API is a fully object-oriented
set of classes linked into the Model 204 nucleus that allow the building,
parsing, receiving and sending of XML documents.
A full implementation of
a web service in Model 204 includes Janus SOAP for XML processing, as well
as User Language programs to build and parse the SOAP wrappers, serve and
translate WSDL documents, and a host of other features. The following demonstration
code is provided to help you get started with web services."
|
Janus SOAP Web Service Generator
|
A Web Service is just what it sounds like: a service provided over the web.
Data is formatted into XML documents, and those documents are then "wrapped" in
further XML layers. The wrapper layers must conform to particular styles, which
the SOAP client and SOAP server must both agree on. A Web Service Description Language
document (WSDL) can be published to formalize the client-service relationship, and
to allow some clients to generate initial code. The service generater linked as
this demo can help you build your initial web service application, providing
WSDL, client and server code using the OO syntax provided in the Janus SOAP API, and
the basic APSY infrastructure code to run your service as a 204 application subsystems.
Sirius Software can send you the code for the service generator if you'd like to
run it at your own site.
|
|
Amazon Web Service Demo Temporarily disabled
(Beta Version)
|
This demo runs as a web page but opens a backend socket
to the web service at Amazon's online
retail shop,
allowing a user to search their online catalog from a remote web site.
The returned data is sent as XML, and parsed using the Janus SOAP
functions. Components are Janus Web, Janus SOAP, Janus Sockets and
an Amazon "developer's token".
This demo shows how a web request would be structured, how to open
and manage a Janus Socket, how to receive and parse HTTP data, and how
to use the Janus SOAP functions to efficiently handle an XML request.
You can see the code here.
Note that the Amazon developer's token is commented out in the User Language
code we let you see: you'll have to get your own (for free) from Amazon.
We've also developed a 3270 version of the demo. It's somewhat easier
to see what's happening on the socket because all the HTTP processing from
the previous demo is stripped out.
You can see the code here.
Again, the Amazon developer's token is commented out in the User Language
code, so you'd have to get your own (for free) from Amazon.
|
|
204-to-204 Communication with SOAP/XML and Sockets
|
This pages opens sockets into other onlines at Sirius Software,
collecting status information and formatting them for display.
|
Other Janus Downloads
|
File Transfer Protocol (FTP) Client
|
This application makes passive-mode FTP connections from Model 204, which
acts as the FTP client, to any FTP server. The code consists of a series of
Janus
Port Definitions, and a single User
Language FTP client procedure. A few, hopefully obvious, changes to the
port definitions and the configuration settings in the User Language (near
the top of the code, and clearly commented) should allow this to work
at your Janus-enabled website.
|
|
|