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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...WAP Modules - Multiple User ControlsWAP Modules - Multiple User Controls
Previous
 
Next
New Post
5/8/2009 3:37 PM
 

I am fairly new to DNN and just getting around to fully understand it.   Our corporate website site has a lot of user controls (over 130), and I am trying to find the best way to convert all of those controls into DNN modules so we can officially use DNN as the CMS system for our website.  The main thing I want is - I want those DNN modules to be debuggable using standard Visual Studio debugging techniques (attaching the debugger to the IIS worker process).  They are fairly complex and I would like to be able to run them in debug mode and put breakpoints etc to go through the code at runtime.

My understanding is that there are 2 types of modules in DNN:

  1. WAP (Web Application Project) modules
  2. Desktop Modules 

Out of these the WAP modules are the ones that can be debugged like that, and desktop modules can't be debugged, is this correct?  If so, I will go with creating WAP modules.  Now, the issue with WAP modules is that for every single user control (which we have over 130 of), creating a WAP project and adding it to the DNN solution is certainly not a good idea.

So my question is:

  1. Is there a better way to create DNN modules so that I have the ability to debug them without having to create a slew of additonal projects in my DNN solution?
  2. If the only way is to go the WAP route, is it possible to embed multiple user controls (DNN modules) in a single WAP project?

Any help would be appreciated.

Thanks!

 

 
New Post
5/12/2009 5:05 AM
 

The 2 types of modules are WAP (Web Application Project) and WSP (Web Site Project)

  • WAP means that the module code is compiled into a DLL file.
  • WSP means that the module code is copied to the web server un-compiled.

The difference is mostly in the way the code (i.e. VB/C# code) is managed and compiled. Other than that you structure and develop a module the same way for both methods. Both methods allow any number of user controls to be included in the module.

See WAP or WSP Which to Use and Why for more info about the methods. I would say that WSP is quicker to get started but WAP is better for professional projects, i.e. for optimal performance and protection of source code. Both can be debugged, however it can be tricky to get the setup correct to enable debugging for WAP projects (hence numerous articles and posts on this subject including my own: WAP project with LINQ - can't seem to run project in DesktopModules/Module folder).

There are lots of tutorials for getting started with both WSP and WAP. See http://adefwebserver.com/DotNetNukeHELP/ for lots of tutorials based on the WSP method. Here are some links to articles on WAP:

http://weblogs.asp.net/ianrobinson/archive/2008/10/15/creating-dotnetnuke-modules-using-a-web-application-project-wap.aspx

http://www.apptheory.com/dotnetnuke/dotnetnuke_blogs/articletype/articleview/articleid/202/best_practices_development_team_collaboration_and_dotnetnuke_part_3_the_references_amp_project_structure.aspx

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1650/DotNetNuke-Web-Application-Projects-and-Visual-Studio-2008.aspx

http://adefwebserver.com/DotNetNukeHELP/DNN4_WAP/

http://dnngallery.net/Blog/articleType/ArticleView/articleID/53/Creating-DotNetNuke-Modules-using-a-Web-Application-Project-WAP.aspx

About User Controls:

Each user control that you want to be able to navigate to must be registered in DotNetNuke with a Control Key value (this is done using the .dnn Manifest File). To redirect the user from one User Control to another (passing some parameters) use the following C# code:
 
Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ControlKey", "mid=" + ModuleId.ToString(), "parameter1=" + parameter1_value, "parameter2=" + parameter2_value, "parameter3=" + parameter3_value, "parameter4=" + parameter4_value));
 
Note: the user control that is initially displayed when a module is loaded is the one with a "Null" Control Key.
 
Using Control Keys and the NavigateURL function is not the only way to switch between the different user controls in a module. For an analysis of other methods see: http://www.adefwebserver.com/DotNetNukeHELP/Misc/ModuleNavigationOptions.htm
 
New Post
5/12/2009 5:23 AM
 

I would also recommend downloading the “Starter Kit” (e.g. DotNetNuke_Community_04.09.03_StarterKit.vsi for DotNetNuke version 4.9.3) from http://dotnetnuke.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25790

The Starter Kit is a set of Visual Studio Module Templates and will help you quickly make a new DotNetNuke module. When you run it you just need to select the module templates to install (you don't need the DotNetNuke Web Application Framework if you have a working installation of DNN already installed). The "Compiled module" templates are WAP and the "Dynamic module" templates are WSP. When you start a new project in VS, select the appropriate template (e.g under Visual C#) for a skeleton module project to get you started.

 
New Post
5/12/2009 8:33 AM
 

Laurence Neville wrote
 

See WAP or WSP Which to Use and Why for more info about the methods. I would say that WSP is quicker to get started but WAP is better for professional projects, i.e. for optimal performance and protection of source code. Both can be debugged, however it can be tricky to get the setup correct to enable debugging for WAP projects (hence numerous articles and posts on this subject including my own: WAP project with LINQ - can't seem to run project in DesktopModules/Module folder).

This is a good summation of why I use WSP mostly. However, WSP is still professional (some developer's feel differently so I am sure that is what you're referring too) and there is no difference between the performance.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/13/2009 5:24 AM
 

Michael - with WSP, compilation occurs "on demand" at runtime on the server, so doesn't that mean there is a performance hit compared to WAP where the code is already compiled before it is deployed to the server?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...WAP Modules - Multiple User ControlsWAP Modules - Multiple User Controls


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