Sitefinity CMS

Custom Modules Overview Send comments on this topic.
See Also
Developing with Sitefinity > Modules > Adding New Modules to Sitefinity > Custom Modules Overview

Glossary Item Box

Sitefinity comes with several built-in modules, but more importantly it comes with the ability to be extended through new modules. Some of the built-in modules are Blogs, Events, Forums, and News. Modules are essentially-specialized mini applications inside of Sitefinity that provide narrow and streamlined features.

 

Why Build New Modules for Sitefinity?

Obviously there may be times when you will need features that Sitefinity does not provide out of the box. Whenever those features consist partially of admin side user interface and partially of public side user interface, building a new module is the recommended way of implementation. Take for example the Blogs module. On the admin side it provides user interface for creating blogs, writing posts and other authoring capabilities. On the public side, it provides the BlogPosts control for displaying posts, Bloggers control for displaying the list of all bloggers, and so on.

If you need to implement features that will need user interface only on the public side, you should implement a User Control or Custom Control. If, on the other hand, you need features that will have user interface only on the admin side, you should implement a tool.

 

How to Build a New Module for Sitefinity?

Sitefinity supports two kinds of modules:

  • Intra-Site modules
  • Pluggable modules

Both types are capable of achieving the same end functionality and the only difference is in the actual implementation.

Intra-Site modules are much simpler and quicker to develop. The code for these modules is stored in the App_Code folder, while the user interface is implemented through series of User Controls. The downside of this approach is the fact that they are relatively hard to transfer from one installation of Sitefinity to another.

Pluggable modules are a bit more complex to implement. The whole Pluggable module is compiled into a .dll file, together with the User Interface elements (generally, composite controls). While somewhat more complicated to develop, Pluggable modules can be easily transferred from one Sitefinity installation to another (copying the .dll file to the bin folder and registering the module in the web.config is all that needs to be done).

Obviously, depending on your particular needs, you will choose the appropriate type of a custom module. If you are developing a commercial module that you intend to resell to other users of Sitefinity, you will want to create a pluggable module. If, on the other hand, you are creating one module for your site, economically it makes more sense to develop an Intra-Site module. Also, if you have less-experienced developers on staff, you may decide to use Intra-Site modules as a simpler alternative.

See Also