Dec
7
2009

RIA Services Enterprise Business Application Attempt Part One

A question that has come up a few times on the forums is how the Silverlight Business Application template can be modified to make it more enterprise friendly. This means moving the Authentication DomainService into a separate WCF RIA Services Class Library and removing the RIA Link from the main application. Attached is my first attempt at doing this. What I have done is create a new WCF RIA Services class library named AppServices. At this point, there is no change in any functionality and other then some namespace differences everything should work exactly like the original template did.

I have several additional changes that I am planning to make. My planned steps:

  1. Refactor the Business Application Template to use a class library (complete)
  2. Build in the MEF links from Brad's example here
  3. Convert the sample project into a Visual Studio template and add to RIA Services Contrib
  4. Prove the template my re-implementing Brad's PDC demo using the new template

EnterpriseBusinessApplication08.zip (2.11 mb) C# VS 2008 Version

BusinessApplicationTemplate.zip (2.19 mb) C# VS 2010 Version

The part I am most worried about is step 3, converting something this complex into a Visual Studio template is not something I have done before and I am not sure what the best method is to accomplish this. If anyone has any tips or blog urls that I should take a look at please let me know. Also, if you disagree with any design decisions I am making let me know. For example, I am not sure about the AppServices name I picked for the project. 

Thanks to Max Paulousky who wrote an article on CodeProject that solved a problem I was having with getting the WebContext to find the AuthenticationDomainContext.

Update: There is now a VS2008 version and I improved on Max's original fix by casting to WebAuthenticationService instead of FormsAuthentication so that the code no longer needs to be changed to switch to WindowsAuthentication. That change was made to both versions. Some people are having trouble with errors saying that a DLL isn't trusted. Brad has a blog entry explaining the problem

blog comments powered by Disqus

Month List