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...Building ExtensionsBuilding ExtensionsModulesModulesCan a module contain a mix of compiled code (from a WAP project) and uncompiled (from WSP)Can a module contain a mix of compiled code (from a WAP project) and uncompiled (from WSP)
Previous
 
Next
New Post
8/26/2010 8:58 AM
 
This is one of those questions where I could just wade in and try to figure it out, but I'd rather ask for some tips first so I don't head down a blind alley :) Here's what I am trying to accomplish:

I am writing a module which will have a large number of .ascx User Controls on top of a common business logic and data layer. The intention is that the "core" of the module (the business logic and data layer) goes through a managed release cycle, whereas the User Controls can be added/updated as needed, independent of the release cycle. There is nothing hard coded in the core or .dnn manifest that references any particular User Control - at runtime they are loaded dynamically based on data in the database. Basically these 2 aspects of the module will be in the hands of 2 different teams of people - .NET developer team manages core, web designers manage User Controls, and the teams need to be able to work independently.

Each User Control's code behind file has to inherit from a "user control base class" that is part of the core. The base class contains a few methods that the user control can use to help load, validate and save its data.

I am dynamically injecting the user controls into PlaceHolders in my module's default ASCX control using code like the following:
            
Dim ic As InputControlBase
Dim InputControlPath as String = DotNetNuke.Common.ResolveUrl(InputControlsPath & InputControlASCX)
ic = 
CType(Me.LoadControl(InputControlPath), InputControlBase)
phInputControlPlaceHolder.Controls.Add(ic)

The core of the module would be a WAP project in VS. The user controls would be a WSP project. The WSP project would have a reference to the core's assembly so that the user controls could inherit from the base class maintained in the WAP project.

So now a few questions:

Is the above in theory possible?

Could the code in the 2 projects share a common namespace, or mayeb the user control code live in a "sub namespace" of the core's?

Could the user controls live under /DesktopModules/ModuleName/Controls, or does all uncompiled code have to live in /App_Code?
 
New Post
8/26/2010 9:14 AM
 
I'd have the WSP code be under the namespace of the core.

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/26/2010 9:18 AM
 
Why?
 
New Post
8/26/2010 3:33 PM
 
Well for one thing it will reflect what I have chosen to organize the code. Then it can help other coders to understand that the subnamespace hints at a requirement of the WAP module to exist. In time the WSP and WAP code get separated, and the site will have problems. Personally I wouldn't write the WSP depending on the WAP. I'd write a library and then have a combination of WAP and/or WSP.

Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCan a module contain a mix of compiled code (from a WAP project) and uncompiled (from WSP)Can a module contain a mix of compiled code (from a WAP project) and uncompiled (from WSP)


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