SlideShare a Scribd company logo
1 of 14
Who I am


I am Sharada Prasad, having 17+ years of exp. in science and technology.

My exp. Includes Tech. training/Product development/Tech. analysis/consulting in
IT/CS/Physics/IPR.

M.Sc Physics(Elex); M.Tech(CS); Dip (IPR)
Sbermola@hotmil.com
Mobile:9810201453
70-C, Mig, Sect-100, Noida.




                              Sharad Prasad IT/IPR
                              Consultant
What I will cover

•   SOA introduction
•   What is WCF? - Intro. to WCF as SOA platform
•   Why WCF?- Some reasons for using WCF
•   How WCF?- Demo for creating, hosting, and calling WCF services




                         Sharad Prasad IT/IPR
                         Consultant
SOA introduction
•   SOA is an evolved programming model for business.
•   Evolution of programming
     –   In 60’s:
           •   hll such as COBOL, FORTRAN evolved; Compilers were common tools for programming; JUMP, GOTO kind of
               statement were common;
           •   Ripple effect in code - as code was highly coupled and least cohesive therefore further evolution was needed.
     –   In 70’s:
           •   Structured programming; C, PaSCaL; code reuse through functions; but functions were tied to data
           •   Still code was coupled and not much cohesive – needed further evolution
     –   In 80’s:
           •   Object orientation; C++, smalltalk, ada; abstraction/inheritance; code was less coupled and more cohesive
     –   In 90’s:
           •   Component based; lib;dll; COM/CORBA; code was less coupled and highly cohesive;
           •   Interoperability was complex
     –   In 2000’:
           •   Service orientation; Web services; XML/SOAP
•   Most of the known issues { ripple effect, coupling, cohesion, integration} are solved in SOA.
     –   Highly cohesive and least coupled code, which is easily interoperable and discoverable

                                   •    So, SOA is a business facilitator



                                            Sharad Prasad IT/IPR
                                            Consultant
SOA as a business facilitator, how?

•   Loosely coupled code {services}
•   Contracts {adherence to SLA }
•   Autonomy {control of BL services encapsulates}
•   Abstraction { hide BL from service consumers}
•   Reusability { divide BL into reusable services}
•   Statelessness {min. retention of info. Specific to an activity }
•   Discoverability { self-describes so that they can be found
    and assessed}




                          Sharad Prasad IT/IPR
                          Consultant
SOA meets the computing challenges?
•   Compute - Processing {IaaS, PaaS, SaaS}

•   Storage - Memory {IaaS, PaaS, SaaS}

•   Networking -Communication {IaaS, PaaS, SaaS}

•   Energy - Power {IaaS, PaaS, SaaS}

•   Environment - Pollution {IaaS, PaaS, SaaS}

•   Material - Business {IaaS, PaaS, SaaS}

•   Humanity - Social {IaaS, PaaS, SaaS}

                           Sharad Prasad IT/IPR
                           Consultant
Some of the SOA platforms


•   MS Share Point/BizTalk server
•   Smart SOA & WebSphere
•   SAP NetWeaver Process Intrergration
•   Oracle Enterprise Service Bus
•   TIBCO Active Matrix BusinessWorks
•   Unify NXJ
•   ServiceMix
•   .
•   .
•   .




                          Sharad Prasad IT/IPR
                          Consultant
What is WCF?
•   MS framework for building SOApplication
     – For building distributed and interoperable apps.
•   Unifies ASMX, .NET Remoting, and Enterprise services stacks
     – In a single prog. Model.
     – Configurable protocol choices, messaging formats, and process allocation, etc.
•   Service-oriented
     – Built for service-oriented system design
     – Simplifies how you approach SOA
•   Loosly coupled
     – Every thing is configurable
     – Not bound to a particular protocol, encoding, or hosting environ
•   Interoperable
     – Supports core web services standards
     – Extensible to Quickly adapt to new protocols and updates
•   Integration
     – Integrates with earlier MS stacks
         • Com, services, msmq

                                 Sharad Prasad IT/IPR
                                 Consultant
Why to use WCF?
•   Because,
•   Services are the core of the SOA and WCF is the easiest way to produce and
    consume services on MS platform.

•   By leveraging WCF, developer can focus on their application rather than on
    communication protocol

•   It is a classic case of tech. encapsulation and tooling

•   Developers are more productive if their tools encapsulates (but not hide) tech. jobs
    wherever possible, and WCF combined with VS does the same




                                Sharad Prasad IT/IPR
                                Consultant
