Posted by: jasper22 | November 9, 2009

Skeleton for a Silverlight business application based on Ria Services and the Ria Services Class Library

Real business applications are completely different from samples that can be found in the Internet. The real applications have many layers because all architects are going to divide an application into them to decrease complexity and improve readability of the source code.

Any Silverlight application is a client application. It means the compiled code of such an application runs on the client tier and it has to have access to data that hosted on the server (middle) tier.

There are many ways to get data from the client tier:

    * Web Services (Asp.Net web services, Wcf etc)
    * Ado.Net Data Services
    * .Net Remoting
    * .Net Ria Services

Last one was developed specially for rich internet applications (Ria) and provides methods and framework to link client and middle tiers.

.Net Ria Services library adds new kind of Visual Studio project templates “Ria Services Class Library” which allows to create N-tier class libraries.

Also, .Net Ria Services has build-in abilities to use secure connection to protect important data like logins, passwords etc.

Building an application on the Ria Services basis has some tricks, that are not described, because mentioned technology is pretty new and it is available as Preview version (Jul 2009). So, I am going to unlock secrets of building real business applications based on .Net Ria services and Ria services Class Library.
Background

In my opinion, any silverlight business application must have following features:

    * Separate tiers (middle, client) and data transfer between them;
    * Access to data tier (database);
    * Authentication;
    * Data transfer between tiers via secure connection.

.Net Ria Services and .Net Ria Services Class Library allow to implement all features above. Demo application has all mentioned features and can be use as a skeleton for all other silverlight business applications.
Technical requirements

Following software was used:

    * Windows XP SP3/IIS 5.1
    * VS 2008 SP1
    * .Net 3.5 SP1
    * Microsoft Silverlight Projects 2008 Version 9.0.30730.126
    * Silverlight 3.0.40818.0
    * Silverlight Toolkit July 2009
    * Silverlight 3 Developer Package
    * Silverlight 3 SDK
    * .NET RIA Services (Jul 2009 Preview)
    * SelfSSL tool from IIS Resource Kit
    * MS SQL Server 2005
    * Web Development Helper 0.8.5.1 (IE plug-in)

Getting started

This article is concentrated on the back-end rather than the front-end part of the Silverlight applications. So, we can start developing the application based on Business Application project template. This template contains several predefined views, Login and passwords controls. Also, this template contains a couple of services (Authentication, Registration) that can be called from the client tier via Ria services mechanism.

Note: Business Application project template is available if you have installed .Net Ria Services framework (see below for details).

Read more: Codeproject


Leave a response

Your response:

Categories