How does Sitefinity use ASP.NET MVC?
Sitefinity has been built with extensibility in mind from the very beginning. We always try to provide choices for third-party developers on how they could solve a problem. The introduction of MVC support in 5.1 is no exception to this philosophy – we’ve provided choices for you, so that you can decide by yourself what approach to use. Before the details of how we support MVC, we should address some question you may already be asking.
- Is Sitefinity rewritten in MVC?
No. We only support MVC controllers and views, but the CMS itself is still WebForms.
- Are you abandoning the WebForms model?
No. You’d be able to use everything you’ve used until now with the WebForms model.
- OK, but are you going to develop new features with WebForms?
Yes. Apart from the support for WebForms, we will also continue our investment in it – it’s a great model.
- Do I have to use MVC?
No, you don’t have to. It’s your call, we just give options.
In short – WebForms is not dead, we’re not only supporting it, but counting on it for new development. The whole point of MVC support in Sitefinity is to give you another option, not to abandon the existing ones.
There are some important details you should know:
- Sitefinity supports ASP.NET MVC3 – the latest official version. ASP.NET MVC 4 is in beta at the time of this writing. Once it is released officially, we will enable support in Sitefinity.
- Sitefinity supports only the Razor view engine and C# for MVC views. You can write old WebForms controls with ASCX markup, but all MVC views must use Razor and C# (no VB).
So with that cleared, what exactly is MVC with Sitefinity and how can you use it? There are three modes of MVC support. You can read more about them in Three MVC modes.