Game Development Reference
In-Depth Information
An alternative is to develop a software liaison, which is basically an application
that exposes the public interface to clients and handles the communication and
extension of functionality between the frameworks. This approach works great for
situations where source code is inaccessible, or the base frameworks should not be
Lastly, if source code is available, the cleanest solution is to bridge domain gaps by
providing missing functionality, or remove domain overlaps through refactoring
Cause: Entity Overlap
When more than one framework presents the same entity in a particular problem
domain, each from a different perspective, the composition of these frameworks
requires that the related entities be composed as well. This problem is known as
entity overlap , and it occurs when the same problem and entities are modeled dif-
ferently between multiple frameworks. Entity overlap is a common problem when
composing multiple frameworks, and the solution can be fairly tricky due to the
cohesive nature of entity classes and their need to sometimes notify the other
frameworks when certain actions occur.
One solution to the problem of entity overlap is the use of multiple inheritance,
but this method presents a problem when properties of an entity are not mutual-
ly exclusive. Multiple inheritance accomplishes the composition objective by han-
dling the conversion between related entities in the frameworks and routing nec-
essary events. It is possible to use this solution in development environments
where source is inaccessible and cannot be modified.
An alternative solution is to use aggregation, where an aggregate class is used to
represent a framework in parts. Each aggregate class is the entity definition for the
application, but this approach requires that source code be available so that all ref-
erences to a particular entity can be changed to point to the new aggregate classes.
A drawback to this solution is that all interfaces for each representation of a cer-
tain entity must exist in the aggregate class, and there is a lot of additional over-
head when using aggregation to bridge domain gaps.
A final solution is through the use of subclassing, where each framework is sub-
classed and each subclass handles the bidirectional communication of updates and
conversion between other subclasses. Additionally, each subclass must override the
operations in the superclass. This solution can also be used in situations where
source code is inaccessible and cannot be modified. The major drawback of this
Search Nedrilad ::

Custom Search