Introduction

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

The rapid development of HTML and related standards over the last few years has made the Web a rich and flexible medium for communication. Web pages are no longer static and passive, as was the case in the early days of the Internet. Instead, Web pages can respond to user input, execute programs, and deliver interactive content in a variety of formats, including text, images, animations, sounds, and video.

This evolution has been made possible by the emergence of a standard framework of technologies for describing and transforming Web content. This framework includes W3C specifications such as HTML, CSS, XSLT, and DOM for describing the detailed structure and layout of Web pages. These are supplemented by programming and scripting languages, such as JavaScript or Java applets on the client side, and CGI, ASP, Java, Perl, or PHP on the server side — that can be used to dynamically update Web pages in response to user input. The combined use of these technologies for delivering interactive content on the Web is collectively referred to by the term dynamic HTML.

In the past, it was not possible to apply the techniques of dynamic HTML to mathematical formulas, since there was no standard format for representing mathematics on the Web. For example, when mathematical notation is represented using images, there is no way to interactively transform the content or appearance of the formulas displayed. The advent of MathML provides a simple and effective way to overcome such limitations. Because it is an XML-based language, MathML is fully compatible with other Web technologies, such as HTML, CSS, JavaScript, Java, and DOM.

By making equations embedded in Web pages just as scriptable and easy to process as text, MathML provides a solid basis for delivering dynamic mathematical content on the Web. This opens up many interesting possibilities for communicating mathematical information, in both educational and professional contexts. Some applications of interactive MathML content on the Web include online demos, courseware, assignments, quizzes, or other instructional material, as well as services such as online testing and e-mail message boards.

Types of interactivity

The term dynamic mathematics refers to the display of interactive mathematical content that changes in some way in response to an action by the user. The types of interactivity possible can be divided into three broad categories.

First, you can use equation actions to change some aspect of an equation's display in response to an event like clicking or moving the mouse. For example, you can change color of an equation, turn it into a hyperlink, toggle between two different displays, or display a message in the browser's status bar. MathML provides the maction element for implementing such changes. However, the type of actions supported and the method of encoding them depends on the specific rendering application. These simple types of interactivity are easy to set up using a suitable tool that supports actions; for example, WebEQ or techexplorer.

Second, you can use HTML controls in combination with JavaScript programs or Java applets. This involves inserting HTML controls such as buttons, text boxes, or menus in a Web page. The controls are hooked up to a JavaScript or Java function that does some processing in response to user input and displays the result in the same Web page or in a separate window. You can use this technique to implement a much wider variety of interactive behavior than you can if you use simple actions, but the user has to have some basic knowledge of Web programming.

These two types of interactivity both involve transformations on the client side. You can achieve a greater degree of control by doing transformations on the Web server. This involves configuring a Web page to accept input from a user and send it to a server, which processes the input and returns the result back to the client. You can specify the input either by entering text in an HTML form or by authoring arbitrary mathematical notation in the Web page using an equation editor applet. By running suitable scripts and programs in the server, in any standard language, such as Java, Perl, or PHP, you can perform a wide variety of operations. You can even run specialized software like Mathematica or Maple on the server to perform computations on MathML equations and display the results in the client's browser. Server-side programming can be used to implement some very sophisticated applications, but it is also the most technically demanding.

We will see simple examples of each of these types of interactivity in this chapter. Since most MathML-content will be created and rendered by specific applications, we provide examples of developing interactive content using specific applications, such as WebEQ, techexplorer, and webMathematica.

This chapter assumes some basic familiarity with Web programming concepts such as HTML, JavaScript, and Java applets. For detailed information on these topics, you can refer to one of the many books available on dynamic HTML. The focus of this chapter is not to give an exhaustive treatment of Web programming techniques but to give you a broad idea of the kinds of interactivity possible using MathML.

   

<< back next >>

 

 

 


 

Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.


CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America