Loading

Windows Communication Foundation (WCF)

What is WCF Ria Services?. The Complete Windows Communication Foundation (WCF) Developer Course 2023 [Videos].

WCF RIA Service is a higher-level framework and a new component of frameworks like .NET 4 and Silverlight 4 that eases the procedure of building a complex business application in Silverlight by offering client-side validation. RIA stands for Rich Internet Applications.

It must be noted here that Silverlight is a framework offered by Microsoft, ideal for rich internet applications and is available for use as a browser plug-in, just like Adobe Flash.

WCF RIA Service is mainly based on the standard version of WCF service. The following figure illustrates a part of the WCF architecture, where WCF RIA services has its focus in general.

Wcf RIA Services 1

Creating a WCF RIA Service is the next step to have a better understanding of the concept. The step-by-step procedure is given below.

Step 1 âˆ’ Create a new web project of the name SLWCFRiaServices.Web using Silverlight 5 and then add a new item by selecting ADO.NET Entity Data Model to the same.

Wcf RIA Services 2Wcf RIA Services 3

Step 2 âˆ’ Now choose model contents from the Entity Data Model Wizard by generating the model from the database.

Wcf RIA Services 4

Step 3 âˆ’ From the same wizard, choose your data connection and database objects.

Wcf RIA Services 5Wcf RIA Services 6

Step 4 âˆ’ Build the solution so that in future, recognizing the data model will not a problem for the domain service you are going to create.

Wcf RIA Services 7

Step 5 âˆ’ Now create a domain service in the web project by adding a new item and make sure to enable client access.

Wcf RIA Services 8Wcf RIA Services 9

Step 6 âˆ’ In the very next step, some classes will be generated and it is essential to build them again.

Wcf RIA Services 10Wcf RIA Services 11

Step 7 âˆ’ In this step, DataDomainContext is displayed by the Data Sources Panel.

Wcf RIA Services 12

Step 8 âˆ’ In this step, the Video below the DataDomainContext should be selected and customized.

Wcf RIA Services 13

Step 9 âˆ’ Attaching the DataGrid Control with the Data Source is the step committed here, along with selection of themes. Here BureauBlue theme has been selected.

Wcf RIA Services 14Wcf RIA Services 15

Step 10 âˆ’ The last and the final step comprises of going to the design screen and adding entity in the layout area of the MainPage by simple drag and drop. It is also vital to ensure AutoGenerateColumns = "True" and to run it to view the output.

Wcf RIA Services 16Wcf RIA Services 17

Prerequisites

There are some prerequisites for experiencing the full potential of WCF RIA services −

  • Visual Studio 2010 / Visual Studio 2012
  • Silverlight Developer Runtime
  • Latest version of RIA Services Toolkit
  • SDK (Software Development Kit)

WCF RIA Domain Service

A domain service comprises of a set of data operations related to business. It is nothing but a WCF service that exposes any WCF RIA Service applications business logic.

A WCF RIA Domain Service has the hosting class DomainServiceHost internally, which in turn uses the WCF ServiceHost class for hosting the application. To make the domain service accessible for the client project, it should have the EnableClientAccessAttribute attribute. The attribute is applied automatically whenever a new domain service class is added.

The following figure shows the architecture of a WCF RIA Domain Service −

Wcf RIA Services 18

WCF RIA Services – Querying Data

The following figure shows how a query is created on the client side and executed on the server side to return queryable results. DAL stands for Data Access Layer.

Wcf RIA Services 19

WCF RIA Services – Updating Data

The following figure shows how data is updated by executing the CUD (Create Update Delete) operation on the server side. It should be noted here that WCF RIA service is always stateless on the server side.

Wcf RIA Services 20


See All

Comments (753 Comments)

Submit Your Comment

See All Posts

Related Posts

Windows Communication Foundation (WCF) / Blog

What is WCF?

WCF stands for Windows Communication Foundation. It is basically used to create a distributed and interoperable Application. WCF Applications came into the picture in .Net 3.0 Framework. This is a framework, which is used for creating Service oriented Applications. You can send the data asynchronously from one end point to another. I think you all know about Web Service and are thinking, if we already have Web Services and accessing on a remote basis then why did WCF come into picture?
22-Apr-2022 /50 /753

Windows Communication Foundation (WCF) / Blog

Major differences that exist between WCF and a Web service.

WCF (Windows Communication Foundation): WCF, as the name suggests, is a unified .NET framework that is used to develop service-oriented applications. It allows you to develop applications that can communicate using different communication mechanisms.
22-Apr-2022 /50 /753

Windows Communication Foundation (WCF) / Blog

Difference between WCF and Web API.

WCF is used to create a distributed and interoperable Applications. It provides a framework which is used for building service-oriented-connected applications for the transmission of the data as an asynchronous, from one service-point to other service-point. Previously known as Indigo and is a framework for building, configuring, and deploying network-distributed services.
22-Apr-2022 /50 /753