How to use WCF?
•   Code Walkthrough
     – {
         • Let say you have your legacy code (BL)- BLTDSCalc as a dll
         • Wrap the existing BL (BLTDSCalc.dll) in a SOA service (class)
         • Add some more business logic the SOA class let say -
           BLGenerateTDSCertificate
         • Define service contracts for both Methods
         • Host the service
             – Contract, behavior, binding, addressing, channels, messaging,
               formatting, security all in code
             – Above things can be divided in code (c#) and configuration (xml)
               in separate files
         • Use the services
             – Discovery to get the contract and configuration using ASR
                 » Metadata exchange should be enabled
             – Use svcutil.exe to discover the services.
     – }
                            Sharad Prasad IT/IPR
                            Consultant
Code
//this is our old business logic - a class dll

namespace TDSCalc
{
  public class CTDSCalc
  {
    //Our old business logic to calculate TDS
    public double MTDSCalc(double income)
    {
       //10% of the income is deducted as TDS
       return income * 10 / 100;
    }
  }
}



                              Sharad Prasad IT/IPR
                              Consultant
// we want to move to cloud and adapt to       public class TDSService : ITDSService
     SOA we will use our legacy logic            {
// (TDSCalc) and add more services                  CTDSCalc objTDS = new CTDSCalc();
// and will use MS Platform for every thing         public double GetTDS(double income)
                                                    {
                                                     //using our existing serives
using TDSCalc;                                       return objTDS.MTDSCalc(income);
using System.ServiceModel;                          }
namespace SOAClasss                              }
{                                                public class TDSCertService :
  [ServiceContract]                                ITDSCertService
  public interface ITDSService                   {
  {                                                 public string GetCertificate(string
     [OperationContract]                           name)
     double GetTDS(double income);                  { //using our existing serives
  }                                                     return "this is the tds certicate oftt"
                                                   + name + "tt for year";
  [ServiceContract]
                                                    }
  public interface ITDSCertService
                                                 }
  {
                                               }
    [OperationContract]
     string GetCertificate(string pr_name);
  }




                                 Sharad Prasad IT/IPR
                                 Consultant
// service host
using System.ServiceModel;
using System.ServiceModel.Description;
using System;

namespace Host
{
  class Program
  {
     static void Main(string[] args)
     {
        ServiceHost tdsCalcHost = new ServiceHost(typeof(SOAClasss.TDSService), new
    Uri("http://localhost/8080"));
        ServiceHost certHost = new ServiceHost(typeof(SOAClasss.TDSCertService), new
    Uri("http://localhost/8080/sd/sd"));
        tdsCalcHost.AddServiceEndpoint(typeof(SOAClasss.ITDSService), new
    BasicHttpBinding(), "mex");
        certHost.AddServiceEndpoint(typeof(SOAClasss.ITDSCertService), new
    BasicHttpBinding(), "mex");
        ServiceMetadataBehavior behavior = new ServiceMetadataBehavior();
        behavior.HttpGetEnabled = true;
        tdsCalcHost.Description.Behaviors.Add(behavior);
        certHost.Description.Behaviors.Add(behavior);
        certHost.Open();
        tdsCalcHost.Open();
        Console.Write("service runningn press enter to endn");
        Console.ReadLine(); }}}
                              Sharad Prasad IT/IPR
                              Consultant
// service consumer
using System;
namespace ServiceConsumer
{
    class Program
    {
        static void Main(string[] args)
        {
          // TDS and Cert are two service references
          TDS.TDSServiceClient tdsproxy = new TDS.TDSServiceClient();
          Console.WriteLine("Pl. enter the income");
          Console.WriteLine("tds is: {0}",
      tdsproxy.GetTDS(double.Parse(Console.ReadLine())));
          Cert.TDSCertServiceClient certproxy = new Cert.TDSCertServiceClient();
          Console.WriteLine("Pl. enter the emp. name for which cert. is needed");
          Console.WriteLine( certproxy.GetCertificate(Console.ReadLine()));
          Console.ReadLine();
       }
    }
}




                            Sharad Prasad IT/IPR
                            Consultant
Thank you



  • Questions




Sharad Prasad IT/IPR
Consultant

More Related Content

What's hot

A Gentle Introduction to OpenSplice DDS
A Gentle Introduction to OpenSplice DDSA Gentle Introduction to OpenSplice DDS
A Gentle Introduction to OpenSplice DDSAngelo Corsaro
 
Desktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex CaféDesktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex CaféAngelo Corsaro
 
Sql azure database under the hood
Sql azure database under the hoodSql azure database under the hood
Sql azure database under the hoodguest2dd056
 
Toronto jaspersoft meetup
Toronto jaspersoft meetupToronto jaspersoft meetup
Toronto jaspersoft meetupPatrick McFadin
 
Deep Dive into Automating Oracle GoldenGate Using the New Microservices
Deep Dive into Automating Oracle GoldenGate Using the New MicroservicesDeep Dive into Automating Oracle GoldenGate Using the New Microservices
Deep Dive into Automating Oracle GoldenGate Using the New MicroservicesKal BO
 
Oracle soa 11g training in bangalore
Oracle soa 11g training in bangaloreOracle soa 11g training in bangalore
Oracle soa 11g training in bangaloreSoftgen Infotech
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Gridsgojkoadzic
 
Oracle SOA Suite in use – a practical experience report
Oracle SOA Suite in use – a practical experience reportOracle SOA Suite in use – a practical experience report
Oracle SOA Suite in use – a practical experience reportGuido Schmutz
 
The DDS Tutorial Part II
The DDS Tutorial Part IIThe DDS Tutorial Part II
The DDS Tutorial Part IIAngelo Corsaro
 
Getting Started with DDS in C++, Java and Scala
Getting Started with DDS in C++, Java and ScalaGetting Started with DDS in C++, Java and Scala
Getting Started with DDS in C++, Java and ScalaAngelo Corsaro
 
Reusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11gReusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11gGuido Schmutz
 

What's hot (13)

DDS QoS Unleashed
DDS QoS UnleashedDDS QoS Unleashed
DDS QoS Unleashed
 
A Gentle Introduction to OpenSplice DDS
A Gentle Introduction to OpenSplice DDSA Gentle Introduction to OpenSplice DDS
A Gentle Introduction to OpenSplice DDS
 
Desktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex CaféDesktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex Café
 
DDS vs AMQP
DDS vs AMQPDDS vs AMQP
DDS vs AMQP
 
Sql azure database under the hood
Sql azure database under the hoodSql azure database under the hood
Sql azure database under the hood
 
Toronto jaspersoft meetup
Toronto jaspersoft meetupToronto jaspersoft meetup
Toronto jaspersoft meetup
 
Deep Dive into Automating Oracle GoldenGate Using the New Microservices
Deep Dive into Automating Oracle GoldenGate Using the New MicroservicesDeep Dive into Automating Oracle GoldenGate Using the New Microservices
Deep Dive into Automating Oracle GoldenGate Using the New Microservices
 
Oracle soa 11g training in bangalore
Oracle soa 11g training in bangaloreOracle soa 11g training in bangalore
Oracle soa 11g training in bangalore
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Grids
 
Oracle SOA Suite in use – a practical experience report
Oracle SOA Suite in use – a practical experience reportOracle SOA Suite in use – a practical experience report
Oracle SOA Suite in use – a practical experience report
 
The DDS Tutorial Part II
The DDS Tutorial Part IIThe DDS Tutorial Part II
The DDS Tutorial Part II
 
Getting Started with DDS in C++, Java and Scala
Getting Started with DDS in C++, Java and ScalaGetting Started with DDS in C++, Java and Scala
Getting Started with DDS in C++, Java and Scala
 
Reusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11gReusing Existing Java EE Applications from SOA Suite 11g
Reusing Existing Java EE Applications from SOA Suite 11g
 

Similar to Soa wcf 1.1

Distributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsJaime Martin Losa
 
OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?Tim Bell
 
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...Daniel Bryant
 
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika KumaraSoftware Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika KumaraThejan Wijesinghe
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
 
SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)Lucas Jellema
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Abdul Khan
 
