Big question on Fluent Ribbon overhead

Jun 11, 2012 at 7:41 PM
Edited Jun 11, 2012 at 7:45 PM

If I use Fluent Ribbon in a Delegate Control and an Application Page, does it create the XML for the ribbon and register the changes with SharePoint each time the page is accessed?  Or does it do this operation just once as if I created the XML in VS and Deployed it?

Jun 11, 2012 at 10:07 PM

You can use Fluent Ribbon both with Delegate Controls, and with Custom Actions (which are deployed with feature activation). The same definitions can be used.

Let me explain the difference.

Delegate Controls

Delegate Control approach will register XML each time the page shows. It uses natural SharePoint methods for this purpose. I don't think this produces a great "overhead", however I'd recommend always deal with Delegate Controls carefully. A mistake there could lead to exception on all the site pages.

Also, Delegate Control approach is not available in Sandboxed Solutions (and obviously in Office365 too).

Custom Actions

Thus you might prefer using Custom Action approach. This is how you usually perform ribbon customizations in VS: the XML will be created once and deployed on feature activation. But this approach has at least one significant disadvantage:

You cannot generate the ribbon customizations dynamically using Custom Action approach. You can only enable/disable controls based on some JavaScript, which is not always convenient.

Example of using RibbonCustomAction class is available on the project documentation site.