nik

I like to do my DotNetNuke development treating DNN as a black-box. With version 3.x, DNN has around 50 projects and to use any of the solutions in the package is time-consuming as they contain projects that are rarely needed during module development. Is there a way in which you can keep your module development separate from DNN, maintain references to controls etc. in your module script files and maintain a way to easily upgrade? I believe there is and I have been working with such a setup for a couple of weeks now, and everything seems fine. Before I describe my solution, a few things to note:

1) This works for me. Your mileage may vary.

2) I do all of my development in C#. I did however test this with a VB.Net module and it worked fine.

3) Unlike what a lot of other DNN experts recommend, I do not setup my modules as Class projects. I prefer to set them up as a web project because it gives me the ability to use all the web capabilities of VS.Net without messing around with registry keys and such. It takes only a few seconds to remove the application flag from the IIS MMC when VS.Net creates the module project and this is too small an inconvenience to forego all the benefits of having a web project.

OK, now for my solution.

I first created a new Solution in VS.Net. I named my solution DNNDev and created it in my existing DNN3 folder. VS.Net wants to put a new Solution in a folder with the Solution name, so I exit VS.Net, moved the DNNDev.sln and DNNDev.suo files to the DNN3 folder and then deleted the DNNDev folder. Now, I had my DNNDev.sln file in the same folder as the DotNetNuke.sln file.

The next thing I did was make a copy of the Default.aspx file. I named my copy DefaultOriginal.aspx. I then opened up Default.aspx in Notepad, and removed the CodeBehind attribute of the Page directive. (This is the only change to the DotNetNuke package that my solution requires.)

I opened up DNNDev.sln in VS.Net and added a new VB.Net web project. I named the project DNNShell and created it in the DNN3 root folder. I deleted the AssemblyInfo.vb, Global.asax and WebForm1.aspx files that VS.Net automatically created. I then removed the project from the DNNDev Solution, saved the solution and exited VS.Net.

Next, I moved the files DNNShell.vbproj and DNNShell.vbproj.webinfo that VS.Net put into a DNNShell sub-folder, into the DNN3 root folder and deleted the now useless DNNShell sub-folder. I edited DNNShell.vbproj.webinfo with Notepad and fixed the project URL reference to exclude DNNShell from the path.

I then re-opened DNNDev.sln in VS.Net and used Add Existing Project to add DNNShell back to the solution. With this setup, I am now able to add my custom module projects to DNNDev Solution, and treat DotNetNuke as a black box. Each time I add a custom module project to the Solution, I add a Project Reference to that project in the DNNShell Project. This ensures that my custom module’s assemblies end up in the DNN3 bin folder.

That’s all there is to it. You can now develop/debug without any regard for assembly conflicts or have to wait for projects to load up in VS.Net.

If anyone wants it, I will be happy to package up my solution files so you can zip and go…

There is a lively discussion on the DotNetNuke Core Team forums about DNN stylesheets. If there is one area of DNN that I don’t care much for, it would be in how DNN handles stylesheets. It’s a bit messy and leaves even the most CSS-savvy designer scratching their head about how/where/why a particular style was inherited by a particular element.

Personally, I don’t think there is a need for host, portal, skin, container and module stylesheets. There should be one stylesheet used on the page and that is the skin stylesheet. All classes required by a page where the skin is applied should be defined in this stylesheet. While this may require a bit more work, it is definitive and portable.

 

A large number of DotNetNuke portals have a dependency on third-party modules. Being a “third-party module developer,” I am interested in finding out how much of an impact modules make on the decision to upgrade to DNN3.

If every module you use on your DNN 2.x portal has a 3.x-compatible version available (for free) on the day DNN 3.x is released, would you upgrade your portal to DNN 3.x?

 

Continuing my quest to have a fully-integrated version of DasBlog with DotNetNuke, I have made some progress.

My original intent was to leave the DasBlog core untouched, but as I poked around, it became clear that this is not to be. I started by putting the DasBlog source in a folder structure that would allow seamless conversion of the DasBlog aspx pages to DNN controls. I created something like this:

/DotNetNuke/DesktopModules/Speerio_DasBlog/{main DasBlog web files}

/DotNetNuke/DesktopModules/Speerio_DasBlog/SiteConfig

/DotNetNuke/DesktopModules/Speerio_DasBlog/Themes

etc.

After several false starts in getting the IIS application mapping correctly, I had a DOH! moment. I moved the DasBlog web.config into /DotNetNuke and made /DotNetNuke into an application. That worked…almost…got a bunch of compiler errors, but at least I was making progress.

The source of the errors was that in several places in the code, DasBlog uses Server.MapPath(“somefolder/somefile”). Of course, this doesn’t work too well if it’s not in the app root. Time to break out the trusty and hard-working Search and Replace and replace all such instances with “~/DesktopModules/Speerio_DasBlog/”. Lift-off!? Nope…no such luck. Ran into an annoying VS.Net bug that prevents strong-named assemblies from working properly some of the time. Google says lots of people are having the same problem and the known solution is to not have strong-named assemblies (what kind of solution is that?) or build twice. The assembly in question is FTB and since I am not at the point where I can yank it out, I opted for the build twice.

After more of this, I now have DasBlog working using the revised folder structure. Next step, blow away the DasBlog security and have it look to the HttpContext instead.

Although my graphic illustration skills range from crappy to mediocre, on occasion, I will surprise myself by creating something that looks cool. For the longest time, I used a program called Xara. I then switched to Illustrator when I got a discounted license. I have never really liked Illustrator, because although it is very powerful, the tools are not intuitive. Once you RTFM and figure it out, it seems obvious, but I have had to do it often enough now that I am fed-up and have decided to switch back to Xara.

Since I last used it (about two years ago), Xara has evolved signficantly and there are now a number of features that make web graphics amazingly easy to create. I am switching back. So long Illustrator.

© 2012 TechBubble Suffusion theme by Sayontan Sinha