DDC Technical concepts
To integrate external data into the WebSphere Portal, we hook into the IBM Digital Data Connector framework (DDC) framework.
- We can write a DDC plug-in for the WebSphere extension registry.
This approach provides full flexibility but requires creating and deploying Java code.
- If the external data is available in XML format, use the generic XML DDC plug-in to integrate the data.
In this case, we do not have to write any code. Instead, we integrate data that comes from a specific XML data source by deploying a list-rendering profile.
- Use a combination of both approaches.
In such a setup, we typically create a custom DDC plug-in that delegates loading and transformation of XML data to the generic XML DDC plug-in. Use the custom plug-in to determine the correct source URL based on the current rendering context. For example, the plug-in can generate a specific product query URL to an e-commerce server. basing the query on user preferences, request attributes, user agent, and other context information. The custom plug-in can modify the bean list objects returned by the generic XML DDC plug-in delegate. For example, we can add extra attributes computed from the data contained in the original bean list object.
The following list shows and describes the main building blocks of the DDC framework.
- DDC plug-in
- Java plug-ins hooked into the DDC framework. DDC plug-ins implement the interface
com.ibm.portal.wcm.plr.BeanListProvider
...as defined by the public Digital Data Connector Java API.
DDC plug-ins load external data and transform this data into a generic data structure that can be rendered using list appearance components.
WebSphere Portal v8.5 comes with two preinstalled DDC plug-ins:
- A DDC plug-in for integrating social data made available by remote IBM Connections servers.
This DDC plug-in is used by the social lists feature.
- A generic XML DDC plug-in.
Integrate arbitrary remote XML data. We do not have to write or deploy more Java code.
- Bean list
- Abstract data structure that a DDC plug-in generates based on external data. DDC always represents external data as a list. We can generate detail views for individual data items using lists of length 1. Individual bean list objects can be transformed into markup using list appearance components.
- List-rendering profile
- A list-rendering profile defines the set of attributes available in the beans contained in bean lists that a DDC plug-in generates. The generic XML DDC plug-in supports list-rendering profiles to define the mapping between the XML data structure and the actual attribute values. We define this mapping by associating the attribute definitions in the profile with individual XPath expressions.
- DDC selection rule
- Rules we can create in the WebSphere Portal Personalization component or in WCM Personalization components. A DDC selection rule is a Personalization rule of type Select Action defined to work on the Pluggable Resources resource collection. We do not have to add any additional properties or selection criteria to this rule. This rule is used to trigger the DDC framework.when you render the selection rule in a personalization component.
- List appearance
- WCM Personalization component containing or references a DDC selection rule. Markup fragments generated during rendering of the lists. Individual data fragments the DDC plug-in loads can be referenced by the list appearance using the [AttributeResource] tag. This reference mechanism works the same way as rendering Personalization components that select data from the Web Content or the Web Components resource collections. The set of supported attributeName parameter values for the [AttributeResource] tag depends on the specific DDC plug-in and the list-rendering profile that we use.
The list appearance also defines the paging behavior of the list.
Depending on the context, the term "list appearance" can be used in variants. If we use a specific list appearance component to generate a detail view of an individual item represented by a list of length 1, the list appearance component is also referred to as "details appearance". If the same List appearance can be used for both generating list views and detail views, it can also be referred to as "appearance" component.
- List-rendering context
- Context the [Plugin:ListRenderingContext] rendering plug-in generates to control the contents of the lists. This context includes all of the following information:
- Which DDC plug-in to be called for building the bean list object from the actual external data
- The selected list-rendering profile
- A list of custom attributes
- Access to the current portlet request and response objects
- A reference to the currently rendered list definition content item.
The addressed DDC plug-in then evaluates the list-rendering context so that it can query the appropriate set of remote information. We can establish the list-rendering context by adding a [Plugin:ListRenderingContext] WCM tag to the presentation templates. We add this tag before you include the Digital Data Connector design component.
- List definition
- The list definition is a WCM content item. It holds the following items:
- Information needed to establish the required list-rendering context
- A reference to a list appearance component responsible for generating a specific visual design for presenting the data contained in the resulting bean list object.
To render an individual list, you render the corresponding list definition content item in the Web Content Viewer portlet. To generate the actual list markup, the presentation template used to render the list definition content item proceeds by two steps:
- First, it writes the [Plugin:ListRenderingContext] to establish the list-rendering context.
- Then, it renders the component reference to the list appearance component.
Parent IBM Digital Data Connector (DDC) for WebSphere Portal