Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help with "UpdateModuleSetting" command.Help with "UpdateModuleSetting" command.
Previous
 
Next
New Post
3/13/2008 6:55 PM
 

A few questions on the "DotNetNuke.Entities.Modules.ModuleController.UpdateModuleSetting" process.

  1. Where is the info. stored?
  2. Is there a realistic max. length for info. stored by this process?
  3. Is there any reason NOT to store info. here vs. putting in a DB table?  Eg. Performance, table issues, etc.

What I want to know is there any reason not to store most of a module's settings, etc. in the Settings area vs. using a table?  Also, if I store a long string of data into the Settings, ex. XML, will there be issues after one uses multiple modules?

 

THanks

P.S.

Also, I found out that the  UpdateModuleSetting settings info is stored in [ModuleSettings] table and the value field ( [SettingValue]) is a nvarchar(2000)
 

 
New Post
3/17/2008 10:53 PM
 

I'm no expert, but I'll try to answer your questions with my own experience.

1.  The database.     It really doesn't matter WHERE in the database it's stored, because you retrieve it with a ReadOnly Hashtable named Settings.  You can certainly make your own connections and write your required entries, but you'll invariably screw something up or die trying.   

The whole point of a framework is abstraction.  Specifically in this case, data access extraction.  You (the developer) don't have to worry about trivial tasks.   In terms of logic layer and presentation layer code, database entries are trivial.   Trust that a framework member does what it's labeled.   Nothing is perfect, but I can say any problem I've ever had with a module were my own, not a bug in the framework.

 

2.  It appears that you've already answered this and it's a dead giveaway that the settings are stored in the database.  nvarchar(n) means that you can store characters.  In the case of nvarchar (vs. varchar), you can store unicode data, which is necessary for DNN's multilingual support.     (someone chime in if I'm incorrect here.)

 

3.  Really... 2000 characters should be a lot.  If you had to, you could have to records that pertain to 1 particular setting.  But it's highly unlikely that you'll have to store this many settings.   As far as the multiple modules issue goes, you'll notice that you have to supply an integer moduleID when you store a module - again this is the framework features at work for you.  A module ID make sure that module x's settings do not concur with module y's settings.

My main point.. use the framework.   It will save you lots of headaches.

I hope this helps.   

Daniel

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help with "UpdateModuleSetting" command.Help with "UpdateModuleSetting" command.


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out