webMathematica Advanced Techniques

Tom Wickham-Jones
Director of Kernel Technology
Wolfram Research

This talk covers more advanced topics of webMathematica. It will review how to integrate webMathematica with a variety of client and server technologies.

Please note that this notebook is optimized for display by Mathematica 4.2. Also that it may refer to hyperlinks that are not included in the file archive.

Initialization

Off[General::spell];
Off[General::spell1];

SetDirectory[
        DirectoryName[
          ToFileName["FileName" /. 
              NotebookInformation[ SelectedNotebook[]]]]];

Calling Java APIs

Java posses a vast range of APIs. Thanks to J/Link completely available to webMathematica.

One interesting example involves using the Java Speech API. This makes speech generation very accessible, these examples were put together in a few hours...

http://localhost/webMathematica/MSP/Sound/Integrate

Slide show of the steps involved.

Basic example of speech generation, could be extended say in education or where vision is impaired, partially sighted or small device output (eg phone).

Calling Java APIs continued...

Many more features from Java APIs, for example database access.

A lot of webMathematica functionality can be built to use this, eg file upload, session support etc...

Some of this has been built into web Mathematica 2.0.

Database Access

The Mathematica Data Base Access Kit, offers access to ODBC support on Windows.

An alternative is to use JDBC, with J/Link. This gives support on all platforms, and may be useful for a mix of Java and Mathematica. JDBC.nb.

Document Generation

HTML provides one type of document, but various disadvantages:  printing, storage. Quality not so high.

Other document formats:

Mathematica contains commands, so easy to generate.

Read Notebooks with Mathematica or MathReader, requires some client setup.

PDF easier to work with on the client, viewers very prevalent.

Common way to generate via Notebooks then convert to PostScript and then to PDF.

Also, Java APIs to generate PDF.

Building Large Web Applications

webMathematica technology can be used to build more sophisticated sites.

Since webMathematica is built from standard web technology it makes ready access to standard web technology.  This is a key advantage.

Now we can follow 7 steps to build and deploy webMathematica sites.

General Web Services

Beyond the basic browser/server model, to a more general site.

Web based services.

There are many possibilities with webMathematica.

Summary

Basic webMathematica technology: provides computation and visualization to the web.

Advanced webMathematica technology, draws on the following features:

Works well with emerging XML standards such as MathML, and SVG. 
(Many mathematical and scientific applications here.)

Interact with Java APIs ⟹ many extra features, database support, speech generation...

Specific features: XML manipulation, file upload, JSP custom tags, session support, PDF generation.

The construction of websites that integrate all these components.

Techniques for using these features were examined and example web sites were studied.

webMathematica 2.0, provides many of these advanced features.