Modern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas JellemaModern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas JellemaLucas Jellema
 
RDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsRDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsScyllaDB
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionTimothy Spann
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksDatabricks
 
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsLucas Jellema
 
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...Lucas Jellema
 
Oracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesOracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesBobby Curtis
 
Cisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco Canada
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingJaime Martin Losa
 
A CMD Core Model for CLARIN Web Services
A CMD Core Model for CLARIN Web ServicesA CMD Core Model for CLARIN Web Services
A CMD Core Model for CLARIN Web ServicesMenzo Windhouwer
 
azure track -06- cloud integration patterns for it-pros - itproceed
azure track -06- cloud integration patterns for it-pros - itproceedazure track -06- cloud integration patterns for it-pros - itproceed
azure track -06- cloud integration patterns for it-pros - itproceedITProceed
 
Cloud integration patterns for it pros - itprceed
Cloud integration patterns for it pros - itprceedCloud integration patterns for it pros - itprceed
Cloud integration patterns for it pros - itprceedSam Vanhoutte
 

Similar to Soa wcf 1.1 (20)

Distributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applications
 
OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?
 
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
 
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika KumaraSoftware Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)SOA for PL/SQL Developer (OPP 2010)
SOA for PL/SQL Developer (OPP 2010)
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
 
