Component templates vs component service

The two component models and how they compare

Component templates model

component templates model
Figure 1. The Component templates model
1 In the component template model, component HTML is developed in the local environment and hosted in Git as a source of truth (which makes versioning more difficult).
2 CSS and JavaScript are minified with build tools and then hosted in a Git repository.
3 HTML is copied from the Git repository (commonly a locally-checked-out copy) to the Squiz Content Management System (CMS) as a part of the Component Template Paint Layout (front-end output) and the edit layout.
4 Implementers must perform the following tasks:
  • Manually copy and paste, or utilize an SSJS approach to render through referencing HTML in Git Bridge.

  • Manually implement appropriate keyword replacements.

  • Create and maintain separate metadata schemas.

5 Minified CSS and JavaScript is referenced globally via a Git Bridge Asset.
  • This makes versioning more difficult.

6 The component and static files are rendered by Squiz CMS.

Component services model

component services model
Figure 2. The Component services model
1 Component Code (HTML or JS) developed in local environment and hosted in Git.
2 Static files (client side) hosted in same Git Repository.
3 The version of the Component is deployed to the Component Service (management), and rendered through the Render Service.
4 Component instance stores data (as per component manifest).
5 Reduced CSS or JavaScript is referenced globally through a Git Bridge Asset.
6 Component code and content rendered by CMS.