Chapter 10. Implementing Optional DotNetNuke Interfaces

With the standard module build out of the way, let's start investigating the methods that can be used to more tightly integrate the Guestbook and other custom modules to the DotNetNuke system. To accomplish this integration, the DotNetNuke framework presents a number of very helpful interfaces that can be implemented in various locations within the module code.

This chapter examines five of the key interfaces that can be used, along with sample code, and provides a look at implementation in the Guestbook module (if applicable). By the end of this chapter, you will have the information you need to make proper business judgments regarding which interfaces should be implemented.

IPortable

The IPortable interface provides users with the capability to import and export content from one module instance (or portal) to another. Although many developers may decide that their modules don't need to export content, it is typically a good idea to support this interface because it can be helpful to site administrators in the long run.

When a module implements IPortable, two options are added to the module action menu: Import Content and Export Content. Additionally, if a module supports IPortable and a site administrator creates a site template with the "With data" option enabled, the module's content will also be exported. This is functionality that most users simply expect as part of the process.

Implementation

The IPortable interface is implemented ...

Get Professional DotNetNuke® Module Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.