Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Some newbie quick questions
Previous Previous
 
Next Next
New Post 5/31/2006 5:08 AM
User is offline Mattias Andersson
7 posts
10th Ranked


Some newbie quick questions 
Right, I just had my first attempt at making a module. And it all went to heck, as expected

Now, for my second (and more serious) attempt, I thought I'd ask you for a few pointers...

For starters, I will not need to use any module IDs or portalIDs in my module, since all data will be based on a well structured and ready-to-use SQL table. But do I need to use the moduleIDs in some way even though it's not required in the SQL table to avoid "breaking" DNN?

I used the code from the adef tutorial (http://adefwebserver.com/DotNetNukeHELP/DNN_Module4/DotNetNuke_module_6.htm)
 as a base for my first attempt, is this a good code base to use or are there any better examples for DNN4 module development?
I found it a bit hard to follow the code at times, some things weren't that easy to understand.


I'lll fill in with more questions as they spring up, would be glad if someone could throw a quick reply (or as quick as it can on these moderated forums).
 
New Post 5/31/2006 11:03 AM
User is offline Dwayne Baldwin
518 posts
8th Ranked




Re: Some newbie quick questions 

If you don't use PortalID and ModuleID, every instance of your new module will be exactly the same, winhin the portal and across all portals that are being hosted by DotNetNuke. In addition, you may want your module to appear differently based on something other than module settings. It would be like having a Text/HTML module with preloaded text that always appears the same on any page on any portal. You can display the module on every page of your site if you wish with standard modules settings but I have rarely seen it used in actual portals.

If you are only going to use one portal you may not need the PortalID. If you to intend to use the same module on more than one page (as per usual) you must use the ModuleID.


Dwayne J. Baldwin
 
New Post 6/1/2006 12:22 AM
User is offline Mattias Andersson
7 posts
10th Ranked


Re: Some newbie quick questions 
Thanks for the reply.

Thing is that I have a table in which I already have a set of unique keys in my table. Can I control what my moduleID is, or does the added modules just get assigned a random moduleID when it's added to a page? If the only way to keep track of where a module is located, should I lock each moduleID to a primary key in the table?

My thought was to keep a setting in the module for which primary key it corresponds to, and thereby keep it from needing to use the moduleID (I'm a fan of keeping information separated from the presentation). For example, when I add a "personel" module I want a setting in which I get to choose which department it should show (the table has a department field).
 
New Post 6/1/2006 4:58 AM
User is offline Dwayne Baldwin
518 posts
8th Ranked




It is quite difficult for me to imagine you Re: Some newbie quick questions 

It is quite difficult for me to imagine your database schema, but perhaps I can explain it in another way.

A moduleID is reference to an instance of a module, somewhat like an item's storage location in a warehouse. The location id is always the same, but an item cam be moved to a different location just by changing the item.location.

In the case of DotNetNuke, a ModuleID is issued when you add a new module. When you add that module to a page, it is referenced by the ModuleID. DNN uses this technique so that you can use the same base module on different pages, each with its own unique settings.

The bottom line is that if you are developing a module, you should follow the best practice that DNN has already implemented for you. Does that make more sense?


Dwayne J. Baldwin
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Some newbie quick questions
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


telerik
telerik r.a.d.controls suite is the most innovative and comprehensive toolset for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications.
dnn.telerik.com
CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP