Search Results
No search term entered.

  

My Blog

Quick note to spruik my new book Silverlight For Dummies, you can buy it all over the net and at good book stores.

In Part 1 I set up the standard Starter Kit module to use interfaces and be more testable.  In Part 2 I will implement the MVP Pattern using the Web Forms MVP project that is now included as part of DotNetNuke.  The following code samples assume you are using DNN 5.4.  There are a few changes from DNN 5.3 that make it easier to write tests and get around an issue with Windsor Castle’s problems with classes that implement more than one interface.

In Part 1 I listed the classes and interfaces we will need.  The M part of MVP is for Model so the first class to add will be the model for the module.  The model will store any properties you need such as whether the item is editable, the lsit of items and any other properties you will need to store for use in the presenter.  In this way its a little like the View-Model used in MVVM.

Follow these steps to add the models for the Edit and View aspects of your module:

Right click the Models folder and select Add Class. Name the first class ViewWebformsMVPModel....

Read More »

I wrote this script to help me be able to quickly run up a new auto installed DNN site from a zip file.  Check it out and please use yourself.

#cd "C:\DotNetNuke\ProReleases" cd "C:\DotNetNuke\Releases" $CurrentLocation=get-location

#$CEorPE ="Professional" $CEorPE ="Community" $version="050400" $ZipFile = "$CurrentLocation\5.4.0\DotNetNuke_Community_5.4.0.94_Install.zip" $websiteName = "DotNetNuke" + $CEorPE + $version + "Install" $websiteAddress = "DotNetNuke" + $CEorPE + $version + ".Install" $dbname = "DotNetNuke" + $CEorPE + $version + "Install" $physicalPath = "DotNetNuke" + $CEorPE + $version + "Install"

#remove existing IIS Site and App pool Import-Module WebAdministration Remove-Item iis:\Sites\$websiteName -Recurse Remove-Item IIS:\AppPools\DotNetNukeAppPool -Recurse

$shell=new-object -com shell.application

$CurrentPath=$CurrentLocation.path

$OutPutPath = "$CurrentPath\$physicalPath"

$OutPutLocation=$shell.namespace($OutPutPath)...

Read More »

 This morning at the QA team meeting we discussed the Testable DNN Module and its use of Webforms MVP to make it testable.  During the conversation we decided we needed some step by step information on how it all ties together in a “Michael Washington” style tutorial.  Charles Nurse has written up a great post on the theory behind the use of Webforms MVP here, so this tutorial will be more along the lines of what to do not why you do it.  Please make sure you read Charles’ post because I am assuming you have.

Read More »

In Part 3 we did the basics of setting up MVVM for our module.  Now lets look at getting some data into our application using RIA Services.  It’s fairly straight forward to set up RIA Services as the Visual Studio templates do all the lifting for you.  Follow these steps to add RIA Services to your solution:

Note: I have change the table name for the Announcements table to Announcement so that the generated class names and collections make more sense.

We already added the project we are going to use so go to AnnouncementServices and Add a New Item and choose Linq to Sql Classes, and call it AnnouncementDataClasses.dbml. You can use Entity Framework here if you prefer.image...

Read More »

I have been adding the source code for this blog series on my Downloads page at each step and I also loaded it up to CodePlex. http://dnnsilverlightria.codeplex.com/.  If you would like to contribute please contact me.

So we’re all set to write some code now.  I will be using the MVVM pattern to separate the concerns and to make the logic testable.  MVVM stands for Model – View – View Model, the View is the MainPage.xaml, the View Model will be MainPage.vm.cs and the Model will be our list of announcements.

Add a new Silverlight class to the MySilverlightApplication project and call it MainPage.vm.cs, this will be the code file for the View Model. I have a registry entry that assocaites my MainPage.vm.cs file with my MainPage.xaml.cs file the same way the MainPage.xaml.cs file is associated.  It looks like this for my 64 bit machine Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\RelatedFiles\.xaml] ".xaml.cs"=dword:00000039 ".cs"=dword:00000002 ".vm.cs"=dword:00000039 ".design.cs"=dword:00000039

Change the name of the class to MainPageViewModel, Now we need to set...

Read More »

Now that you have your modules registered place it on a page.  You should see your module with an empty Silverlight control inside it.  Now switch to the settigns for the module and hit the checkbox to change it to load the SLTest Silverlight control.  This will execute the one test that is in teh file at this point and it will fail giving you the following result.

image

As you can see the testing results panel shows up as it is conducting the tests and gives you the result.  This is an excellent way to create integration tests for your module and it makes it very easy to ensure...

Read More »

This series of posts will show you a bunch of things I have learnt about building integrated Silverlight – DotNetNuke modules with RIA Services

Projects to add:

Add a new Silverlight Project.  Call it MySilverlightApplication. Select to host it in a new Web Application called MySilverlightApplication.Web and check the Enable RIA Services link. Add a new Silverlight Unit Testing project and call it MySilverlightApplication.SLtest. Add a new Unit Test Project and call it MySilverlightApplication.MSTest Create a Solution Folder called Modules and move these four projects into it. Create another solution folder and call it Services. Add a new .Net class library (not a Silverlight one) and call it AuthenticationServices Our module is going to interact with the Announcements table so add another .Net class library and call it AnnouncementServices Ok we now have all the projects we need to build a fully testable and Blendable Silverlight Application for DotNetNuke.  Let’s...

Read More »

Last week I attended Tech Ed Australia for the 5th time in a row and what a great time was had by all.  I did plenty of networking (really means beer drinking with delegates) and attended a bunch of cool sessions and I even delivered a lunch time session on my fave topics, DotNetNuke, Silverlight and RIA Services.

I went to a bunch of Silverlight/UX sessions by Shane Morris (Microsoft) which were excellent and really brought home to me how much room for improvement there is the application/site design UX space.  So Im really going to be pushing some of his recommendations and finding ways to convince clients that there are better ways they just have to trust me :)

Jordan and Mahesh who both work with me at Readify gave an excellent session  on architectural considerations when building Silverlight applications and Jordan...

Read More »