dnner
 Nuke Pro Posts:67

 |
02/20/2007 10:13 AM |
|
Hi, I'm creating a simple module outside of DNN (In a seperate visual studio solution). However, when I try to access the local resource file I am running into a problem. Essentially, I make a call to the Dotnetnuke.Services.Localization.Localization.GetString method. The problem is that this method then tries to create a PortalSettings object but of course, there isn't one, because this isn't running in a dotnetnuke portal solution at this point.
Because of this the following line
"string mystring = Localization.GetString("NextMonth", "Test/MyModule/App_LocalResources/WebUserControl");"
returns "Object reference does not return an instance of an object".
How can I develop DNN integrated modules outside of a DNN portal solution?
Thanks for your help,
Marcus. |
|
|
|
|
Andy Hock
 Nuke Pro Posts:90

 |
02/21/2007 11:37 PM |
|
Hi Marcus:
When you say 'create DNN integrated modules outside of a DNN portal solution', I'm not sure what this means. Did you download the source code, update the web.config and use the DNN solution? Or did you use the WebApp feature of DNN? Tell us how you got to where you are.
I had the same issues, trying to create DNN modules w/4.x. It's incredibly different than creating modules in VS 2003...and frankly, I don't care for the app_code and app_data solution that Microsoft came up with for Web apps, so what I did is download the source, and opened the DotNetNuke 'solution' file (after updating the sln file to point at my virtual directory and not the default DotNetNuke_2 whatever virtual app).
From there I could add a new project, add a reference to System.Web and DotNetNuke and am building away. But I agree, it's not nearly as easy as it used to be. If you can tell us more, I can try to help.
Also, are you getting this error after installing the module? Or are you debugging inside a virtual directory that has the startup page/project referenced correctly? There's a lot in what you don't say that forces one to assume stuff...especially now that there are so many ways to create a DNN module project. Michael Washington has an excellent set of tutorials on creating DNN modules in DNN 4. I'm sure that Lee does too, though I'm not sure what they are, since I haven't used many of the videos.
You can click on my account and email me directly if you want, though I think it would be good for all to see whatever the eventual solution is for you. |
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
dnner
 Nuke Pro Posts:67

 |
02/22/2007 4:25 AM |
|
Hi Andy,
Thanks for your reply. I'm trying to create a DNN4 module in a completely seperate Visual Studio solution by referencing the relevent DNN dll's.
All is fine until I run it of course. This is because I'm running it outside of my DNN portal application so that when I make a call to a DNN function (in dotnetnuke.dll for example) it returns an error because it tries to create Portal objects. As I'm not inside my DNN Solution there is no current portal so the DNN methods throw an error.
I've created them before inside my DNN portal solution using the starter kit and find it a bit slow and clunky. The really annoying thing is that in order to test and debug my changes I have to fire up the whole application each time which takes ages. I also agree that the APP_Code/APP_DATA architecture is a bit tricky.
It'd be Soooo much easier to develop DNN modules in small lightweight projects that reference the DNN dll's and then integrate them into my DNN Portal solution when they're working.
Thanks for your help.
Marcus.
|
|
|
|
|
Andy Hock
 Nuke Pro Posts:90

 |
