Guidelines for Customizing Plug-in Wrappers

It is recommended that you apply the following guidelines when configuring a plug-in wrapper:

  • Use a plug-in wrapper exclusively to implement methods that manage the life cycle of an individual control or field.

  • Do not include any other logic in a plug-in wrapper.

  • Do not include business logic that modifies the user interface state.

  • Use a physical renderer, exclusively, to send user action events on a field to the presentation model. Use the presentation model to do all the actions that require modifying a state.

  • Allow the plug-in wrapper to rebind the new presentation model state to the rendered control only after the presentation model finishes modifying the state of the logical user interface.

  • Do not use a plug-in wrapper to add presentation attributes to the Document Object Model (DOM). Examples of these types of attributes include: position, color, or any other styling attribute. To modify a presentation attribute, you must attach or detach a style that you define in a CSS file.

  • In most situations, if you add a plug-in wrapper, then you must also add a corresponding physical renderer that interacts with the plug-in wrapper. Typically a plug-in wrapper is used to add custom logic to controls in the client. This logic determines a physical behavior that requires a physical renderer to do the handling for this wrapper.