- Building Search
Coveo for Sitecore Hive Framework
Instead of using a single component that strives to do everything, the search page is now split in many smaller pieces, each one representing a Coveo for Sitecore Hive component. Each component has a single responsibility and displays its specific options.
Therefore, you can move components around much more easily from the Experience Editor.
Easier Website Integration
In previous Coveo for Sitecore releases, the website styling was tightly coupled to the search component view. A developer had to duplicate the search components to create their own view, mostly because of styling needs.
Now that the search page is composed of smaller components, you can much more easily move them around from placeholder to placeholder. The Coveo for Sitecore Hive components rely on placeholder settings to determine which components can go where.
You can either use the default settings provided by Coveo or use your own to gain complete control over the component placement.
Reusability of Search-Enabled Components and Pages
In the past, the Coveo for Sitecore components were parameterized through Rendering Parameters. This approach had many drawbacks, such as the inability to merge individual field values. The Coveo for Sitecore Hive components rely solely on Data Source items to get their parameters.
Leveraging Data Sources brings many benefits:
It decouples the component settings from the component itself, making it easier to share a common set of parameter values between many components.
It merges field values through standard item inheritance. In other words, you can have a Data Source that only sets a field value and inherits values for all the other fields.
It supports local and shared Data Sources. When the Data Source item is defined as a child of the page, it’s considered a local Data Source. The other alternative is to store the Data Store item elsewhere in the content tree. In such case, it’s considered a shared Data Source.
As the name states, many components can reference the same Data Source item.
It supports Sitecore branches to create pre-configured search-driven pages.
Efficient HTML Caching
HTML caching is an important feature in Sitecore. It can make the difference between a website that feels fast and snappy and one that feels slow and heavy. On the other hand, enabling caching when it’s inefficient might not bring the expected performance gain and can use a lot of memory.
The Coveo Hive components are designed with HTML caching in mind. Most of the components are “cached by Data Source,” which is ideal. To achieve that, the rendered HTML depends solely on the Data Source parameter values. With a given set of parameters, the HTML is always the same regardless of the current visitor, or the page it’s bound to.
There’s one special component that makes HTML caching work for the others: the context component. Its purpose is to render all the non-cacheable information for the other components. The context HTML markup can’t be cached because it varies on many contextual factors such as the current item, the visitor, etc. Once the page is served, all the cached components can then access the context on the client-side and do their work.