Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Implementation ideas

What we have:

  • DeviceDetection which identifies the type of device with which the user is visiting the current page
    • Is done in the filter chain
    • Info is added to the aggregation state
  • Channels "A channel allows you to deliver the same content in a different format or deliver content that is exclusive to a particular type of visitor."
  • TemplateVariation that
    • "[..] can be used in a number of ways, for example to reformat content for devices like smartphones and tablets, or specific output for groups of logged in users."
    • See: Configuring variations in a page template

What we need:

  • Facet detector that adds one/or multiple facet(s) to the aggregation state (or request)
    • Should be chainable, i.e. multiple detectors can be in the filter chain depending on the needs (after/before cache)
    • Any amount of detectors can be present
    • get/setChannel in AggregationState should be deprecated and delegate to a "Channel" facet because it is actually just this  
  • Personalization-aware renderer that
    • Selects the appropriate subnode (page variant)
    • Wrapper that delegates to for example STKRenderer
  • UI Components to
    • Add/associate segments with a page (variant)
    • Create/edit segments
  • FacetManager / SegmentManager that can retrieve all available facets/segments

Sample Filter Chain & RenderingFilter details

Image Added

  1. FacetDetector add facet to AggregationState or Request (possibly at different levels, i.e. before/after cache)
  2. Another FacetDetector adds more information
  3. In the
    Javadoc
    0info.magnolia.rendering.engine.RenderingFilter
    a
    Javadoc
    0info.magnolia.jcr.decoration.ContentDecorator
    decides where to get personalized contents from (subnodes/mixins/properties) and wraps them
  4. Javadoc
    0info.magnolia.cms.core.AggregationState
    contains all facets relevant to the current rendering
  5. Javadoc
    0info.magnolia.rendering.renderer.Renderer
    renders content
    1. TemplateVariationResolver resolves template configured for variant (see: 
      Javadoc
      0info.magnolia.rendering.template.variation.RenderableVariationResolver
      )
    2. DynamicContentElements are rendered by ComponentRenderer and are Facet/Segment-aware

Note: The AggregationState should only contain one specific facet (class) (i.e. channel, device, etc.) at the time.

Storage structure

How are page variants stored?
How should the difference to the "master page" be stored? As delta or as a ful copy?
How are segment-associations stored?

...