Mitchel's Forums

Subject: Packaging DNN Modules
Prev Next
You are not authorized to post a reply.

AuthorMessages
r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 1:29 AM  

Michael Washington explains in detail the steps required for packaging a module at:

http://www.adefwebserver.com/DotNetNukeHELP/DNN_PackageModule/Default.htm

However, there are 2 points that are missing from that tutorial:

1) The DLLs are created Folder wise. That means dll for code-behinds in DesktopModules & App_Code files are generated separately. And if there are sub-folders in the main module folders, they again have separate assemblies generated. But I have seen modules (including those shipped with DNN) have just 2 assemblies, the main logic assembly (including code-behinds) & the SqlDataProvider assembly??

So, how can I achieve the same, while preserving the folder structure of my module (or would I need to put everything in the same folder)??

2) I don't want to provide my clients with the ascx markup. So, if I create my assemblies without the following option:

Allow this precompiled site to be updatable

Would it be possible for DNN to pick up my module controls from the assembly. If yes, then how should I provide the control entries in the & section of DNN configuration file for my module???

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

05/29/2008 1:37 AM  
In this example you want to use the WAP development method, rather than the WSP.

This is why I use WAP in ALL of my development projects.

Are you using VB or C#?

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 1:41 AM  

I am using VB. And I dont know what is WAP or WSP development method. Can you explain a bit more???

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

05/29/2008 1:45 AM  
Sure.

WSP is Web Site Project, this is where you build your modules inside the dnn solution, and use the app_code folder.

WAP is Web Application Project, this creates an individual solution for each module and all code is stored in your module folder, it default compiles to a single DLL, and you can send them just the .ascx files and the .dll file. No .vb files are to be sent at all.

WAP for VB is done using the "Compiled Module" template that is part of the DNN starter kit.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 2:01 AM  

As I pointed out above, I dont want to provide my clients even with the ascx markup.

Is it possible for DNN to pick the controls from assemblies, if I compile them using 'Not Updateable' option???

r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 2:07 AM  

I get the following error while creating a compiler assembly project:

"The Project Path 'Path to temp files in local settings\myproj.vbproj' could not be opened.

The Project type is not supported by this installation."

What now?? I have the starter kit installed properly in my VS installation??

r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 3:29 AM  

Okay, I am searching & finding some things out!!!

Does the WAP coding model support modify & continue approach of code-behinds supported by WSP???

r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 3:38 AM  

I know this is going over the board ith questions, but Mich, you always have been very supportive

Is there any automatic way or tool to convert controls coded using WSP to WAP controls??

I mean I have found WSP approach better for development and WAP approach better for deployment. With WSP, I can modify the code-behinds without having the entire installation to recompile (off-course changes to App_Code classes need recompilation).

Although, I have not checked it, and put up a question for this above (that is still unanswered), I believe that when you debug WAP projects by attaching to ASP.NET process (read your blog on debugging WAP modules), the source code files (including code-behinds) would be locked up by VS. In effect, you would need to stop the process, make the change, restart & re-attach.

I believe converting from WSP to WAP should not be difficult, as code classes from App_Code can be simply copied. I have no idea about what to do with control (ascx) files & code-behinds. Any idea Mitch??

r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/29/2008 11:03 AM  

Mitchel, at the following thread on DNN forums:

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/231158/scope/posts/Default.aspx

Wes Tatters tells me that WASP project files can be converted to a WAP project by simple copy (ensuring that none goes to App_Code folder. Is that true & so simple for converting a WSP module to a WAP module??

If that's so, then I could not understand all these discussions among developers (including between you & Michael on DNN Forums) on which approach should be used, or is best.

There is no doubt about WSP's RAD & debugging advantages, and WAP's deployment ones. I would always develop my modules as WSP. Then, when they are complete, create a new WAP project, and add the existing files using 'Add Existing Item' option from VS context-menu appearing on right-clicking a Project node in Solution Explorer. That would further avoid copying effort & duplicate code-base.

As I have never done this before, and today was my first tete-a-tete with the WAP approach, would my technique work, and is there any problem with this approach???

r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/30/2008 1:34 AM  

Mitch, I would request your kind comments for the following thread:

www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/231158/scope/posts/threadpage/2/Default.aspx

And there are only 2 issues remaining now:

1) Does DNN allow complete compiles including markup (i.e. can it pick-up the ascx markup from compiled assemblies)???

