Escolar Documentos
Profissional Documentos
Cultura Documentos
NET
Objectives
Ver. 1.0
Slide 1 of 22
Web services are the application components that can be used by other Web applications. You can create a Web service and publish it on a Web server, thereby, making it available for other Web applications to use.
Ver. 1.0
Slide 2 of 22
A Web service:
Is a self-describing Web component that exposes its functionality to the consumers through open standards such as XML and Simple Object Access Protocol (SOAP). Is a widely used method for implementing Service-Oriented Architecture (SOA). Allows integration of applications developed in different languages and running on different platforms. Communicates by using a standard protocol called SOAP. SOAP defines a standard way of passing the XML-encoded data.
Developing ASP.NET Web services starts by creating an .asmx file and hosting it on a Web server, such as IIS. A Web service once hosted or published on the server can be consumed by any client.
Ver. 1.0
Slide 3 of 22
The client locates the service by adding a Web reference. This adds a proxy class on the client side, which exposes the methods, parameters, and return types of the methods contained in the Web service. After adding the proxy class, the client application creates an instance of the proxy class and accesses the methods provided by the Web service through the instance. The client requests are then handled by the proxy class. After processing the request, the response is also sent as a SOAP message to the proxy. The proxy then converts this SOAP message into method return value, which is returned to the client.
Ver. 1.0
Slide 4 of 22
In distributed computing, Web services along with various other technologies, such as COM+, .NET Remoting, Message Queues, and Web Service Enhancement (WSE) were used to provide a wide range of functionality. WCF:
Unifies features of such discreet technologies under one single framework. Provides a unified programming model used to build a secure, reliable, and robust Web service. Aims at providing encoding, hosting, messaging patterns, networking, security, and interoperability in a single infrastructure.
Ver. 1.0
Slide 5 of 22
Ver. 1.0
Slide 6 of 22
Ver. 1.0
Slide 7 of 22
Problem Statement:
You need to include a Web part that allows a user to convert currency values from Dollar to Euro in the Portal.aspx page of the MusicMania website. To implement this requirement, you are provided with a Web service called CurrencyConverter.
Ver. 1.0
Slide 8 of 22
Solution:
To solve the preceding problem, you need to perform the following tasks:
1. 2. 3. 4. 5. Add the CurrencyConverter project to the solution. Add a reference to the Web service. Create a user control to consume the Web service. Add the user control to the Portal page. Test the application.
Ver. 1.0
Slide 9 of 22
Problem Statement:
In the Portal.aspx page of the MusicMania website, you need to include a Web part that allows a user to convert currency values from Dollar to Euro. To implement this requirement, you are provided with a WCF service called CurrencyConverter.
Ver. 1.0
Slide 10 of 22
Solution:
To solve the preceding problem, you need to perform the following tasks:
1. 2. 3. 4. 5. Add the CurrencyConverter project to the solution. Add a reference to the WCF service. Create a user control to consume the WCF service. Add the user control to the Portal page. Test the application.
Ver. 1.0
Slide 11 of 22
AJAX is a technology, which when implemented in Web applications makes the interaction between the client and the server asynchronous. AJAX implementation:
Allows users to interact with the Web application while waiting for a response from the server. Enables partial updates in Web applications.
Ver. 1.0
Slide 12 of 22
To understand the concept of AJAX, you need to understand the relevance of the following terms:
Asynchronous communication JavaScript XML
Ver. 1.0
Slide 13 of 22
The following figure illustrates the complete life cycle of an AJAX-enabled Web page.
Ver. 1.0
Slide 14 of 22
Ver. 1.0
Slide 15 of 22
Ver. 1.0
Slide 16 of 22
The ASP.NET AJAX Web applications consist of client-side and server-side scripts. The following figure displays the ASP.NET AJAX architecture.
Ver. 1.0
Slide 17 of 22
The preceding figure shows that the ASP.NET AJAX architecture consists of the following components:
Client-based Microsoft AJAX library Server-based AJAX features for ASP.NET
Ver. 1.0
Slide 18 of 22
Ver. 1.0
Slide 19 of 22
Ver. 1.0
Slide 20 of 22
Slide 21 of 22
Slide 22 of 22