Titan Code: Naming Classes

Naming Specialty Classes

This article is a work in progress... I want to document the naming conventions I'm going to use in the Titan Base code in V6 so that everyone will know what type of "thing" they need to the task at hand. If you have feedback, please leave a comment below.

Commonly Accepted Terminology

So that we are all on the same page, I’ll submit that the following are consistent with the accepted definitions and standard patterns in software design:

  • Wrapper classes provide methods that add functionality to other existing methods, usually by passing extra parameters.
  • Façade classes provide methods that are simpler, more readable and more convenient ways for calling other methods.
  • Helper and Support classes provide methods that do common subtasks that make up larger, more complex tasks.
  • Proxy classes provide methods that do something for you with another class or method that is usually more complex or performs some low-level operation.

Titan Terminology

In the Titan base code, I'd say that most of our classes are best described as "Service Objects" in that they perform a service, like transfering data back and forth from the database. We do have a few classes that are best described as "Business Objects" in that they store stateful information about some theoretical entity in our system. The latter are quite rare.

In v6 I'm going to use the following naming conventions for service-like classes:

[*]ServiceProxy

These classes refer to proxy objects for WCF Services. Think of them like the Web References classes created by Visual Studio to call to the ASMX web services.

Examples:

  • AppControlServiceProxy - This is the proxy class for calling WCF Services that implement IAppControlService
  • SiteNavigationServiceProxy - This is the proxy class for calling WCF Services that implement ISiteNavigationService

[*]Service

These classes refer to object that provide a simple API for calling to the WCF Service proxies. 

Examples:

  • AppControlService - This is a façade class that calls the AppControlServiceProxy
  • SiteNavigationService - This is a façade class that calls the SiteNavigationServiceProxy

[*]Support

This is the legacy naming of objects that exist to support some UI feature of either the Display or the Wkst. They typically do more than just call a service for data. They may inject special Exception handling and/or data processing.

Examples:

  • NavigationSupport - This class provides static methods that interact with the NavCache.

 

 

top