Note: this wiki also contains other pages on
Best practicesDevelopment
The wiki already has a number of useful pages of content that demonstrate how to develop modules:
In addition it's highly recommended you consider the module development templates discussed in this
blog . The blog entry also links to a short video explaining how to use these templates.
Packaging
There are a number of ways to do packaging for modules such as
Automated DotNetNuke Module Packaging MSBuild and
Automated Module Packaging for DotNetNuke, as well as using the built in UI to create packages.
There is also extensive documentation on the
Manifests format and all of it's capabilites available.
Do's
- Do use DotNetNuke.Common.Globals.NavigateURL when generating links
- Do have your module controls inherit from DotNetNuke.Entities.Modules.PortalModuleBase
- If your modules use jQuery, please use the relevant framework calls to ensure only one copy if loaded.
Don'ts
- Don't use Session variables. Session variables can cause issues when running in webfarm scenarios. Neither DotNetNuke or any of the core projects use session variables for this reason.
- Don't trust user input - if you need to accept user input you should use the PortalSecurity InputFilter methods to filter the content as required.
Performance
This
article has a number of other optimizations you might consider.