What are the best practices for developing DotNetNuke modules? There has not really been a lot of discussion on this topic, and the best resource we can have is our experiences from several years creating custom modules.
What do best practices mean? Wikipedia says "A best practice is a technique, ... believed to be more effective ... than any other technique"
How does it relate to DotNetNuke module development? Basically we want to have a process that ensures our modules come out of the development process with a decent amount of quality already present. Quality becomes part of the process instead of an afterthought.
Best practices need to be a commonly accepted way of doing something. Given the lack of discussion, what I'm writing here can only be taken as my opinion. It may or may not be the best way to do things. Our process is continually evolving, and this is just where we are right now.
I've seen some posts over at Mitch Sellers' blog that are well worth reading, where he writes about best practices starting from which module template to use and the WAP vs. WSP question.
I actually want to start out a step higher than that and talk about what we do before even creating a new project, before even writing a single line of code. Let's start with best practices for DotNetNuke project management.
So what goals should our DotNetNuke specific best practices have? Our conceptual goals include:
- Better project quality.
- Increased confidence in the project's output.
- Faster turnaround and delivery times.
- Quality control as a part of the development process, instead of something that is done after development.
- Stakeholders can view the projects current output at any time.
- A process that assists development instead of getting in the way of development.
These are actually quite similar to the goals of Agile programming http://en.wikipedia.org/wiki/Agile_methodology.
And our technical goals include:
- Source code is testable.
- Source code is protected from loss.
- Bugs are found quickly.
- Conflicts and integration problems are found quickly.
- All developers are always working from an up-to date codebase.
- Making it easy to set up the process framework for each new project.
- Automated release packaging.
- The ability to create multiple releases from one codebase e.g. a DotNetNuke 4 version, and a DotNetNuke 5 version.
So that is why we need best practices, and what best practices can do for us.
These are some posts by other people that are related to the subject of best practices:
http://www.ifinity.com.au/Blog/EntryId/76/Unit-Testing-DotNetNuke-5-Modules-in-Visual-Studio-with-a-Mock-ASP-NET-Http-Context
http://www.charlesnurse.com/post/Creating-Testable-Modules-Part-1.aspx
Follow-up posts will come soon, where I will start to talk about how we can implement these best practices.
The next post in this series will most likely be:
"What tools can we use in our best practices?"
- Source control.
- Build scripts.
- Unit testing.
- Continuous integration.
If you want to be kept up to date on this series of posts, please subscribe to our newsletter here: http://www.bestwebsites.co.nz/newsletter/
What do you think about DNN best practices? Do you have any good ideas or tips to add?
Posted by:
Oscar Martin
28-Jan-2010