Reusability and Class Structures

 This presentation is part of the Reusability and Specialization e-Learning Course.

Transcript

A robust class structure is the foundation of reuse throughout your application. The PRPC recommended class structure design pattern offers flexibility in your design and provides for more levels of reuse. 

There are 4 distinct layers in the PRPC best practice class structure design pattern:

  1. PRPC Shared Product:  The PRPC Shared Product represents the out-of-the-box Process Commander classes such as Work-, Work-Object-, Work-Folder-, Work-Cover-, and Data-
  2. Enterprise Shared Product Layer:  The Enterprise Shared Product Layer is a library of extensions to the PRPC base functionality.  You should always include this layer.  It is rare, but this layer may be omitted in some very small one-off applications.
  3. Generalized Application Layer:  The Generalized Application Layer represents a generic base application to use as a framework for application instances.  Here you will define most of the rules for your base application.
  4. Organizational and Specialized Application Layer:  The Organizational and Specialized Application Layer represents an organizational application instance.  Here we will be implementing the generic application.

For more information about this class structure design pattern, see the PLC course titled Class Hierarchy: Designing for the Enterprise.

The class structure provides the first and most important layer of reuse and specialization in PRPC due to its precedents in the rule resolution algorithm.  For more information about Rule Resolution, see the PLC course titled Rule Resolution: Understanding Key Principles.

The class structure provides you with a hierarchy in which rules can be placed.  The higher a rule is in the hierarchy, the more potential reuse there is.  However, a rule can only reference other rules at the same level in the hierarchy or higher.  For example, a rule X at class A- cannot call Rule Y defined at A-B if no rule Y exists at A-. 

The key to a good class structure is that there are enough layers and classes to hold the most fundamental levels of reuse but not too many that it becomes cumbersome to navigate and unclear as to the intent.

Shared RuleSets provide a grouping mechanism for sharing both class resolved and non-class resolved rules.  For example Rule HTML properties and utility functions are non-class resolved.  RuleSets are key to reusability as they are the mechanism by which shared rules are moved to different rule bases and/or environments.


50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.