Mitchel's Forums

Subject: Is ModuleID necessary in Custom Module Dev?
Prev Next
You are not authorized to post a reply.

AuthorMessages
NMUser is Offline
New Poster
New Poster
Posts:1

06/13/2008 9:12 AM  

Why should i include the ModuleID when developing a custom module & table schema? What is the benefit of including this value and are there other values to be included as well?

Thanks!!

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

06/13/2008 10:04 AM  
This really depends on what types of information you are storing, and the desired way that it is associated.

For example, take my guestbook module, each entry is tied to a specific module instance, thus ModuleId is used. I then can make a foreign key to the modules table, with ON DELETE CASCADE set and if the module is deleted I will get an auto cleanup of that data.

Now, in other modules you might have information that is stored on a site basis, for those you would use the PortalId as a key.

The true question is how should data be stored in relation to multiple instances of a module in a single DNN portal or DNN installation.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Is ModuleID necessary in Custom Module Dev?



ActiveForums 3.7