If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

When reviewing the Aptify Software Development Kit (SDK), a developer may notice that the Aptify.Framework.BusinessLogic.GenericEntity namespace includes an AptifyGenericEntity class and an AptifyGenericEntityBase class. These two classes serve different purposes within the Aptify Framework:

  • AptifyGenericEntityBase defines the interface and base implementation of the Generic Entity object.
  • AptifyGenericEntity contains the complete implementation of AptifyGenericEntityBase.

When assigning variables and passing them throughout the system, especially as parameters in public or protected methods, use AptifyGenericEntityBase. When creating a new Entity object, the AptifyGenericEntity is used as the super class. In other words, Entity objects should inherit from AptifyGenericEntity, which is the complete implementation of the Generic Entity. When you sub-class, you want to start with the complete implementation and go from there.

The separation was necessary to eliminate direct circular references between assemblies in .NET. For example, the AptifyApplication object references the AptifyGenericEntityBase object in order to support methods like GetEntityObject which returns a reference to an AptifyGenericEntityBase object. AptifyGenericEntity references the AptifyApplication object in order to use some of its standard methods. That is allowed by .NET, but what is not allowed is for AptifyApplication to reference AptifyGenericEntity and AptifyGenericEntity to reference AptifyApplication. By splitting the GE into the GE and GEBase, a level of indirection is introduced and that indirection allows for the desired functionality inside the Framework.

  • No labels