Upgrade to Coveo Hive framework: FAQ
Upgrade to Coveo Hive framework: FAQ
This article covers some questions related to upgrading from the Legacy UI Framework to the Coveo Hive framework.
What am I gaining if I decide to upgrade?
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 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 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 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 source item elsewhere in the content tree. It’s then considered a shared data source.
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 site 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 this, 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.
New features of the new framework won’t be ported to the legacy framework. Only critical bug fixes will be applied to the old framework.
What if I want to upgrade?
The Legacy components aren’t compatible with the new framework, so you need to start your search interface over.
It takes some work to create a search interface that looks like your older search interface, but you will end up with reusable and easier to maintain components.
Can I port my existing components?
It depends on your specific component.
Here are some things that were removed.
Coveo for Sitecore no longer bundles jQuery with the new UI.
You can still use jQuery, but the package doesn’t provide an initialization call like this anymore:
This variable has been removed.
This allows having many search Interfaces that have no chances of interfering with each other.
For more information on the new components, see Coveo Hive framework.
To support HTML caching, all code related to a custom context has been transferred to the CoveoForSitecoreContext component and is now all handled client-side instead.
The Coveo Search Resources must be included in the page.