DNN Blogs

Written for the Community, by the Community

DNN Sample Modules

Written By Peter Donker
2025-12-03

As per version 10.2.0 of DNN the code that used to be in the sample modules (MVC/SPA) repository (https://github.com/dnnsoftware/Dnn.Platform.Samples.Mvc) has been moved to /Dnn Platform/Modules/Samples. This move serves three purposes:

1. To better keep these modules up to date
2. To validate our current build
3. To validate future changes to DNN

These sample modules had not had any changes to them in 8 to 10 years. Not that they were broken by DNN changes in the meantime, but the UI no longer looked acceptable by modern standards or on our current default skin. So it was time to show these modules some love. At the same time as realizing this, a team of enthusiasts is working hard to create a new "module redendering pipeline" in DNN: the MVC pipeline project. You may have heard of this. And this team needs to show how the new rendering pipeline can be leveraged by modules (and skins).

As you can see this created the perfect moment to "do something with the sample modules". The tricky thing is that the old repository can't really leverage any proposed code changes in the main DNN repository. The solution was to move the code of these modules into the main repository so we can leverage those API changes in the same pull request as the changes to the API themselves. This also helps the maintainers better evaluate proposed changes. And an added bonus to this change is that now the main solution will not build if code breaks the API that these modules use. Meaning our CI pipeline will alert us and prevent us from accepting any code changes that would impact the API that these modules use.

What does this mean for you?

If you're a developer you can use these modules to check "how these modules do it". Note there are 100 ways to make a good module and we do not pretend that the examples cover all there is to DNN module development. However, there is working code there that you can use to learn from. There are 3 modules currently: MVC, SPA and SPA+React. The first shows the MVC module pattern, the second the SPA module pattern. That second project includes a ton of features (a bit of kitchen sink version of SPA). The third example uses the SPA pattern without a lot of bells and whistles and instead focuses on how you'd use the SPA module to develop a React app for DNN. Note that you can also use the MVC module pattern to build a React app.

How to use these examples?

Note that these modules ARE NOT MEANT FOR PRODUCTION. We won't be releasing "versions" of these modules that upgrade themselves or anything like that. They are purely meant to play with and be discarded.

With that out of the way: the way you can use these is as follows. Note I expect you are familiar with setting up a local dev environment for DNN (https://github.com/dnnsoftware/Dnn.Platform/blob/develop/.github/BUILD.md)

1. Edit your DNN_Platform.build.local and include <CopySampleProjects>True</CopySampleProjects>
2. Edit your settings.local.json file and include "CopySampleProjects": true

With that done, if you build any of these modules in release mode, they will create an install package under /Artifacts/SampleModules. If you build in debug mode they will build to your WebsitePath variable set up in DNN_Platform.build.local.

Have fun playing with DNN!

 

Total: 2 Comment(s)
Great idea :-)
Thursday, December 4, 2025 ·
Awesome Peter! sounds great
Wednesday, December 10, 2025 ·

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved