This chapter provides an introduction to one of the most important underlying concepts of VoiceObjects for application design – the modular concept.
Developing applications with VoiceObjects is an object-oriented (OO) approach. As in OO programming languages the VoiceObjects platform is based on objects of different types, each of which provides specific functionality, representation and properties. Object instances are created from these object types each with its specific configuration. They can be used wherever that particular kind of behavior is needed.
This modular approach lends itself to advantages such as inheritance and easy reusability of components.
Within Module objects, global settings can be specified for event handling (e.g. No Match, No Input, help, etc.) dialog navigation and tuning that are inherited by all underlying objects. The inheritance of properties from a start object to its child objects makes it very easy to quickly define consistent navigation (via hyperlinks), tuning parameters and event handling that can be managed in one central location. You only need to define the settings once on a very high level in your application, e.g. in the start object, and have the same settings apply on every sublevel you want.
In addition to selectively overwriting settings inherited from parent objects, you also have the possibility to completely disable the inheritance of particular properties. Disabling inheritance is possible for every object that represents an input state, like an Input, Menu, Confirmation, List, Pause or Recording object. Objects with inheritance disabled will not inherit properties from its parent objects. Nevertheless, their own children may inherit properties defined in the respective object.
The other great plus that comes from the object-oriented approach is the re-usability of previously created objects. Each object provides a specific configuration and may be used wherever this specific kind of behavior is needed. An object is created just once, but can be used multiple times within different contexts.
This points out a core development rule for working with VoiceObjects: Objects should be defined in a way that enables maximum re-usability. Re-use should be possible in the case of single objects as well as for complete object sequences. When following this rule development and maintenance efforts can be reduced significantly.
So for example, collecting a phone number from the caller is the same procedure whether the caller is downloading ring tones for their cell phone or booking a flight ticket. Therefore the sequence of dialog steps necessary to collect the phone number should be implemented as a generic Module object that can be re-used in multiple applications.