Skip to main content

We are currently building custom MVC widgets for a client, and noticed a couple of things. First is that the development environment with Sitefinity Thunder is not the best. The provided Visual Studio project is part of the site installation. Since this client pushes content changes from their development installation, we would have to work from the same site. Work would be checked from the physical site and not in a development environment.  This slowed us down a great deal. What we did is to create a standard MVC project in Visual Studio and use pre and post build scripts to package everything according to Sitefinity’s specifications and then drop the .DLL in the run-time directory. This approach allowed us to develop faster and still have an easy deployment process for the finished product. The second important concept to develop Sitefinity MVC Widgets is deciding to what level of MVC the Widget will be. The CMS supports both ASP life-cycle pages and MVC routed views.  There are three possibilities. The classic MVC approach offers custom routing, but minimal access for content administrators. The Hybrid model offers more access to content administrators, but tons of additional ASP life-cycle overhead. The Pure MVC model is the one we like. It offers content administrators access to the widgets while keeping overhead to a minimum for better performance.  Pure MVC Widgets also allow multiple Controllers on the same page. This has value for controlling code scope on complex pages.

In all the best approach we found to creating custom MVC Widgets is to work from a VS MVC project, package it as a pure MVC Widget and drop into the Sitefinity installation.

Subscribe Now!
Get articles delivered directly to your email.