Windows Communication Foundation by amberp

VIEWS: 127 PAGES: 20

									    Windows Communication
    Foundation
     Client                               Service




  Eric Nelson Eric.Nelson@microsoft.com
  Application Architect
  Microsoft Ltd
1 http://blogs.msdn.com/ericnel
                                                    1
    Challenges
            How do I ensure reliable
            connectivity?
            How do I support rich
            authentication types?
            How do I ensure interoperability
            with other platforms?
            How do I make my distributed
            applications less fragile?
            How do I make them “service-
            oriented?”
            Which programming model
            should I use?                   2
2
    Where Are We Today?
            Microsoft          J2EE

          ASMX / WSE          JAX-RPC


            Remoting            RMI


              DCOM            CORBA


        Enterprise Services     EJB


        System.Messaging       JMS


             Sockets          Sockets



3
                                        3
    Today – writing plumbing code…
                 Using Visual Studio .NET 2003 and WSE

     class HelloService {{
      class HelloService

          [WebMethod]
           [WebMethod]
          public String Hello(String Greeting) {{
           public String Hello(String Greeting)
                                                                         10 lines
               foreach ( SecurityToken tok in
                 requestContext.Security.Tokens
                                                                          security
               {
                 X509SecurityToken token = tok as X509SecToken
               }                                                       1,804 lines
                                                                     reliable messaging
               …
               SeqAckRange range = new SeqAcknRange(id,low,high );
               SeqAckRange[] ranges = { range };
               ReliableQueue.ProcessAcks( ranges );
                                                                       25,507 lines
               …                                                        transactions
               hr = pITxDispenser->BeginTransaction (NULL,
                 ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions,           Total lines
               …
                 &pITransaction);                                         27,321
                return Greeting;
               return Greeting;
          }}
     }}


4
                                                                                          4
    Windows Communication
    Foundation
                       Unifies today’s distributed technologies
     Productivity      Attribute-based development
                       Visual Studio 2005 integration


                       Broad support for WS-* specifications
    Interoperability   Compatible with existing MS distributed
                       application technologies


                       Enables development of
    Service-Oriented   loosely-coupled services
     Development
                       Config-based communication
5
                                                                  5
    Unified Programming Model


                      WCF
       ASMX                               .NET
                                        Remoting

      Interop                          Extensibility
     with other                          Location
     platforms                        transparency


         Attribute-                 Message-
          Based                     Oriented
       Programming     WS-*       Programming
                      Protocol
         Enterprise   Support
                                 System.Messaging
          Services
                       WSE


6
                                                       6
    WCF extends the .NET Framework
    Services are built in Visual Studio 2005
    using any .NET programming language
      Intelligent code editing
      Service templates
      Debugging




7
                                               7
Investment Protection
Leveraging Existing Microsoft Investments

   Side-by-side co-existence
   with existing distributed      ASMX

   technologies

   Seamless communication
   with applications built on
   existing technologies        ASMX     ES   WSE3




   Smooth upgrade of existing   ASMX
   code to WCF
ASMX to WCF
//
using System.Web.Services;
using System.ServiceModel;
public class AccountingOperation
{
    public string AccountName;
    public long Amount;
}


[ServiceContract(FormatMode=ContractFormatMode.XmlSerializer)]
public class Accounting
{
     //
    [OperationContract]
    [WebMethod(TransactionOption=TransactionOption.RequiresNew)]
    [OperationBehavior(AutoEnlistTransaction=true)]
    public int AddEntry(AccountingOperation debit,
                        AccountingOperation credit)
    {
        // Add entry to internal accounting book
        // return id.
    }
}
     Tomorrow – writing logic
             Using Visual Studio 2005 and Indigo




                                                                        1 line
      [ServiceContract(SecureChannel, SecurityMode =“Windows")]         security
      [Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)]
      [ServiceContract]
      class HelloService
                                                                        1 line
      {
                                                                   reliable messaging
        [ServiceOperation(TransactionFlowAllowed = true)]
        String Hello(String Greeting)                                    1 line
        {
          return Greeting;
                                                                      transactions
        }
      }
                                                                     Total lines 3




10
                                                                                        10
Windows Workflow
Foundation




11
                   11
     Windows Workflow Foundation
      Windows Workflow Foundation is the programming
     model, engine and tools for quickly building workflow
              enabled applications on Windows.

       Single workflow technology for Windows
         Available to all customers of Windows
         Available for use across a broad range of scenarios
       Redefining workflow
         Extensible framework & API to build workflow centric products
         One technology for human and system workflow
       Take workflow mainstream
         Incremental learning for mainstream .NET developer
         Fundamental part of the Office “12”
         Strong workflow partner & solution ecosystem

12
                                                                         12
     Workflow and BizTalk Server
              BizTalk Server                  • Premium BPM server
                 Accelerators                 •Application to application and B2B integration
                                  Business    •Connects multiple services built with WCF
                   Workflow
                 Orchestration                •Adapters to multiple products like SAP and
                                   Activity   MQSeries
     Design                        Monitor    •Business activity monitoring
      Tools       Messaging          And      •Vertical solutions and industry accelerators
                                   Admin      •Message transformation services
                Transformation      Tools     •Enterprise single sign-on
                                              •End-to-end health and activity tracking
                   Adapters                   •And more…




              Visual Studio Designer
                                              • Workflow framework
                                              • Exposed via WinFX
                                              • Broad set of scenarios
                                              • Used to build solutions
         Windows Workflow                     • Enables manageability
            Foundation                        and scale-out in solutions
                                              • Use for building workflow into
                     WinFX                    apps or workflow-enabled servers
13
                                                                                                13
     What is a workflow?
      A set of activities that coordinate people
                  and / or software...
 Example activities….     EscalateToManager   CheckInventory



               …organized into a workflow.
     Like a flowchart….               Or a state diagram….




14
                                                               14
     Workflow Scenario Spectrum
                Human Workflow                       System Workflow

     Participants: people, roles                      Participants: apps, services
     Flow style: flexible, dynamic                    Flow style: prescriptive,
     Data: unstructured, documents                    protocols
         Information Worker                           Data: structured, transactional
         • Document Review…                            Business to Business
                                                       • Supply Chain Mgmt…
                                  Line of Business Apps
                CRM     • Insurance Quotation, Sales Automation…
                      ERP



                                      IT Management
                            • New Hire Provisioning, Help Desk,…
                                     .NET Developer
                             • Pageflow, Service Coordination…


15
              Windows Workflow Foundation                                               15
     Why Workflow Technology?
            Developer Productivity
       Workflows technology provides abstractions
       convenient to describe real world workflows

       Workflow Technology Value-Add

        Long running and stateful behavior
        Flexible control flow
        Transparency
16
                                                     16
     Why Workflow Technology?
      Real World Examples          Workflow Value-Add

     “Orders are confirmed in    Long Running and Stateful
      48 hours and shipped        Workflows run for up to 30
         within 30 days.”          days and maintain state
                                         throughout
         “Most suppliers
                                 Flexible Control Flow
      confirm our orders but
                                  Flexibility for people to
       some forget and we
                                 override or skip steps in
        need to followup.”
                                       the workflow

     “What are the next steps         Transparency
      in handling this order?”   Rendering a visualization of
                                    next steps based on
                                    defined control flow
17
                                                              17
     Building a Workflow




18
                           18
     Take the Next Step
     Start programming with Visual Studio 2005
     Download and evaluate WinFX
     Lunch 12:30 til 1:00pm
     This afternoon
        WPF http://windowsworkflow.net
        WCF and WWF http://windowscommunication.net
        Call To Action (links, early adopter opportunities)
19
                                                          19
20
     20

								
To top