Modern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas JellemaModern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas Jellema
 
RDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful MigrationsRDBMS to NoSQL: Practical Advice from Successful Migrations
RDBMS to NoSQL: Practical Advice from Successful Migrations
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC Solution
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
 
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
 
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
What is the Oracle PaaS Cloud for Developers (Oracle Cloud Day, The Netherlan...
 
Session
SessionSession
Session
 
Oracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best PracticesOracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best Practices
 
Cisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready Infrastructure
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
A CMD Core Model for CLARIN Web Services
A CMD Core Model for CLARIN Web ServicesA CMD Core Model for CLARIN Web Services
A CMD Core Model for CLARIN Web Services
 
azure track -06- cloud integration patterns for it-pros - itproceed
azure track -06- cloud integration patterns for it-pros - itproceedazure track -06- cloud integration patterns for it-pros - itproceed
azure track -06- cloud integration patterns for it-pros - itproceed
 
Cloud integration patterns for it pros - itprceed
Cloud integration patterns for it pros - itprceedCloud integration patterns for it pros - itprceed
Cloud integration patterns for it pros - itprceed
 

Soa wcf 1.1

  • 1. Who I am I am Sharada Prasad, having 17+ years of exp. in science and technology. My exp. Includes Tech. training/Product development/Tech. analysis/consulting in IT/CS/Physics/IPR. M.Sc Physics(Elex); M.Tech(CS); Dip (IPR) Sbermola@hotmil.com Mobile:9810201453 70-C, Mig, Sect-100, Noida. Sharad Prasad IT/IPR Consultant
  • 2. What I will cover • SOA introduction • What is WCF? - Intro. to WCF as SOA platform • Why WCF?- Some reasons for using WCF • How WCF?- Demo for creating, hosting, and calling WCF services Sharad Prasad IT/IPR Consultant
  • 3. SOA introduction • SOA is an evolved programming model for business. • Evolution of programming – In 60’s: • hll such as COBOL, FORTRAN evolved; Compilers were common tools for programming; JUMP, GOTO kind of statement were common; • Ripple effect in code - as code was highly coupled and least cohesive therefore further evolution was needed. – In 70’s: • Structured programming; C, PaSCaL; code reuse through functions; but functions were tied to data • Still code was coupled and not much cohesive – needed further evolution – In 80’s: • Object orientation; C++, smalltalk, ada; abstraction/inheritance; code was less coupled and more cohesive – In 90’s: • Component based; lib;dll; COM/CORBA; code was less coupled and highly cohesive; • Interoperability was complex – In 2000’: • Service orientation; Web services; XML/SOAP • Most of the known issues { ripple effect, coupling, cohesion, integration} are solved in SOA. – Highly cohesive and least coupled code, which is easily interoperable and discoverable • So, SOA is a business facilitator Sharad Prasad IT/IPR Consultant
  • 4. SOA as a business facilitator, how? • Loosely coupled code {services} • Contracts {adherence to SLA } • Autonomy {control of BL services encapsulates} • Abstraction { hide BL from service consumers} • Reusability { divide BL into reusable services} • Statelessness {min. retention of info. Specific to an activity } • Discoverability { self-describes so that they can be found and assessed} Sharad Prasad IT/IPR Consultant
  • 5. SOA meets the computing challenges? • Compute - Processing {IaaS, PaaS, SaaS} • Storage - Memory {IaaS, PaaS, SaaS} • Networking -Communication {IaaS, PaaS, SaaS} • Energy - Power {IaaS, PaaS, SaaS} • Environment - Pollution {IaaS, PaaS, SaaS} • Material - Business {IaaS, PaaS, SaaS} • Humanity - Social {IaaS, PaaS, SaaS} Sharad Prasad IT/IPR Consultant
  • 6. Some of the SOA platforms • MS Share Point/BizTalk server • Smart SOA & WebSphere • SAP NetWeaver Process Intrergration • Oracle Enterprise Service Bus • TIBCO Active Matrix BusinessWorks • Unify NXJ • ServiceMix • . • . • . Sharad Prasad IT/IPR Consultant
  • 7. What is WCF? • MS framework for building SOApplication – For building distributed and interoperable apps. • Unifies ASMX, .NET Remoting, and Enterprise services stacks – In a single prog. Model. – Configurable protocol choices, messaging formats, and process allocation, etc. • Service-oriented – Built for service-oriented system design – Simplifies how you approach SOA • Loosly coupled – Every thing is configurable – Not bound to a particular protocol, encoding, or hosting environ • Interoperable – Supports core web services standards – Extensible to Quickly adapt to new protocols and updates • Integration – Integrates with earlier MS stacks • Com, services, msmq Sharad Prasad IT/IPR Consultant
  • 8. Why to use WCF? • Because, • Services are the core of the SOA and WCF is the easiest way to produce and consume services on MS platform. • By leveraging WCF, developer can focus on their application rather than on communication protocol • It is a classic case of tech. encapsulation and tooling • Developers are more productive if their tools encapsulates (but not hide) tech. jobs wherever possible, and WCF combined with VS does the same Sharad Prasad IT/IPR Consultant
  • 9. How to use WCF? • Code Walkthrough – { • Let say you have your legacy code (BL)- BLTDSCalc as a dll • Wrap the existing BL (BLTDSCalc.dll) in a SOA service (class) • Add some more business logic the SOA class let say - BLGenerateTDSCertificate • Define service contracts for both Methods • Host the service – Contract, behavior, binding, addressing, channels, messaging, formatting, security all in code – Above things can be divided in code (c#) and configuration (xml) in separate files • Use the services – Discovery to get the contract and configuration using ASR » Metadata exchange should be enabled – Use svcutil.exe to discover the services. – } Sharad Prasad IT/IPR Consultant
  • 10. Code //this is our old business logic - a class dll namespace TDSCalc { public class CTDSCalc { //Our old business logic to calculate TDS public double MTDSCalc(double income) { //10% of the income is deducted as TDS return income * 10 / 100; } } } Sharad Prasad IT/IPR Consultant
  • 11. // we want to move to cloud and adapt to public class TDSService : ITDSService SOA we will use our legacy logic { // (TDSCalc) and add more services CTDSCalc objTDS = new CTDSCalc(); // and will use MS Platform for every thing public double GetTDS(double income) { //using our existing serives using TDSCalc; return objTDS.MTDSCalc(income); using System.ServiceModel; } namespace SOAClasss } { public class TDSCertService : [ServiceContract] ITDSCertService public interface ITDSService { { public string GetCertificate(string [OperationContract] name) double GetTDS(double income); { //using our existing serives } return "this is the tds certicate oftt" + name + "tt for year"; [ServiceContract] } public interface ITDSCertService } { } [OperationContract] string GetCertificate(string pr_name); } Sharad Prasad IT/IPR Consultant
  • 12. // service host using System.ServiceModel; using System.ServiceModel.Description; using System; namespace Host { class Program { static void Main(string[] args) { ServiceHost tdsCalcHost = new ServiceHost(typeof(SOAClasss.TDSService), new Uri("http://localhost/8080")); ServiceHost certHost = new ServiceHost(typeof(SOAClasss.TDSCertService), new Uri("http://localhost/8080/sd/sd")); tdsCalcHost.AddServiceEndpoint(typeof(SOAClasss.ITDSService), new BasicHttpBinding(), "mex"); certHost.AddServiceEndpoint(typeof(SOAClasss.ITDSCertService), new BasicHttpBinding(), "mex"); ServiceMetadataBehavior behavior = new ServiceMetadataBehavior(); behavior.HttpGetEnabled = true; tdsCalcHost.Description.Behaviors.Add(behavior); certHost.Description.Behaviors.Add(behavior); certHost.Open(); tdsCalcHost.Open(); Console.Write("service runningn press enter to endn"); Console.ReadLine(); }}} Sharad Prasad IT/IPR Consultant
  • 13. // service consumer using System; namespace ServiceConsumer { class Program { static void Main(string[] args) { // TDS and Cert are two service references TDS.TDSServiceClient tdsproxy = new TDS.TDSServiceClient(); Console.WriteLine("Pl. enter the income"); Console.WriteLine("tds is: {0}", tdsproxy.GetTDS(double.Parse(Console.ReadLine()))); Cert.TDSCertServiceClient certproxy = new Cert.TDSCertServiceClient(); Console.WriteLine("Pl. enter the emp. name for which cert. is needed"); Console.WriteLine( certproxy.GetCertificate(Console.ReadLine())); Console.ReadLine(); } } } Sharad Prasad IT/IPR Consultant
  • 14. Thank you • Questions Sharad Prasad IT/IPR Consultant