Game Development Reference
In-Depth Information
and have them interface with legacy components is fairly important, and one way
to do so is by exposing a COM interface for your .NET components so that lega-
cy applications can use them.
Later in this chapter, an example is discussed that covers exposing a COM inter-
face for a .NET component so that legacy applications can access its functionality.
The discussion is relatively brief though, since COM interoperability is covered in
much greater detail in Chapter 32, “Using .NET Assemblies as COM Objects.”
Architecture Example
Now that the overall design of the architecture has been discussed, it is also impor-
tant that an example be presented to offer a tangible reference point for properly
designing a distributed componential architecture.
As an example, we will build a very simple solution that contains a few object def-
initions, some functionality to process the objects, and a variety of entry points to
access the tool using an assortment of different technologies.
Object Definitions
Most systems define objects that represent business entities in the system, and
these objects are typically used throughout an application in a variety of contexts
and locations. To promote strong design, it is important that these business enti-
ties exist alone in an independent library away from processing functionality.
This example assembly contains a single object named SimpleObject , and contains
a single string property that describes the name of the object.
Here is the code for the SimpleObject entity definition:
public class SimpleObject
{
private string _name = “”;
public string Name
{
get { return _name; }
set { _name = value; }
}
public SimpleObject(string name)
{
Search Nedrilad ::




Custom Search