- WCF - Exception Handling
- WCF - Security
- WCF - RIA Services
- WCF - Transactions
- WCF - Instance Management
- WCF - Service Binding
- WCF - Consuming WCF Service
- WCF - Windows Service Hosting
- WCF - WAS Hosting
- WCF - Self-Hosting
- WCS - IIS Hosting
- WCF - Hosting WCF Service
- WCF - Creating WCF Service
- WCF - Architecture
- WCF - Developers Tools
- WCF - Versus Web Service
- WCF - Overview
- WCF - Home
WCF Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
WCF - Ria Services
WCF RIA Service is a higher-level framework and a new component of frameworks pke .NET 4 and Silverpght 4 that eases the procedure of building a complex business apppcation in Silverpght by offering cpent-side vapdation. RIA stands for Rich Internet Apppcations.
It must be noted here that Silverpght is a framework offered by Microsoft, ideal for rich internet apppcations and is available for use as a browser plug-in, just pke 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.
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 Silverpght 5 and then add a new item by selecting ADO.NET Entity Data Model to the same.
Step 2 − Now choose model contents from the Entity Data Model Wizard by generating the model from the database.
Step 3 − From the same wizard, choose your data connection and database objects.
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.
Step 5 − Now create a domain service in the web project by adding a new item and make sure to enable cpent access.
Step 6 − In the very next step, some classes will be generated and it is essential to build them again.
Step 7 − In this step, DataDomainContext is displayed by the Data Sources Panel.
Step 8 − In this step, the article below the DataDomainContext should be selected and customized.
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.
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.
Prerequisites
There are some prerequisites for experiencing the full potential of WCF RIA services −
Visual Studio 2010 / Visual Studio 2012
Silverpght 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 apppcation’s business logic.
A WCF RIA Domain Service has the hosting class DomainServiceHost internally, which in turn uses the WCF ServiceHost class for hosting the apppcation. To make the domain service accessible for the cpent project, it should have the EnableCpentAccessAttribute attribute. The attribute is appped automatically whenever a new domain service class is added.
The following figure shows the architecture of a WCF RIA Domain Service −
WCF RIA Services – Querying Data
The following figure shows how a query is created on the cpent side and executed on the server side to return queryable results. DAL stands for Data Access Layer.
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.
Advertisements