Find a post...

DNN-Connect Blogs

Strong typing your settings

This is something of a pet peeve for me. And whenever I get myself involved in an open source project in DNN, it is one of the first things I’d tackle. The issue I’m referring to, here, is how to properly code settings that are serialized to storage (SQL). So settings are commonly retrieved as a hashtable or dictionary of key/value pairs that are both of a string type. These lists get stored in SQL typically in tables with the “Settings” suffix. I.e. ModuleSettings, PortalSettings, TabModuleSettings, etc. And often modules implement their own settings table because the framework hard wires ModuleSettings to … modules. So if you need portal-scoped settings for your module, you’ll need to create your own table. The old blog module (pre version 6) used to do this, for instance.

Hosting liberally provided by

Daniel Mettler 11511 88
Geoff Barlow 399 4
Philipp Becker 5636 7
DNN-Connect 427 6
Peter Donker 4489 25
Christopher Hammond 638 2
Olivier Jooris 380 1
Clint Patterson 1 1
Jos Richters 65 1
James Rosewell 261 2
Will Strohl 1484 27
Ernst Peter Tamminga 351 4
Barry Waluszko 1653 2
Declan Ward 78 1
Gifford Watkins 719 9
Torsten Weggen 1847 3