Hi
Context hub is a replacement for client context it is better and more lightweight or ClientContext is basically the old version, ContextHub its replacement..
Client context had performance problems, it forces integration to wait on stores.init.js, ajax call, which slows stuff down a lot (esp site catalyst page-view calls). Context hub is a lot faster and fixes that.
Engineering team is avoiding changes to client context. Future is context hub.
In 6.1, the feature set of ClientContext was still higher than ContextHub, which itself relied on some ClientContext core functionalities to work.
With 6.2, we should have closed the gap, and we're currently working with Product Management to get the ClientContext deprecated in favor of the ContextHub.
I guess it would be a good idea to highlight some of the major architectural changes to clarify why ContextHub soon replaces ClientContextt:
- ContextHub decouples the Kernel from the UI leading to a much lower footprint on publish
- ContextHub Stores can deal with complex hierarchical objects while ClientContext was limited to key-value pairs
- The eventing model of ContextHub is a lot more sophisticated including the fact that eventing happens as soon as stores are available and not just after „all“ stores have been loaded
- Loading behavior can be controlled on a fine grained level (sequence of loading & synchronous as well as asynchronous store loading)
All in all ContextHub is capable of every aspect ClientContext could deal with and is optimized in the most significant areas of clientcontext that turned out not to work perfect due to the architecture.
IOW: go for ContextHub and create issues in case you find bugs or limitations that we are not aware of yet.
I hope this answers to you question.
Thanks and Regards
Kautuk Sahni
Kautuk Sahni