MVC modes

Sitefinity CMS supports two MVC modes. The mode used depends on your development process as well as the capabilities you want to implement. The following sections describe each mode.

Classic mode (bypass the Sitefinity CMS engine and directly use native controllers)

Classic mode is functionally equivalent to ASP.NET MVC. You can take regular controllers that you implemented in a non-Sitefinity CMS ASP.NET MVC project, include them in the Sitefinity CMS project, and register routes that use them. This mode lets you reuse a lot of legacy code that you may want to move from a regular application to a Sitefinity CMS application. In this mode, you do not work with Sitefinity CMS pages at all.
Working in Classic MVC mode is suitable when you need to implement a custom scenario with a very particular and specific functionality and behavior. For example, your scenario requires to implement a number of single-page-application pages that are constructed with SPA framework, such as Angular.
Another example is when you are porting an existing MVC app into Sitefinity CMS, and want precise control over your URLs, you may want to use the Classic MVC mode.
For more information, see Classic MVC mode.

Pure mode (multiple controllers per page)

The pure mode lets you use MVC controllers and views as widgets on a Sitefinity CMS page. There is one major functional difference between pure and classic modes – you can use multiple controllers on the same page. Each controller becomes a widget on the page and is responsible for rendering a portion of it.
An example scenario when you can use pure MVC mode is: you need clear markup, a lot of custom code, and are willing to sacrifice the ViewState and postback model.
For more information, see Pure MVC mode.

Mode comparison table

Mode Classic Pure
Uses a Sitefinity page No Yes
Uses ViewState (clean markup) No No
Controllers per page 1 Many
Sitefinity CMS Forums widgets No No
Form helper @Html.BeginForm

@Html.BeginForm and @Html.BeginFormSitefinity

RECOMMENDATION: We recommend that you use the @Html.BeginFormSitefinity helper since it ensures that you can use your widget on both hybrid and pure pages.

Route registration Manual Auto

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?