2) For converting to WAP, I need to create a .designer.vb file for each ascx file. Do you know of any automated tool to do that???

Thanx!!!

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

05/30/2008 8:00 AM  
1.) Not within DNN, at least as far as I know, you must publish the standard .ascx file with your module. DNN doesn't support pre-compilation at the core level either.

2.) The designer.vb file should already exist, or when you "add" the existing item to your WAP project it should be automatically created.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
r_honeyUser is Offline
Regular User
Regular User
Posts:73

05/30/2008 8:43 AM  

Finally Mitch, I have been able to get everything through!!! And I greatly acknowledge your support together with support at DNN Forums in helping me & others out. Keep up the good work man... And Thanx a ton.

This is how I got everything through:

1) Just copied everything from WSP to a entirely new WAP project, that was in its own solution outside DotNetNuke solution.

2) Used VS to convert it into WAP (mainly the generation of designer files)

3) Here again, I was stuck. I could not found an article explaining deployment of a WAP module. I kept expermimenting for the last 3 hours, and now have it through.

Basically, just publish your WAP module by right-clicking its project name, make a zip file containing necessary resources (.ascx, .dlls, .resx & off-course .dnn). Finally, upload the zip to DNN in a standard way.

Is their any problem with the above process Mitch???

If not, I would always do it this way. Develop as WSP & deploy as WAP. I must say deploying as WAP also has another advantage. With WSP, you need to publish your entire DNN installation, and then pick up tour files from the compiled files. The DNN installation in itself can take a while to be published. But with WAP, this is a breeze.

THANX AGAIN MITCH

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

06/02/2008 11:03 AM  
You should be just fine with that process.

One thing that I do with my WAP modules is that I create a "build.bat" file, to automatically copy the needed files to a "deploy" folder that can be used to install the module, then I just have to zip the files and I'm set to go!

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
r_honeyUser is Offline
Regular User
Regular User
Posts:73

06/03/2008 9:24 AM  

Yes, I also tried creating a "build.bat" file, and asked VS to execute it as as a Post-Build event after a successful build. And that eased things further...

BUT!!! Really had to recall hard all those command prompt syntax for using variables, concatenating, echoing & all that. It was certainly worth the effort

StephenUser is Offline
New Poster
New Poster
Posts:2

07/29/2008 3:07 AM  

Mitchel,

Kind of on topic almost...

Do you know if there is a way you can have your dotnetnuke module project stand alone? I want to be able to check my module project into source control without having the whole dnn website also in the solution (and thus also in source control).

I've tried creating its own solution but running and debugging it is wanting the module to have its own virtual directory. I tried telling it to use the main dotnetnuke web site as it's main url but still no luck. Feel like i'm close but can't seem to get it to work.

thanks in advance,

Stephen

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

07/29/2008 8:56 AM  
Stephen,

You are looking to create your module using the WAP development mode, this is the way that I build ALL of my modules.

You will NOT be able to just click on "Debug" -> "Start with Debugging" you will be forced to use "Attach to Process" to do any debugging, but overall it works just fine. Have a look at the comments above, rhoney did a project migration to get it to WAP.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
r_honeyUser is Offline
Regular User
Regular User
Posts:73

07/29/2008 11:14 AM  

I almost do it this way now.

I develop my projects using WSP model (for greater productivity), and distribute them as WAP (for easier distribution).

I am able to convert a WSP project into a WAP project inside 5 minutes now using some DNN support projects I have developed for myself.

You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Packaging DNN Modules



ActiveForums 3.7