Introduction
The combination of Sites + Endeca is a good fit as the products complement each other nicely with little overlap. However, there is no current best practice for what kinds of modeling changes should be considered (if any) when the two products are integrated. Since Endeca has exceptionally robust tools to precisely control denormalization, a best practice might be to consider leveraging Endeca to perform denormalization and not use the built-in Sites flex parent mechanism.
Main Article
Denormalization is a key ingredient to delivering performant websites. Sites was one of the first CMS’s to offer OOTB denormalization via its flex parent feature. While flex parents are generally considered key feature of the product, they are (unfortunately) limited to an “all or nothing” behavior. Specifically, that *all* attributes at the parent level are “inherited” by all children under the parent*. There is no provision for “some attributes inherit but others should not”. As such, loading up a flex parent with extraneous attributes is a universally-recognized bad practice: every child will inherit attributes that it doesn;t need with the result of significant database bloat (and subsequent performance issues). Furthermore, editing a flex parent forces all children to be updated (even if they don’t need to). As such, it has become common practice (some would say a “best practice”) to not specify *any* editable attributes at the parent level! This somewhat defeats the purpose of flex parents doesn’t it?
The business case is both simple and obvious: customers envision their siteplan as akin to folders on their website, but they also see these “folders” as having individual attributes that represent the webpage itself. Additionally, some of these attribtues (but not all) need to be inherited by all children of the folder for various reasons: searching, filtering, organizing, etc. Using flex parents to represent such “siteplan folders” simply doesn’t work in the real-world for most Sites implementations since updating such assets is an implied requirement and as we have previsously discussed, updating a flex parent can be significantly onerous in that potentially hundreds (even thousands) of child assets might need to be republished on any given parent update. Additionally, flex parents cannot effectively be used to create hierarchies, another implied requirement.
In contrast, one of the key strengths of Endeca is that it is very adept at precise and customizable denormalizing. This is because Endeca makes no assumptions about the data and that via its tools one creates an ingestion “pipeline” that imports data into the MDEX. And via this pipeline one can design which attributes are denormalized and which are not.
As such, the combination of Endeca + Sites is ideal: Endeca excels at search, denormalization, and pagination (all of which Sites is weak at) and Sites is ideal as a caching framework, drag-and-drop page layout, and general content management (all of which Endeca is weak at).
To that end, I propose that when modeling for a project where Sites + Endeca is known to be the solution, one should avoid using Sites for denormalization and use Endeca for that task instead. Pragmatically, this means that one should not use flex parent for inherited attributes (unless absolutely necessary and only on the condition that such attributes are rarely if ever updated). In fact, I will go a bit further: I believe that the best solution for packaging up attributes to be “denormalized” down to the children would be to design various definitions of the Page asset to create one or more taxonomies of siteplan nodes, each of which stores attributes that can be used for guided search by Endeca as per the rules embodied in its pipeline.
NOTE: using the Page asset aligns very well with an important restriction in Endeca: that hierarchies can only have a single value (i.e. they must not be multi-valued). Flex parents of course do not have this limitation thus present a potential problem when integrating with Endeca. In contrast, Page assets are always single valued with regards to their hierarchies, thus presenting no issues with Endeca’s restriction on hierarchies. In other words: Page assets are an ideal way of representing hierarchies in Endeca.
One of the key benefits of disentangling the asset model from the denormalization logic is that it aligns well with agile project methodologies. As such, editors and developers can use the Page asset in an ad-hoc manner, loading them up with as many attributes as needed for each node. (see endnotes for a discussion of a missing feature to further enhance agile methodologies)
The proposed denormalization model would look something like the following, wherein we use the Sites siteplan assets (i.e. Page assets) to represent not only the navigation, but the collections of attributes to be inherited by the children under each node (very much like flex parents):
Compare the above with the much simpler modeling possible with leveraging Endeca to do the denormalization for you:
Individual non-taxonomic assets (e.g. News, Products, White Papers, FAQs, etc.) would have as part of their definition a required attribute that points back to the taxonomy/siteplan node to which it “belongs” (i.e. TaxonomyNode). In other words, each editor would specify where in the navigation tree the current non-taxonomic child node belongs. Example: a PressRelease would point to the News page node, An Event would point to the Events page node, and so on.
At content ingestion/indexing time, the Endeca pipeline loads all the child nodes in on the first pass The pipeline then “appends” additional attributes (as needed) derived from the siteplan/taxonomy(s) to which each child node belongs. The lookup would be based on the TaxonomyNode id as the common key.
In this way, Editors are now free create and update as many taxonomies as needed, and load these nodes up with as many attributes as necessary. If there are any new inheritance rules needed, editors would convey the ingestion rules to the Endeca pipeline developers, who will then modify the pipeline to make denormalization extraction as appropriate.
Assumptions:
- Endeca will index all “searchable” content and provides the content for all guided search navigation pagelets on the Sites-rendered webpage. There is no requirement for Endeca Experience Manager in this solution. OTOH, there is nothing in this solution that would prevent the inclusion of Endeca Experience Manager.
- Since ATG is not involved in this discussion, the assumption here is that Sites will do 100% of the rendering using its JSPs and deploying the Endeca assembler either in the Sites context or remotely, outputting JSON
Endnote 1:
While it is good and well that Page assets can be useful for enabling an agile methodology, the trouble is, there is no OOTB way to convert one Page node definition into another Page node definition. Example, let’s say you have a Page asset that represents a Product category and initially you specify it to be of type “Section”. Later on, you might discover that you really need a different definition for such a page perhaps called ProductCategory. Assuming you now have dozens or hundreds of such “old” section assets that need to be converted to ProductCategory, updating these would be quite onerous. The cool thing about flex assets though is that from a database point of view, converting a Page asset of definition X into definition Y would require just a simple update to the the flextemplateid field in the Page table for the given record and a cleanup of existing attribute values in the Page_Mungo table for attributes that don’t exist in the new definition. In other words, the system makes it easy to add this functionality, which I feel is a much-needed feature enhancement.
Endnote 2:
Since child assets point to Page assets (and not the other way around), there is no OOTB “view” that shows the relationship of Page to child within the GUI. As such, a missing ingredient for the above proposal would be a customization to the Siteplan tab that shows the children under each Page asset in the righthand search pane.
Endnote 3:
* Note that via a property, one can globally turn flex inheritance completely off, but that still leaves flex parents not being appropriate for hierarchies, something that Page assets excel at
All content listed on this page is the property of Oracle Corp. Redistribution not allowed without written permission