Do Take Shortcuts

Renderer plug-in classes must extend the prescribed abstract base classes identified earlier in this guide. However, the extension does not have to be direct. There is no prohibition against creating new base classes custom renderers or extending other custom renderer plug-in classes as long as the prescribed abstract base class is an ancestor class of any custom renderer class. This option can be exploited to share code between custom renderers more effectively and to develop renderers that are variations on other renderers without implementing all the code from scratch. Note however, that the extension of the CDEJ renderer plug-ins for custom widget development, is not supported in the Cúram application.

Widget development, particularly in the area of creating and manipulating DOM nodes for the HTML content can be repetitive. Consider writing a simple utility class to wrap up common operations, such as checking if a string value is null or empty before setting an attribute on an element, or creating and appending text nodes.