Example-Based Technique
TERMINOLOGY:
- "Application" refers to the program you are building.
- "Example" refers specifically to one of the example applications
presented with ET++, each illustrating some aspect of the framework.
- "Original object model" is the object model of your application.
We need not assume this object model was created with ET++ in mind.
- "Original dynamic model" is the dynamic model of your application.
We need not assume this object model was created with ET++ in mind.
DESCRIPTION:
- Based on the requirements, define the functionality to be sought and
find a suitable example.
INPUTS: Functionality of application, set of examples
OUTPUT: Example containing functionality and set of use cases.
- Run the examples provided. Select for further examination the example
that contains the maximum coverage of the functionality sought. If there
isn't one example that contains the entire range of functionality, find
the largest set of functionality that is covered by one example, and concentrate
on implementing just that set for now. Record the example used and your
rationale for selecting it.
- Compare the original object model to the example. Which classes from
your original object model seem to have a corresponding object in the example?
(Run the example and explore its range of functionality to determine what
components are likely to be objects: What window components exist? What
components respond to user events? Build use cases to illustrate the system
functionality you discover.)
- Use your original dynamic models for the classes identified in b to
determine which operations are supported by the objects in the example.
Are there operations in your original dynamic models which are missing
from the example?
- Execute and study the example selected, with respect to the functionality
being sought. Build an object model of the example, selecting appropriate
features.
INPUTS: Example and set of use cases, original object model
OUTPUT: Event traces and object model for example
- Based on the increments, find the set of use cases for the functionality
in this example which is relevant to the OMT system. For each use case,
build an event trace that shows how the classes you identified above interact.
- Run the example. For each event trace:
- Find an object onscreen that participates in the event trace. Remember
that objects in ET++ can be user-created objects, window components, etc.
- "Inspect-click" on the object you have identified. This brings
up a list of all objects existing at that point on the screen. Select the
topmost object listed that handles the functionality, and edit its source.
Now we have reached the code for a class responsible for handling a portion
of the functionality sought.
- Use the class definition and implementation to discover how this class
handles the events you have identified in this event trace. Search through
the code for this class to discover the attributes which are modified and
the methods which are called; if you cannot locate a class operation which
handles an event, remember to use the hierarchy browser to investigate
the code for the ancestor classes as well. Does the implementation require
objects which you have not identified in your original object model? Update
the event trace correspondingly if so.
- Using the information discovered, incorporate this class into the object
model of this example. Record the attributes and operations you encounter
as you trace through the code. Record relationships between classes.
- While there are still classes in this event trace that haven't been
fully documented, select another class from the event trace. Access its
code either through "inspect-clicking" or directly through the
code browser. Return to step iii.
- Once all of the relevant classes in all the event traces for all use
cases are in the object model, go on to step 3.
- Add new needed features.
INPUTS: Event traces and object model for example, original object model
OUTPUT: List of classes from example to add to application
- Compare the object model for the example with your original object
model. Determine which classes from the example will have to be added to
your original model. Determine which attributes and operations are missing
from your original object model that will have to be added to the class
definitions.
- Instantiate solution.
INPUTS: List of classes from example, application
OUTPUT: New version of application
- Add new classes to your program. Modify the class definitions and implementation
from the example to fit your application.
- Add new attributes and operations to existing classes. Find the code
corresponding to the initialization of the attributes and the necessary
operations; modify it as appropriate to fit your application. Write the
code which is necessary to extend the functionality for your application
or to integrate the new functionality with the existing system.
- Return to step 1 to implement the remaining functionality.
The following must be turned in: 1. List of examples chosen and rationales
for their selection. 2. Use cases, event traces and object models for the
relevant functionality of each example. The order in which you created
the event traces must be indicated.
Web Accessibility