DNN 3.x module development guide?

Last post 04-27-2005 9:04 AM by RussianNuker. 35 replies.

Sort Posts:

  • DNN 3.x module development guide?

    11-22-2004, 1:22 PM
    • Contributor
      2,484 point Contributor
    • toddhd
    • Member since 06-18-2002, 10:03 AM
    • Edina, MN
    • Posts 527
    I remember reading somewhere that the developer guide was going be a priority for this release, but I didn't see it in the Docs. Is such a thing in the works? We haven't had a sample module ascx and vb since DNN 1.x.

    Also, in DNN 2.x, we were reffered to the Survey module as the "sample" of how to build a custom PA module. Is that still true now?
    -Todd Davis
    http://www.SeaburyDesign.com
  • Re: DNN 3.x module development guide?

    11-22-2004, 1:35 PM
    • All-Star
      16,504 point All-Star
    • hooligannes97
    • Member since 09-26-2003, 2:57 PM
    • Bolivia
    • Posts 2,917
    • Moderator
    From what I have read, the guide should be released in time with the first non-beta release or slightly before it.

    I have not gone into Survey yet...
    Do you know the truth when you hear it?
  • Re: DNN 3.x module development guide?

    11-22-2004, 2:32 PM
    • Star
      13,100 point Star
    • JWhite
    • Member since 06-26-2002, 10:30 AM
    • New York
    • Posts 2,616
    ALL of the core modules are now PA's, so you have plenty of examples.

    There is a 50 page document that has been written regarding module development for 3.0 that is currently being examined and commented on by the developers in the 30 for 3.0 program. I know it's missing some last minute changes that were made. I think with the next public release you may also see that document.
  • Re: DNN 3.x module development guide?

    11-22-2004, 4:34 PM
    • Member
      340 point Member
    • jangeador2
    • Member since 07-08-2003, 11:57 AM
    • Arizona
    • Posts 68
    I would really like to get ahold of that document as soon as possible, perhaps while we are still in the beta, this way I can get to work updating all my modules, and I do not have to wait after the release to change my modules.
    jangeador





    delianna.com
  • Re: DNN 3.x module development guide?

    11-22-2004, 7:01 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    I may be able to help you some if you run into trouble. I have got 6 or so modules close to done and have been working with 3.0 longer then a few days.

    Are you looking to take advantage of new features? if so what? I have implemented new features from IPortable, ISearchable, & IActionable so I may be able to shed some light for you since I am pretty sure the core guys are swamped for time.

    My 2 best friends during the upgrades to these modules have been the search tool in the object browser, & all the Core PA's that are included. along with a *nix port of Grep.

    Cheers,
    Dave
  • Re: DNN 3.x module development guide?

    11-22-2004, 7:02 PM
    • Contributor
      5,867 point Contributor
    • adefwebserver
    • Member since 06-07-2003, 12:50 PM
    • Los Angeles, CA
    • Posts 1,185
    I Installed 3.0 and opened it up in VS2003 and noticed that there were a bunch of solution files. I use the development environment described on dotnetnuke.dk (http://www.dotnetnuke.dk/Default.aspx?tabid=59) Should I not use this setup anymore or do I simply include them as projects as he describes on dotnetnuke.dk?
  • Re: DNN 3.x module development guide?

    11-22-2004, 8:33 PM
    • Member
      340 point Member
    • jangeador2
    • Member since 07-08-2003, 11:57 AM
    • Arizona
    • Posts 68
    Thanks Dave, I would definitely take you up on your offer to help. I guess that I don't have a specific question right now, but I have a little trouble converting my strings to the resource files.

    Do I just create a folder named App_LocalResources, and follow just like the example. Can you tell me how and where is the code to tell my module to go look for that res file?
    jangeador





    delianna.com
  • Re: DNN 3.x module development guide?

    11-22-2004, 10:34 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    jangeador,

    Your welcome =)

    As far as App_LocalResources are concerned, there are a few steps involved.
    1) Copy a core .resx from their App_LocalResources or one from your .ascx.

    2) Clean all the data out into a blank template for when you need this again. If using VS.Net you can open it and just delete the items from the grid. If you use notepad or something else, this will need done by hand. If doing by hand remove all the tags like below...

    <data name="plSomeSetting.Text">
    <value>Your Setting Name</value>
    </data>
    <data name="plSomeSetting.Help">
    <value>A Description of your setting.</value>
    </data>


    3) Add the tags I have above so you can easily see what you need the next time you need to do this, and save it.

    4) Add a App_LocalResources Folder to your project and a copy of the resx in there.
    5) Rename the Resx to reflect the exact name of your ascx control. e.g. MyControl.ascx.Resx


    To use this in a module you have a few choices...

    1) in your ascx add a directive for
    <%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>


    2) Add the label to the control...
    <dnn:label ID="plSomeSetting" RUNAT="server" CONTROLNAME="txtSomeSetting" SUFFIX=":"></dnn:label>


    The important thing to note here is the ID, and the ControlName. The ID is what ties this to your resx file, the controlname is for the control the label is for.

    Second choice is as follows
    1) if your using a label and want the text localized do as follows...

    txtSomeLabel.Text = DotNetNuke.Services.Localization.Localization.GetString("Options", this.LocalResourceFile);

    as this is C#, replace this. with Me. for VB.Net!

    To include this in your PA Install....
    1)Right Click the App_LocalResources as zip it, rename it Resources.zip, and add it to your zip for the PA.
    2) make the top of your .DNN look like so. If your using the <businesscontrollerclass /> tag make sure it is before <resourcefile />.

    <?xml version="1.0" encoding="utf-8" ?>
    <dotnetnuke version="3.0" type="Module">
    <folders>
    <folder>
    <name>SomePA</name>
    <description></description>
    <version>01.00.00</version>
    <resourcefile>resources.zip</resourcefile>
    <modules>


    HTH's,
    Dave
  • Re: DNN 3.x module development guide?

    11-22-2004, 10:48 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    Michael, (adefwebserver)

    I have never read Bo's solution to doing this, but I can offer what I am doing.
    1) I put DNN into a virtual directory and edit the .sln & .webinfo's to this location. e.g. http://localhost/DNN30/DotNetNuke.vbproj
    2) I open DotNetNuke.sln

    3) I right click the solution in VS.Net & add a new or existing project. To be proper on this though I belive best practice is to create your own .Sln & reference DotNetNuke.dll as an assembly and not a project.

    NOTE: I do not place my projects under the DesktopModules folder. I use a MyCompanyName based folder under the DNN root instead. This saves me the worry of will DNN delete my module when I test the uninstall script.

    4) Make sure your compiling these PA's to their own bin folder.

    For another example of how this is done, take a peek at the DotNetNuke.All.sln.

    HTH's,
    Dave
  • Re: DNN 3.x module development guide?

    11-23-2004, 8:39 AM
    • Contributor
      5,867 point Contributor
    • adefwebserver
    • Member since 06-07-2003, 12:50 PM
    • Los Angeles, CA
    • Posts 1,185
  • Re: DNN 3.x module development guide?

    11-23-2004, 9:30 AM
    • Star
      13,100 point Star
    • JWhite
    • Member since 06-26-2002, 10:30 AM
    • New York
    • Posts 2,616
    The 3.0.4 Beta uses Bo's setup, some items have just been renamed. I think we use BuildSupport where Bo used DNNFramework. The DotNetNuke.All.sln will open up and is built like Bo's setup describes and is now the preferred development method. There are several other sln files depending on what you need to edit and how long you are willing to wait for a build process to finish. The DotNetNuke.All.sln contains all 53 projects we currently have so you could edit/alter/debug just about anything. If you add your own project to the sln (for custom module development for instance) be sure to add a refrence in the BuildSupport project.
  • Re: DNN 3.x module development guide?

    11-23-2004, 11:31 AM
    • Member
      340 point Member
    • jangeador2
    • Member since 07-08-2003, 11:57 AM
    • Arizona
    • Posts 68
    Thanks Dave,

    After reading these posts, I realize that perhaps I am doing something wrong. All of my module development has been done in the blind, that is, I don't know how to use the debugging capabilities of VS.net to step through my module code. Instead, I rely solely on the DNN Log Viewer, and a working copy of the module.

    My question: Is there anyway to use the VS.net debugger to step through the DNN code, and if so, how is this accomplished?

    Thank you all,
    jangeador





    delianna.com
  • Re: DNN 3.x module development guide?

    11-23-2004, 11:43 AM
    • Member
      340 point Member
    • jangeador2
    • Member since 07-08-2003, 11:57 AM
    • Arizona
    • Posts 68
    Disregard my last question, as the guide posted in this thread had the solution. I just needed to setup the start project and page, and set the Compilation Debug to true,

    Thanks,
    jangeador





    delianna.com
  • Re: DNN 3.x module development guide?

    11-23-2004, 8:18 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    Jeremy,

    Thanks for clairifying this! =)

    Dave
  • Re: DNN 3.x module development guide?

    11-23-2004, 8:25 PM
    • Contributor
      4,760 point Contributor
    • DBuckner
    • Member since 01-23-2003, 11:10 PM
    • Illinois
    • Posts 952
    jangeador2,

    I am glad to hear you got debugging going. it is very useful to have! =)

    Another thing I like to do myself so I can hit the break points only in a certain peice of code while having them set on a few other peices is to use vs.net tools/debug process menu item or Ctrl + Alt + P and connect it to the aspnet_wp.exe process, or whatever else I am debugging. Also set the mode that when debugging is stoped to detatch from the process. This will allow the app to close down normally and not terminate.

    HTH's,
    Dave
Page 1 of 3 (36 items) 1 2 3 Next >