DNN Blog

Apr 10

Posted by: Jon Henning
4/10/2009  RssIcon

I finally was able to get the multi-project template functionality working to enable the easy creation of a DotNetNuke Silverlight module.  The sample demonstrates how easy it is to have Silverlight interact with javascript, which in turn can talk directly to your server-side module code.  Unlike the other module templates, this one requires the creation two projects, one for your DNN module and one to host your Silverlight code.  Upon compilation, the Silverlight code gets zipped up into a file with a XAP extension.  This then gets packaged into the DNN module installation package and a source package. 

The diagram above shows the basic interactions with the server-side code and the client.  The DotNetNuke Framework box should be straight forward, as the previous AJAX templates work this way.  The server-side gray box simply denotes static files served up by IIS.  However, when the client loads them, you end up with managed C# or VB.NET code running on the client.  The interaction between our client-side module and the rest of the framework is quite cool.  When I was writing this code, I found myself saying, Wow!  It just works as I would expect!  I plan on creating a video explaining this soon. 

Since the Silverlight code can interact with javascript, it can easily call the dnn.xmlhttp methods to initiate a Control Method call to the server.  Those familiar with the edit-in-place capabilities in the Text/HTML module should know the Control Method calls work with the standard ASP.NET forms authentication scheme, which means we can easily verify the rights of a user.  The module generated from the template prove this point.

DNNSilverlightModule

Finally, I wanted to note how cool it is that Blend can open up a sln file directly and even compile it!  This means that you can open the same template solution, edit the XAML (UI) and compile directly in Blend.  Then simply refresh your dnn/install/install.aspx?mode=installresources link to re-install the module, and refresh your page with the module to instantly see your modifications.

Excited?  Go grab it now from CodePlex!

Tags:
Categories:

1 comment(s) so far...


Gravatar

Re: New DotNetNuke Silverlight Module Template Published

Very cool, I want to create a presentation on Silverlight and DNN. I will definitely include this in the presentation.

By Shawn Mehaffie on   4/12/2009
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.