Wcf v1-day1

Post on 20-Jun-2015

62 views 0 download

Tags:

transcript

Naresh InformationTechnologiesTechnologies

Nagaraju Bendenbende@gmail.com

MCPD.NET Sr Consultant,Trainer

http://nbende.wordpress.com

Agenda – Session 1

Distributed Programming

What are Services

Service Oriented Architecture

�������������� �����������������

Service Oriented Architecture

Service Oriented Applications/Programming

Remoting and Web Services in .NET

WCF & its Essentials

Distributed Applications

• Communication between multiple server applications or services in the network– Must be capable to run behind firewalls

�������������� �����������������

– Must be capable to run behind firewalls– Some share common protocols (SOAP,

WSDL), but not a common platform– Some share common protocols and

common platform (e.g., .NET)

Roadmap

�������������� �����������������

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

• Focus: messages sent and received–Moves from a Client/Server model

to a Sender/Receiver model• Rich communication patterns and

Service Orientation

�������������� �����������������

• Rich communication patterns and functionality

• Big Win is versioning independence

Service Oriented Architecture

• A set of components which can be invoked, and whose interface descriptions can be published and discovered

�������������� �����������������

Remoting & Web Services

�������������� �����������������

Remoting & Web Services

.NET Remoting Architecture

��������������������������

������������������

�� ��� �

�������������� �����������������

!��!�� ��������"��"�� #��#��"��"�� $�$�

%&�'%&�' %&�'%&�'("���$("���$ ("���$("���$'��#$'��#$ )"�������)"�������

*��*��

+�����,+�����,-..'-..'.+'.+'�� ��� �+�����,+�����,

XML Web Services Message Flow

���

���������

���������

'�����!�%��"�,"/�

'�����!!�)����"�,"/�

������� ����

���������������� �������������������� � ������������������� ���������������������������� �����������������������������

�������������� �����������������

�������������������

������

���������

���������

'�����!!!%��"�,"/�

'�����!0)����"�,"/�

�������������

Windows Communication Foundation

The old way of easily exposing components (ASMX):

�� ���!������

��"������������

�������������� �����������������

��"������������

# ��������

Windows Communication Foundation

The new way of easily exposing components (WCF):

�� ���!������

�������������$��

�������������� �����������������

# ��#��� ���#��� %���#��� �&�#���

# �������� ��������� %��������� �&�������

�������������$��

WCF in Simple terms

• One-stop-shop for services• Consistent object model• Great features• 1st released with .NET Framework 3.0

�������������� �����������������

• 1st released with .NET Framework 3.0– Vista, WinServer 2003, Win XP SP2

Focus on the functionality, WCF takes care of the complete infrastructure

The unified programming model for rapidly building service-oriented applications

WCF – little more detailed

Unifies today’s distributed technology stacks

Appropriate for use on-machine, cross machine, and cross Internet

Unification

�������������� �����������������

Interoperates with applications running on other platforms

Integrates with our own distributed stacks

Rich

Integration

• Codifies best practices for building distributed applicationsService

Orientation

Questions

�������������� �����������������

Terms of WCF

• Service – collection of endpoints• Message • Endpoint – point of access to the service• ABC

– Address (WHERE)

�������������� �����������������

– Address (WHERE)– Binding (HOW)– Contract (WHAT)

• Metadata• Bahavior• ServiceHost• Proxy

Windows Communication Foundation

The old way of easily exposing components (ASMX):

�� ���!������

��"������������

�������������� �����������������

��"������������

# ��������

SOA

������

� � ��� �� � � � �� � ��

�������������� �����������������

� � ��� �� � � �

�� � ��� � �

�� � ��

� � � ���� � � �� � ��� � � � � ���� � � � � � ��� �� � � � � � �� �����

References

• http://msdn.microsoft.com/en-us/ library/aa480021.aspx – For SOA

• http://en.wikipedia.org/wiki/Service-oriented_architecture -- For SOA

�������������� �����������������

oriented_architecture -- For SOA

BackUp Slides

�������������� �����������������