Book Image

WCF 4.0 Multi-tier Services Development with LINQ to Entities

By : Mike Liu
Book Image

WCF 4.0 Multi-tier Services Development with LINQ to Entities

By: Mike Liu

Overview of this book

WCF is the Microsoft model for building services, whereas LINQ to Entities is the Microsoft ORM for accessing underlying data storage. Want to learn both? You would normally have to dig through huge reference tomes—so wouldn't you agree that a simple-to-follow practical tutorial on WCF and LINQ to Entities is the way to get ahead?This book is the quickest and easiest way to learn WCF and LINQ to Entities in Visual Studio 2010. WCF and LINQ to Entities are both powerful yet complex technologies from Microsoft—but you will be surprised at how easily this book will get you get up and running with them.Mastery of these two topics will quickly enable you to create Service-Oriented applications, and allow you to take your first steps into the world of Service Oriented Architecture without becoming overwhelmed.Through this book, you will learn what's going on behind the scenes with WCF, and dive into the basic yet most useful techniques for LINQ to Entities. You will develop three real-world multi-tiered WCF services from beginning to end, with LINQ to Entities being used in the data access layer of the services. Various clients including windows console applications, the WCF Test Client, Windows Form applications and WPF applications will be created to test these WCF services. By the end of this book, you will be 100% confident that you know WCF and LINQ to Entities, not only in theory, but with sound real-world experience.
Table of Contents (16 chapters)
WCF 4.0 Multi-tier Services Development with LINQ to Entities
Credits
About the Author
About the Reviewers
Preface
Index

Web services: standards and specifications


Because SOA is an architectural style and web service is now the de facto standard for building SOA applications, we need to know what standards and specifications there are for web services.

As discussed in previous sections, there are many standards and specifications for web services. Some have been well-developed and widely accepted, some are being developed, and others are just at the proposal stage. These specifications are in varying degrees of maturity, and are maintained or supported by various standards and entities. Specifications may complement, overlap, and compete with each other. As most of these standards committees and specifications are for future web services, not all of them are implemented in current web service frameworks.

Web service standards and specifications are occasionally referred to as "WS-*" although there is not a single managed set of specifications that this consistently refers to, nor a recognized owning body across all of them. The reference term "WS-*" is more of a general nod to the fact that many specifications are named with "WS-" as their prefix.

Besides XML, SOAP, and WSDL, here is a brief list of some other important standards and specifications for web services.

WS-I Profiles

The Web Services Interoperability Organization (WS-I) is an industry consortium chartered to promote interoperability across the stack of web services specifications. It publishes web service profiles, sample applications, and test tools to help determine profile conformance. One of the popular profiles it has published is the WS-I Basic Profile. WS-I is governed by a Board of Directors, and Microsoft is one of the board members. The web address for the WS-I organization is http://www.ws-i.org.

WS-Addressing

WS-Addressing is a mechanism that allows web services to communicate addressing information. With traditional web services, addressing information is carried by the transport layer, and the web service message itself knows nothing about its destination. With this new standard, addressing information will be included in the XML message itself. A SOAP header can be added to the message for this purpose. The network-level transport is now responsible only for delivering that message to a dispatcher capable of reading the metadata.

WS-Security

WS-Security describes how to handle security issues within SOAP messages. It attaches signature and encryption information as well as security tokens to SOAP messages. In addition to the traditional HTTP/HTTPS authentications, it incorporates extra security features in the header of the SOAP message, working in the application layer. Also, it ensures end-to-end security.

There are several specifications associated with WS-Security, such as WS-SecureConversation, WS-Federation, WS-Authorization, WS-Policy, WS-Trust, and WS-Privacy.

WS-ReliableMessaging

WS-ReliableMessaging describes a protocol that allows SOAP messages to be delivered reliably between distributed applications.

The WS-ReliableMessaging model enforces reliability between the message source and destination. If a message cannot be delivered to the destination, the model must raise an exception or indicate to the source that the message can't be delivered.

There are several Delivery Assurance options for WS-ReliableMessaging, including AtLeastOnce, AtMostOnce, Exactly Once, and InOrder.

WS-Coordination and WS-Transaction

WS-Coordination describes an extensible framework for providing protocols that coordinate the actions of distributed applications. The framework enables existing transaction processing, workflow, and other systems for coordination, to hide their proprietary protocols and to operate in a heterogeneous environment. Additionally, this specification provides a definition for the structure of the context and the requirements for propagating context between cooperating services.

WS-Transaction describes coordination types that are used with the extensible coordination framework described in the WS-Coordination specification. It defines two coordination types: Atomic Transaction (AT) for individual operations and Business Activity (BA) for long-running transactions.

WS-AtomicTransaction provides the definition of the atomic transaction coordination type that is used with the extensible coordination framework described in the WS-Coordination specification. This protocol can be used to build applications that require consistent agreement on the outcome of short-lived distributed activities that have all-or-nothing semantics.

WS-BusinessActivity provides the definition of the business activity coordination type that is used with the extensible coordination framework described in the WS-Coordination specification. This protocol can be used to build applications that require consistent agreement on the outcome of long-running distributed activities.