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.0How many Info and Controller class/files???How many Info and Controller class/files???
Previous
 
Next
New Post
8/17/2007 3:17 AM
 

Hello everybody,

I'm creating a module using C# and VS2005. I've used the "DotnetNuke Dynamic Module" template, so under AppCode/MyModule I've already a Controller file, that contains a Controller class, and an Info file, that contains an Info class. 

I've created many tables for my module, and the question is:

I should have an Info and a Controller class for each table? If yes, these classes should be in separate files (one info file for each info class and one controller file for each controller class) or in the same file? 

Thanks.

  

 
New Post
8/17/2007 10:30 AM
 

There's no restriction. One file will work and so will multiple ones. Info and Controller are classes that depend on your object modeling. Some times the data for an object might be normalized and therefore scattered around many tables. On other ocassions a developer chooses to denormalize his DB design to improve performance, and the object ends up persisting its information to fewer tables, maybe even one.

So to summarize it, it all depends and it is mainly up to you. The core modules are a good source of reference to see how it is done.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
8/17/2007 11:51 AM
 

You can cramp all your classes across the entire app into one file or separate them into different files - it's a matter of maintainability and visual separation, along the lines with indenting code, commenting things, etc.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How many Info and Controller class/files???How many Info and Controller class/files???


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