Mixing Simple Custom Widgets with UIM

The complexity of a widget increases as it assumes more and more control over the layout of more and more data. If a presentation requirement cannot be met using only UIM, the developer may need to create a custom widget. However, the complexity can be reduced by developing only the widgets that are absolutely necessary and using UIM as much as possible to achieve the goal. The developer should assess if a combination of UIM with several simple widgets could achieve the desired result, or if a full, single custom widget is the only solution.

The developer can use UIM clusters, lists and fields in various combinations to produce HTML output that is close to what is required. The developer may then associate simple custom widgets with individual fields, replacing the default HTML content for those fields with custom content. Further, the developer may replace the presentation of a cluster on the page with a presentation produce by a single custom widget, which still using UIM clusters elsewhere on the same page. The combination of default content for the main layout of the page with changes to the content for individual fields or individual clusters, is generally easier to achieve than using a single custom widget to produce all of the page content.

Constructing pages from several, simpler custom widgets reduces the complexity of the individual widgets. It also results in a number of simpler widgets that are much easier to reuse in other contexts. The developer may identify that some widgets could be developed in a way that makes them a component of the solutions to the differing requirements of several pages. In this case, the alternative approach of a single custom widget that can only satisfy the requirements of a single page, is likely to be more complex to develop and result in further development of other complex widgets for other pages with little reuse.