Google
Webwww.sanchivi.com
The User Interface Validator Pattern

Structure

Participants Name

  • Rule: An abstract interface that represents a rule that can be applied for an user interface element on the screen.

  • ConcreteRule: A specific implementation of a validation rule rule that is persisted in the data store.

  • RuleEngine: Reads rules from the persistent store for a given screen and applies them in the order specified.

  • RuleSequence: Defines the order in which the rules have to be executed by the RuleEngine.

  • RuleStore: An interface for storing rules and RuleSequence for each screen.

  • ConcreteRuleStore: An implementation of the rule store.

  • AbstractRequestHandler: The server side processing object for the request from the client. This will run the rule engine for the screen and if the engine validates the rule successfully, forwards a message to the actual request handler.

  • ConcreteRequestHandler: Handles the actual server side request. This object when invoked, knows that the base class has already finished all the validations so it can continue with actual request processing.