Home > 2010 Fall DPS907 > DPS907 lab notes Mon Oct 4

DPS907 lab notes Mon Oct 4


Last time, we were introduced to WCF WebHTTP Services. Today, we’ll get introduced to WCF Data Services.

.

Prepare for today’s class

Virtual textbook page, week 5 topics

Digital content linked below

.

Coming up in DPS907  /  WSA500

Wed Oct 6 – compare WCF WebHTTP Services and WCF Data Services; Entity Framework introduction

Mon Oct 11 – no class/lab (Thanksgiving Day statutory holiday)

Wed Oct 13 – OData, Atom, JSON

.

Review of what we’ve learned so far

At this point in the course, it’s worthwhile to briefly review what we’ve covered, so that you know what you should have learned so far.

.

The SOA idea, and service orientation

We would like you to begin thinking of using a service oriented architecture (SOA) when you build an application and/or system. Doing so will deliver a number of benefits, many of which will already be on your “wish list”.

Please review the Web Services Architecture Course Introduction (pdf) document.

.

The web services idea

Web services is an implementation methodology for SOA. There are two typical approaches to building web services: One uses SOAP XML standards, and the other uses REST (or “web API”) principles.

.

SOAP XML Web Services

This web service style is operation-centric. It uses an remote procedure call (RPC) approach. Its API is often published as a single access point (also known as “endpoint”). Through this access point, a number of methods (operations) are typically available.

Clients/consumers typically create a local proxy class to represent the operations available at the remote web service endpoint. This style enables design/coding-time and compile-time benefits.

SOAP XML Web Service data payloads are based on XML, and conform to the SOAP packaging format standards.

.

Work with XML

XML is a data format that is used by almost all web services, so we must understand it.

We learned to generate and consume XML, using automatic ways, and hand-coded ways.

.

Bending ASP.NET to create web services

Since the release of the .NET Framework in 2002, ASP.NET technologies were used to create and deliver SOAP XML Web Services.

ASP.NET development offers a “web service” template, which creates an .asmx endpoint. The development process automatically creates the WSDL document, which clients need in order to use the service.

We also learned to create a “generic handler”. This enabled us to exchange XML  messages (and other data formats), without the SOAP envelope requirement.

.

WCF introduction

In 2006, the Windows Communication Foundation (WCF) was introduced. WCF is a unified set of classes that enable the creation of service oriented applications.

While WCF enables you to build many different kinds of applications (including COM+, MSMQ, .NET Remoting, RPC, and web services), in this course, we are interested only in its web services abilities, and specifically, its RESTful abilities.

Note: If you need to create new SOAP XML Web Services applications, Microsoft and the industry recommends that you use WCF. Put another way, do not use ASP.NET to create them. We covered SOAP XML Web Services creation in this course, by using ASP.NET, to leverage your past familiarity with ASP.NET.

At the present time, WCF offers us two interesting web service programming models:

  • WCF WebHTTP Services
  • WCF Data Services

Both models offer a resource-centric design, and rely on standard HTTP methods (GET, POST, PUT, DELETE). As a result, the application design approach is very different from a typical design, including those based on an operations-centric (i.e. SOAP XML Web Services) design.

We were introduced to WCF WebHTTP Services in the last class.

.

WCF WebHTTP Services introduction

In this programming model, as noted above, you deliver your application’s functionality by enabling standard HTTP methods on its resources, exposed as URIs.

We saw an example where arbitrary data was accessed and managed from a web browser client, and from a command-line utility (cURL).

You will learn that the WCF WebHTTP Services programming model offers advantages in situations where you want full control over the URI.

.

What’s ahead in the coming weeks

Today, you will be introduced to WCF Data Services. We will create some code examples to help learn about this technology.

On Wednesday, we will compare WCF WebHTTP Services, and WCF Data Services. At that point in time, we will have seen a number of technologies for creating web services, and we will be able to select the right technology for a given situation.

In the next few weeks, we will do more work with WCF Data Services, and learn these technologies:

  • Entity Framework
  • OData
  • Atom (and AtomPub)
  • JSON

Then, we will return to WCF WebHTTP Services, and spend a few more weeks learning these technologies:

  • URI templates, and routing
  • POCO generation from the Entity Framework
  • LINQ

While we make our way through these topics, we will simultaneously learn client/consumer technologies, so that we can test and prototype the use of our web services. We will cover:

  • Simple browser-based access to web services
  • JavaScript and jQuery
  • cURL utility
  • Other platforms (e.g. ASP.NET, other .NET, iOS, other mobile, etc.)

We still anticipate having time to study one or more existing public APIs. In addition, we still would like to survey web service creation on other platforms.

The course’s Weekly Schedule has been updated with this plan.

.

Blog posts for today’s class

WCF Data Services introduction

.


Advertisements
Categories: 2010 Fall DPS907
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: