January 2, 2021
Estimated Post Reading Time ~

Experience Fragments and Content Fragments - High level differences

For reusing content, we have two great implementations available in AEM - Experience Fragments(XF) and Content Fragments(CF).

It is important to understand the differences between the two which will help us arrive at when to use what based on our project/content set up.
Experience FragmentsContent Fragments
Composed of one or more AEM componentsComposed of structured/form-based data elements

The content part of XF is any AEM components as such - Text, Image, or any custom component part of our project.
ie. Presentation-centric 
The content part of CF is text/image content in the form of direct text type/RTE/Date type/Dropdown/Reference type for referencing any asset
ie. Content-centric
Created using Editable templates, implemented/treated as an AEM PageCreated using Content Fragment Model, implemented/treated as an AEM Asset
List of allowed components in XF can be controlled via policies in Editable templatesContent in CF can be configured as different elements in the Content Fragment Model.
Different elements refer to -> Textfield, Multiline text/RTE, Date field, Dropdown field, reference field, etc.
Eg: The header/footer of a page can be designed as an XF page where the logo/image component + Navigation component can be part of it. Eg: Event details content can be designed as CF where we can configure Event Title(Textfield), Event Description(RTE), Event Date(Datefield), Any asset related to Event(reference field), Event Venue (Dropdown field)
Variations can be created out of Master XF -
  • Standalone variation by associating different Editable templates.
  • Variation as a Live Copy 
Variations can be created out of Master CF.
No Live copy action. However, there exists a Synchronization option for a variation to sync the master content -
  • This will work only for Multiline text type element/RTE + 
  • Changes will flow from Master -> Variation only
Usage: 
  • Can be used in site pages via AEM core XF component
  • Can be exposed as a plain HTML using ".plain" selector in XF URL
  • Can be exported to Adobe Target as an HTML/JSON
Usage: 
  • Can be used in site pages via AEM core CF component
  • Can be used in XF page if content fragment component is allowed via policies in the respective editable template
  • Can be exposed as a JSON via AEM content services for 3rd party consumption.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.