02/23/2007 2:17 AM |
|
Man, you are preaching to the choir here. I too would love to be able to just open up VS 2005, create a new project, actually *see* a 'DNN Module' VS template, point it to the DesktopModules folder, and get started. I mean, that would be the logical way to build stuff right? One would think, but unless one of us learns *why* this procedure isn't working, and until we then create a VS 2005 template that will create a DNN Module Project...well, we're sort of stuck.
I had downloaded the DNN News Feed project (which is not DNN 4 compatible...you have to convert it to DNN 4, though the project *is* in the previous format, while hiding, for some unknown reason, the sources in a renamed .resources file (you have to rename the .resources file to .zip to get the source)), and I then created another 'New Item', which then complained about the presence of the News Feed project references, and the only way to solve that problem was to unload the News Feed project. If the DNN projects aren't compatible with VS 2005, then all hope is lost until someone steps to the fore and realizes that many of us are using VS 2005, and not just the free Visual Web Developer.
I have one question for you. What did you set as the startup url in your project settings? Did you set it to the virtual directory of your site? Or bettwe yet, you are using a 2003 server for development and created a website with an IP address? If not, this could be the cause of your problem (though I know I'm reaching here). I'd be very interested to hear the answer. Perhaps between the two of us we can come up with a way to get around the DNN website/DNN module item paradigm, which is way too complex than it needs to be. I still haven't figured out where the project files are for the 'DNN Module Items'.
Michael Washington, one of the nicest guys on the core team, has some excellent tutorials for using the current paradigm, but like you, I'm really not interested in having to see the entire DNN core when I'm building a module. I'd rather just be able to link to the DotNetNuke.dll, have the project URL point to the DNN virtual directory default.aspx file, have the application point to the core DNN web.config file (this might be part of the problem also--when you create a 'project', by definition, VS 2005 assumes you need a new web.config file, as *each* web or app project requires a web.config or app.config file).
So let me know what your project startup is pointing to. We'll start from there.... |
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
Andy Hock
 Nuke Pro Posts:90

 |
02/27/2007 3:57 AM |
|
Hey Marcus: After spending in inordinate amount of time dealing with the WAP paradigm in DNN 4 and more specifically VS 2005, my solution has been to abandon the whole paradigm. Just trying to find your dlls after you get everything working is a nightmare...and the whole procedure, once you figure it all out shows that it's not a procedure meant for those that want to build modules and offer them to others. So, back in DNN 3 days, I used a program called DAL Builder Pro 3 to set up new modules. I didn't need to use it, but for 40 dollars, it was worth it to create stubs (and base table design...for simple modules) of code for C# or VB that created actual DLLs, and that you could use 'outside' of dnn. I hadn't thought Bo Norgaard had updated the program for DNN 4, but I finaly, in my desperation did a google search on it, and found this: http://www.snowcovered.com/snowcove...ageID=5883I can't recommend it enough. Not only does it allow you to craete a 'solution' that you can open in VS 2005, but it also creates the class library/data provider dll paradigm that we are using at fingerfuel.com to buid our modules. It even creates a 'web service' folder, though it doesn't actually create a web services project, so you can simply add a web services project to the module solution, then reference the module class library (for the business code) and the data provider dlls, and you basically have a way to create both a normal dnn module, and a dnn module that could potentially call the web service instead of the class libraries. Hope this helps. You have to get DAL Builder Pro3 and then the DNN 4 plugin, but heck, even if you consider your time worth 5 dollars an hour, it pays for itself in the first project. I had considered creating my own .vstemplate to create the module project in the same manner as all the dnn 'projects' available for download, but after purchasing the DNN 4 plug in, I no longer thing I need to. |
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
dnner
 Nuke Pro Posts:67

 |
02/27/2007 4:29 AM |
|
Thanks Andy,
This looks really good. The million dollar question is.... "Can you run and debug the module from within the DAL Builder solution"?
For example, if I create a really simple Hello World module (ascx) that has a just a DNN label on it. I then use "Localization.GetString("HelloWorld", "Test/MyModule/App_LocalResources/HelloWorld_UserControl");" which is the DNN function to return the language text from the resource file. Will this work from the DAL Builder solution?
Cheers and thanks for your help on this.
Marcus. |
|
|
|
|
Andy Hock
 Nuke Pro Posts:90

 |
03/01/2007 1:01 AM |
|
Hey:
The DNN 4 plugin for the DAL Builder Pro 3 module will work fine. All you have to do, once you go through the wizard and create the site, is to open the solution (it will be in the DesktopModules/MyModule/ folder), right click on the 'MyModule' solution, and select 'Convert to Web Application'. Once you do this, you will be able to debug the app fine. Of course, you would need to install it on the DNN site, either with a zip of the debug dlls, or via Host->Module Settings->etc.
It's still not the idea solution. I have tried to contact someone named Vladan who has the beginnings of a 'blank module' solution for DNN 4. If I don't hear back from him, I am planning on building my own vstemplate, that will allow me to use the architecture I want, since it just isn't available anywhere.
But, at least you can *find* the dlls using the above solution. Trying to find the dlls using the 'DNN Module' 'item' just doesn't get it done.
|
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
Andy Hock
 Nuke Pro Posts:90

 |
03/01/2007 10:30 AM |
|
Hey Marcus:
I would hold off purchasing that DAL Builder plugin as yet. There are some issues with it, that hopefully the person who released the plugin for DNN 4 (Leon something) will address. Until then, I would go with Vladan's 'blank module' solution. The plugin is not quite ready for prime time yet. |
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
David Lumley
 Nuke Newbie Posts:1

 |
03/02/2007 10:15 PM |
|
Go look at the Visual Studio2005 tutorial at http://www.powerhousedata.com
There you will see how a macro is created that allows you to click a button and have a DNN module set up for development. Unfortunatly the Macro only crates a module that only displays a list object maybe it could be updated to allow more custom type modules. |
|
|
|
|
dnner
 Nuke Pro Posts:67

 |
03/06/2007 4:51 PM |
|
Thanks everyone for your responses. I'm now using Vladans blank solution module and am developing modules fairly quickly.
I'm uUsing this with a combination of codesmith dnn templates which also helps to speed things up a bit.
Cheers!!
Marcus. |
|
|
|
|
Andy Hock
 Nuke Pro Posts:90

 |
03/08/2007 11:32 AM |
|
Hey Marcus:
Glad to hear you solved the problem. I also ended up using Vladan's Blank Module to get going, after spending a week debugging the module I purchased--which will eventually be a good product, but has some issues right now.
I wonder, which CodeSmith templates are you using? Got a link?
Thanks Andy
|
|
 DotNetNuke and .NET web parts, web services, modules and code snippets. |
|
|
wes
 Nuke Newbie Posts:2

 |
02/17/2008 9:53 AM |
|
Are there any new developments as it relates to the VS plug-ins for module development (preferably VS 2008)? I am looking for a dnn module development envronment in c# and any resources related to the topic of dnn module developemnt.
Thanks, Wes |
|
|
|
|
wes
 Nuke Newbie Posts:2

 |
02/17/2008 10:04 AM |
|
How can I get hold of Vladan's Blank Module? are there any other VS project templates/examples for dnn modules? any c# examples of silverlight modules?
Thanks, Wes |
|
|
|
|
Joseph Craig DNN MVP Posts:11667

 |
02/17/2008 10:10 AM |
|
I'm not sure that there is a lot of VS2008 stuff specifically available. For DotNetNuke module development ideas, resources and information, I always check Michael Washington's web site at http://adefwebserver.com. You will also fine some Silverlight information there and, I think, an example module that uses Silverlight. As for Vladan, google "Vladan's Blank Module" and you'll see lots of references. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
sk.rajes
 Nuke Newbie Posts:3

 |
04/04/2008 2:31 AM |
|
HI,
I'm having a problem regarding the creation of a new module. I followed according to the Building Websites with VB.NET and DotNetNuke 4 which is to build a coffeeshoplisting module, the creation part was goin well but when it came to the sql there seem to be some error with it, and im not sure how to solve the error eventhough i typed according to what the book has , and some of the vb codes which i typed in which was also from the book has some problem.Is there any simpler way for me to create a module with a database. It's for a school project and i cant seem to get it to work. Urgent!!!
Thxs
Rajeswari |
|
|
|
|
sk.rajes
 Nuke Newbie Posts:3

 |
04/04/2008 2:31 AM |
|
HI,
I'm having a problem regarding the creation of a new module. I followed according to the Building Websites with VB.NET and DotNetNuke 4 which is to build a coffeeshoplisting module, the creation part was goin well but when it came to the sql there seem to be some error with it, and im not sure how to solve the error eventhough i typed according to what the book has , and some of the vb codes which i typed in which was also from the book has some problem.Is there any simpler way for me to create a module with a database. It's for a school project and i cant seem to get it to work. Urgent!!!
Thxs
Rajeswari |
|
|
|
|
Joseph Craig DNN MVP Posts:11667

 |
04/04/2008 7:17 AM |
|
Did you also take a look at the websites mentioned in the above thread? Michael Washington's site, in particular, has some tutorials that show you how to create some simplified modules. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
andyb1979
 Nuke Pro Posts:63

 |
04/09/2008 9:00 AM |
|
I just stumbled on this thread and found it very useful. Im hoping to get into module development soon(ish) and the solution presented here for a module template is very good. Shame there isnt a C# example, and shame for that matter, that there arn't some module development tutorials on DNN creative! |
|
Sites I made thanks to DNNCreative vids! Rock Rhyme & Reason Fest | The Big Match | Calvary Stockport | Stephen Webster |
|
|
Joseph Craig DNN MVP Posts:11667

 |
04/09/2008 7:34 PM |
|
Michael Washington's tutorials are mostly in C#. His newer tutorials are emphasizing use of LINQ to do the SQL parts. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|