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.0DNN 4 Module Design Questions - Use of ModuleIdDNN 4 Module Design Questions - Use of ModuleId
Previous
 
Next
New Post
1/26/2006 11:25 AM
 

I really have a hard time understanding the granularity to which modules are ment to be designed. In other words, if I want to write a module that works with, say Contacts, and another module that manages Messages for a given Contact, then the ModuleIds are going to be different between the two and the generated stored procedure won't return the entries created by the other module.

Is there a way to access the moduleId of another Module by name or so? Or is my desing wrong?

The other question is: The generated stored procedures all include the User Information (CreatedByUser). What if I want anonymous users to be able to insert records? Again, the template stored procs will do an 'INNER JOIN' to Users, resulting in no records being returned. This one is easier to change by changing the scripts to do a left outer join.

Thanks for some clarification or for pointing me to resources that explain Module Design and the use of ModuleID.

 
New Post
1/26/2006 11:39 AM
 

The way you define your modules is up to you, no need to follow whatever structure is in core modules.

For instance if I were to write a pair of modules that work together I would not include the moduleid as a key in both. In this case both modules will work together so the moduleid is not a good candidate for filtering the data the should get. In this case the messages table will be filtered using the contactid from the first table, no matter what the moduleid for the second module is.

Same for the CreatedByUser column, if you need to allow anonymous users do a LEFT JOIN and filter the <null> value in your code (when createdbyuser is null ==> anonymous user).


Vicenç Masanas
Banyoles, Girona - Spain

Disgrafic.com    PSD to DNN
 
New Post
1/26/2006 11:47 AM
 

Thank you very much for that confidence giving answer. I wasn't sure, if DNN relied on the use of Module ID, but now I know I can just take all references to it out in ..Info and ..Controller.

My next question would then be how and where to edit which template to get rid of these on new module creation.

Thanks again, Orronzo.

 
New Post
1/26/2006 3:34 PM
 
An alternative to Vicenc's suggestion.

The ModuleId allows one to segregate similar data.  For instance you could add a Contact module to one page and a second one to another page for different Contacts.

In this case the ModuleId is neccessary.

However, you could still access the data from a 3rd module, by adding a settings control for the 3rd module that provides a "Related Contacts Module" setting.  There are methods to return all the instances of a type of module, so you could populate a combo box with all the instances of Contacts modules.

Alternatively if the 3rd Module needed to access both Contacts modules, you could create a GetAll method and stored procedure, to retrieve all Contacts defined for the Portal.  This would probably need table joins so you could pass the PortalId to the Stored procedure.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN 4 Module Design Questions - Use of ModuleIdDNN 4 Module Design Questions - Use of ModuleId


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