Developers
cancel
Showing results for 
Search instead for 
Did you mean: 

DXM Template Development Training

Introduction to Component Library

Introduction

Component Library is a framework built on top of the underlying CMS templating mechanism – it does not introduce any new APIs or systems.

The framework has three primary objectives:

  1. Change the focus of DXM implementations from code-oriented to markup-oriented. This is achieved using code generation to automate many of the routine programming tasks required in a standard templating implementation.
  2. Reflect industry interest in design systems and component-oriented design systems like Pattern Lab in particular.
  3. Set up the foundations for drag-and-drop content authoring.

Components, by definition, will be fragments of markup or content. We have previously seen another mechanism used in the CMS to represent fragments of markup: widget templates. However, there is huge difference between components and widgets.

Components represent a fragment of MARKUP and are intended to help you share code — you will have multiple CTA buttons across your site for example, that share the same appearance and functionality but each is unique in terms of the text it displays and the target that it points to.

Widgets represent fragments of content and are intended to help you share content. A banner widget that appears multiple times across your site is a single content asset that is being reused.

Widgets can, of course, be implemented using components, but components are not widgets.

Elements of Component Library

Component Library provides facilities for developers to create four types of definitions:

  1. Component Definitions
  2. Layout Definitions
  3. Nav Wrapper Definitions
  4. Template Definitions

Component Library translates these definitions into elements in the project folder.

Component definitions are used to generate C# class files that contain all the input, output and post-input code for the component.

Layout definitions are used as layout controls in the nav wrapper and template definitions.

Nav wrapper and template definitions are used to generate DXM templates that use the generated component classes.

This is a visual representation of these elements and the relationship between the definitions and the resulting generated code. All of the green elements are the Component Library definitions, the orange elements are generated source files. The blue content elements and the purple model elements have no direct link to component library, they are elements of any DXM implementation and would have been created the same way as the standard templating and content management approach.component library overview.png

The series wraps up with an article on installing Component Library.


Labels (3)
Comments

The last paragraph refers to a visual representation of the elements but that doesn't seem to be included or can I simply not see it?


This is a visual representation of these elements and the relationship between the definitions and the resulting generated code. All of the green elements are the Component Library definitions, the orange elements are generated source files. The blue content elements and the purple model elements have no direct link to component library, they are elements of any DXM implementation and would have been created the same way as the standard templating and content management approach.

 

Version history
Revision #:
10 of 10
Last update:
‎06-11-2019 10:23 AM
Updated by:
 
Contributors
Looking for more?
Ask in Discussions
Developers

Peer-to-peer support  and answers on developing CMS templates, modifying privacy scripts or building integrations.

Digital Experience Management

Find answers and ask questions on content management, personalization and targeting.

Digital Quality Management

Find answers and ask questions on WCAG and SEO quality management.

Digital Governance

Find answers and ask questions on consent and monitoring solutions.