In Sitecore's documentation you encounter terms such as "static binding" and "dynamic binding" of presentation components such as renderings.

  1. What are the differences between static- and dynamic bindings?
  2. Why would I use static bindings?
  3. Why would I use dynamic bindings?

closed as primarily opinion-based by Harsh Baid, Dmytro Shevchenko, Gatogordo, jammykam, Zachary Kniebel Oct 26 '16 at 17:43

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • It is not quite clear what you refer to by saying static and dynamic bindings? – Andrey Bobrov Oct 26 '16 at 14:58
  • @adb I am referring to static and dynamic binding in terms of presentation in Sitecore. – Søren Engel Oct 26 '16 at 15:08
up vote 6 down vote accepted

What is static- and dynamic bindings in general?

Static binding means adding a rendering to a page in a raw way, e.g. in an mvc view:

@Html().RenderAction("Controller", "Action");

Essentially, it means that you are not able to change this without editing the code.

Dynamic binding means that on a page you will have a placeholder to put your renderings into:

@Html().Sitecore().Placeholder("main")

After that in the Content Editor (or Exp Editor) you will be able to "dynamically" add any rendering you like to that "main" placeholder.

When would I use static bindings, and what are the use cases for doing so?

When would I use dynamic bindings, and what are the benefits of this?

It is generally recommended to use dynamic bindings, because of their flexibility.

However you may want to use static bindigs for things like site header rendering, etc (something that should not be removed by editors mistake and is not supposed to be changed)

Please refer to the official Sitecore documentation for more info on how this works altogether with layouts, sublayouts and renderings (https://sdn.sitecore.net/upload/sitecore6/sc62keywords/presentation_component_reference_sc62_a4.pdf)

  • 1
    Having all of bindings dynamic places a large burden on an Author to correctly configure a page for layout where there may be dozens of presentation components needed. Even when these are defaulted, the management of additional components through the Presentation dialogs can be cumbersome. This is made much simpler by 'hiding' components that should rarely be removed or altered, like logos, footers, navs, etc - design specific of course. Statically binding these elements retains encapsulation and reuse flexibility and simplifies the layout. You can always have extra page layouts! – Richard Hauer Oct 27 '16 at 13:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.