Advancing Black-Box Reuse in a Multimedia Application Framework
by Bernhard Wagner
MET++ is a tool for producers of multimedia packages. A visual programming environment avoids the need to set up a development environment to author multimedia applications.
Multimedia production environments like Macromedia Director face the challenge of presenting inherently complex technologies in a simplified, accessible way to the multimedia producer. When it comes to interactivity that exceeds the most basic operations (eg following links, next/previous slide or start/stop animation), these production environments opt for scripting. While a proprietary scripting language allows for a vocabulary exactly fitted to the domain at hand, such an approach can become complex and cumbersome, due to limitations of the metaphors used or because ithe difficulty of scripting is often underestimated.
Like most frameworks, the object-oriented multimedia application framework MET++ has evolved into a state where most tasks can be achieved by black-box rather than white-box reuse, or by composition rather than inheritance. To avoid having to set up a whole development environment to author multimedia applications, a visual programming environment has been conceived and implemented as an orthogonal control environment to the abstractions already available within MET++.
MET++ is a portable object-oriented C++ multimedia application framework developed at the University of Zürich. It is based on the object-oriented application framework ET++. ET++ consists of several frameworks, which support the development of desktop applications with graphical user interfaces. ET++ has a layered architecture addressing the following goals: portability among operating systems and windowing systems, generic data structures, support for graphic user interfaces, and desktop applications. The abstractions in ET++ are highly integrated and anticipate all generic interaction between application components. Thus a developer using the framework need only fill predefined slots with the application-specific content.
MET++ is built on top of ET++, adhering entirely to the architecture and style defined by ET++. The multimedia extensions provided by MET++ are:
- 3D graphics
- audio and music
- time synchronization
- visual programming.
MET++ has proven its worth in numerous multimedia projects and is used in commercial applications as well.
Experience in student assignments has shown that for a developer versed in the MET++ framework, application development is very efficient. The newcomer, however, must expend significant time and effort to get used to the framework and its abstractions. The difficulty comes from the fact that, like typical frameworks, MET++ and ET++ have evolved into a state where most tasks can be accomplished by black-box reuse and composition of already existing classes. A software system functioning in a black-box manner is hard to understand if one has only the source code to examine.
This observation led to the development of an authoring environment that not only visually displays the current application as a composition of black-box components, but also allows applications to be built visually: the visual programming environment of MET++.
The metaphor of the visual programming environment in MET++ is that of a data-flow engine. Its building blocks are so-called DataUnits and DataPorts. There are several categories of DataUnits: mathematical functions, GUI components, wrappers, data containers and data mappers. The DataPorts provide the input/output to the DataUnits.
The visual programming environment in MET++ uses the Adapter design Pattern to wrap existing media abstractions, thus enabling their control from within the visual programming environment. Using this environment, a user can explore the behaviour and protocol of a media abstraction available in MET++ before programming against its API using C++.
A special DataUnit type has been developed explicitly for the visualization of data, namely, the Mapper. This unit provides the necessary infrastructure for ascertaining the number and cardinality of rectangular data and for subsequently iterating over all dimensions. The data responds to the index sets generated by the mapper with the corresponding data content, which is then visualized by the mapper. Several kinds of mappers have been developed that allow visualization as two- or three-dimensional graphics and sonification of the data.
Entire applications can be built in the visual programming environment. A special HTML-Browser has been developed that allows visual programs to be embedded in normal HTML pages in the same way as applets or flash components. Likewise, plug-ins have been developed for the Mozilla Firebird and Microsoft Internet Explorer browsers.
The visual programming environment has been successfully employed in the areas:
- interactive data visualization
- sonification of animation
- visualization of sound.
The author is currently preparing didactic material for introductory lectures in 3D graphics, using the visual programming environment of MET++. This material will interactively demonstrate concepts of computer graphics and will also contain student exercises.
MET++ material: ftp://ftp.ifi.unizh.ch/pub/projects/met++/
Commercial use of MET++: http://www.perspectix.com
Publications about Visual Programming in MET++: http://xmlizer.biz/priorArt.html
Bernhard Wagner, University of Zurich, Switzerland