Attention: We have retired the ASP.NET Community Blogs. Learn more >

Architect 1 : Building N-Tier Silverlight Application

You have a Customer table with fields of LastName and FirstName, and want to use Silverlight DataGrid to display all the records. To implement this, You can use N-tier application architect.

1.       The N-Tier Silverlight application consists of following layers: Data Entity, Data Access, Business, WCF Service and Silverlight Client.

2.       At data entity layer, build the class of Customer with properties of LastName and FirstName.

image N Tier1

3.       At data access layer, build the method of GetCustomers.

image N Tier2

4.       At business layer, build the method of GetCustomers. It is just a pass-through method from the data access layer because no business rule is involved here.

image N Tier3

5.       At WCF service layer, build the method (a service operation) of GetCustomers. It is just a pass-through method from the business layer because no business rule is involved here.

image N Tier4

6.       At Silverlight Client layer, create Customer XAML page, and add Customer DataGrid.

image N Tier5

7.       At Silverlight Client layer, in the Customer XAML code behind, build a procedure of GetCustomers, which is an asynchronous call to the WCF Service. And pass the result to ItemsSource of the Customer DataGrid.

image N Tier6

No Comments