Soa Via WCF: Mohammed H. El-Shreief. Software Engineer Team Lead Silverkey Egypt

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

SOA VIA WCF

Mohammed H. El-Shreief.
Software Engineer Team Lead
SilverKey Egypt.
Agenda

 Part I: Service Oriented Architecture


 Background
 Motivations
 What is a Service
 Message Exchange Patterns (MEP)
 Industry Standards
 Web Standards
 Part II: Introducing WCF
 What is WCF
 WCF Architecture Overview
 Demos
Part I

SERVICE ORIENTED
ARCHITECTURE
Background
Time Machine

Procedural Oriented
Motivations

 Integration Between Systems is not an


Option.

 Heterogeneous Systems.
 Different Environment / Operating Systems.

 Loosely Coupled.
What is a Service ?

 Self Contained business function

 Functionality exposed via a structured


messaging scheme

 Not just XML, not just HTTP


 XML, SOAP, JSON, Images .. etc
 TCP, HTTP, Message Queues … etc
What is a Service ?

 Versioning Independence

 Different Message Exchange Patterns


 One way, Request/Reply & Duplex
Message Exchange Patterns
(MEP)
 One-way (Datagram)
Sender Receiver

 Request / Reply
Sender Receiver

 Duplex
Sender Receiver
Industry Standards

 SOAP
 Simple Object Access Protocol
 XML Based
 WS-* Specifications
 Set of specifications to coordinate reliability,
transactions, faults, security … etc
 Agreed upon many vendors (IBM, ORACLE, MS …)
 WS-Addressing, WS-Security, WS-
AtomicTransaction, … etc
Web Standards

 REST
 Representational State Transfer
 URI is the key to the data
 http://demoday.us/visitors/all
 Data can be
 XML, JSON, Binary … etc
Give SOAP a REST

 REST is not a WS-* or SOAP alternative


 or vice-versa

 Each has its use


 REST: Easy to understand, simple for data listing
 WS-*: Rich MEP, Reliability, Transactions, … etc

 Choose whichever fits


Examples of online services
Part II

INTRODUCING WCF
What is WCF

 Windows Communication Foundation (WCF)


 Unified Programming Model
 A runtime environment for your services
 Enabling you to expose CLR types as services
 And to consume other services as CLR types
 Provides richer communication options
 Support most common protocols
 WCF takes care of your infrastructure
What is WCF

Commun
Enterpris ications Remotin
e Services g

Message
Queues
WCF Web
Services

Sockets
What is WCF ?

 The most extensible framework


 You can add or modify layers upon your need
 Built-in support for WS-*
 Choose the right Binding
 Enterprise Features
 Logging, Tracing, Instance Control, Throttling …
etc
 Makes life easier for everybody
 Architects, Developers & Administrators
DEMO

 Simple Service
 ServiceContract Attribute
 OperationContract Attribute
• Hosting
• Service Endpoint
• Address
• Binding
• Contract
WCF Architecture
WCF Runtime
.Net Assembly Service Instance

Contract Method Method

Data, Message, Service


Contract Dispatcher

Protocol

Protocol
Configuration
Protocol
Binding
Encoding
Protocols, Encoding,
Transport Transport Message
Message

Channel Stack
WCF Architecture

End Point
Address Binding Contract
Address

 A network address where the EndPoint


resides
 Examples
 http://silverkey.com/services/demoday.svc
 net.tcp://192.168.1.200:3000/service1
 net.msmq://myserver/private/testQueue
Binding

 Specifies how the EndPoint communicates


with the world
 Defines things like
 Transport (eg. HTTP, TCP )
 Encoding (Text, Binary, MTOM )
 Security Options (SSL, Message security)
 Examples
 BasicHttpBinding, NetTcpBinding,
NetMsmqBinding, NetNamedPipesBinding … etc
Contract

 Specifies what the EndPoint communicates


 Defines things like
 Message Exchange Patterns (one-way, duplex …)
 Service Operations
 Behaviors (Exchange Meta-Data, Impersonation,
Authorization … etc)
Example

 Callbacks
 Tracing
 Logging
 Security
Before The End

 WCF 2.0
 Comes with netfx 3.5
 Workflow enabled services (WCF + WF)
 Use WCF Services in WF
 Expose workflows as WCF services
 REST Enabled Services
 JSON Encoding
 RSS & ATOM support in WCF
 More ….
Resources

 SOA
 http://www.microsoft.com/soa
 http://msdn.microsoft.com/architecture/soa/

 WCF
 http://wcf.netfx3.com
 http://www.idesign.net
 http://msdn.com/wcf

 Books
 WCF Step By Step
 Pro WCF
Questions

?
Contacts

 Blogs
 http://www.Bashmohandes.com

 Email
 mohammeds@silverkeytech.com
 Mohammed.hossam@gmail.com
THANKS

You might also like