Form Client Task

In Pivotal Client, Forms provides the most customization. This post describes the design patterns used by Pivotal Client to provide Forms customization.

Form Client Tasks differ from Client Task Commands and Notification Handlers as Form Client Tasks are classes whereas other two client tasks are methods with attributes.

To expose form client task Strategy pattern is used. Any implementation of IFormClientTask interface can be associated as Form Client Tasks to a Client Form. A Strategy pattern has four participants, Strategy, Context and ConcreteStrategy. In Pivotal Client, FormWorkItem is Context, IFormClientTask interface is the strategy and any implementation like FormClientTaskBase is the concrete strategy.

FormClientTaskBase is the default implementation of IFormClientTask interface that comes with Pivotal Client. This implementation provides back-compatibility for migrated Rich Client Forms by first calling client script, if available. FormClientTaskBase uses another behavioral pattern, Template Method to provide extensibility. The FormClientTaskBase has all the methods as virtual, thus any subclass can override the behavior. Please note that FormClientTaskBase is one implementation provided by Pivotal Client and Customizers are free to use any other behavioral pattern like Chain of Responsibility, State pattern to implement Form Client Tasks. One alternative approach to implementat Form Client Task is to use State pattern to separate new and existing record business logic.