Robert MacLeanTechnology SpecialistBB&DWCF Made Easy with .NET 4 & Windows Server AppFabric
Who am I?Robert MacLeanMicrosoft ALM MVPMicrosoft ALM RangerProud Community Lead Information WorkerS.A. Architectwww.sadev.co.za@rmaclean
OvertureLevel 300What is new in WCF 4 to make it easy?What is AppFabric?WCF + AppFabric = EasyWarning: Excessive use of implicit, explicit and angle brackets ahead
The big picture of WCF 4What is new?Configuration defaults, default endpointsWorkflow ServicesHigh performance tracing with ETWNew features for REST-based servicesQueued messaging enhancementsNew protocolsBasic Profile 1.2WS-Discovery and DiscoveryServiceRouterServiceNew DataContractResolver, extensibility
My thoughts on WCFWCF is hardCompared to ASMXConfigurationBindingsEndpoints
Building ServicesASMXWCF SexyWrite class, add attributeInterface + AttributeExpose web methodsWrite class, add attribute“old” WCFJust work with POCOJust work with POCOInterface + AttributeWrite class, add attributeData ContractsConfigConfig Fixes
WCF SexyDemo
Protocol MappingsThis is your bindingStart with thisEg: http://demoDefault binding config!!!
Default Endpoints & HostsSelf HostSupply base address via code or configExplicit: ServiceHost.AddDefaultEndPoints() Implicit: ServiceHost.Open() IISBase address is .svc endpointHTTP protocol is provided by defaultProtocols can be added in IIS Manager
Are Default Endpoints A Good Thing?Designed to cater for the current majorityYou may be specialQuota issuesWSHttp or WebHttpMEXLimiting which contracts on which protocolsYou can override in machine.config (bad – mostly) or app.config (better – mostly)
Refined Default Config<system.serviceModel>  <behaviors>    <serviceBehaviors>      <behavior>        <serviceMetadatahttpGetEnabled="true"/>        <serviceDebugincludeExceptionDetailInFaults="false"/>      </behavior>    </serviceBehaviors>  </behaviors>  <serviceHostingEnvironmentmultipleSiteBindingsEnabled="true" /></system.serviceModel>
POCO BEFORE .NET 3.5 SP1Explicit[DataContract]publicclassUser{  [DataMember]  publicstringFirstName { get; set; }  [DataMember]  publicstringLastName { get; set; }  [DataMember]  publicstring Username { get; set; }  publicstring Password { get; set; } // do not share}
POCO FROM .NET 3.5 SP1IMPLICITpublicclassUser{  publicstringFirstName { get; set; }  publicstringLastName { get; set; }  publicstring Username { get; set; }  [IgnoreDataMember]  publicstring Password { get; set; } // do not share}
Been to my other talks?
A rose by any other name…Windows Server AppFabric Contains two key componentsHostingEndPoint, Windows App Server Extensions, DublinCachingVelocityNot to be confused with Azure AppFabric
N.B. AppFabricRequires .NET 4 on ServerApplications for not need .NET 4, depends on featuresStandalone download or Web Platform InstallerHigh Availability is only in Windows Server 2008 Enterprise & Data Centre
Windows Server AppFabric ArchitectureWindows Server AppFabricWindows Activation Services.NET FrameworkSQL ServerToolingLoggingIISWCFWFASP.NETVisual StudioSCOMPowerShellEvent Tracing for WindowsPersistenceMonitoringCaching
AppFabric + WCF = EasyDemo
SummaryWCF 4 can be as easy as ASMXFor majority of simple scenariosAbility to break the mould is thereAppFabric & WCFThe tools to configure and manage servicesScalable, manageable solution for hosting services on Windows
Questionsrobert@sadev.co.za@rmacleanMeet me at the community lounge
ResourcesRequired SlideLearningSessions On-Demand & CommunityMicrosoft Certification & Training Resourceswww.microsoft.com/techedwww.microsoft.com/learningResources for IT ProfessionalsResources for Developershttp://microsoft.com/msdnhttp://microsoft.com/technetNeed more Information?SMS [ Your Name ] and the word “AppServer” to 41491
Complete an evaluation via CommNet and Tag to win amazing prizes!
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

WCF made easy with Microsoft .NET Framework 4 and Windows Server AppFabric

  • 2.
    Robert MacLeanTechnology SpecialistBB&DWCFMade Easy with .NET 4 & Windows Server AppFabric
  • 3.
    Who am I?RobertMacLeanMicrosoft ALM MVPMicrosoft ALM RangerProud Community Lead Information WorkerS.A. Architectwww.sadev.co.za@rmaclean
  • 4.
    OvertureLevel 300What isnew in WCF 4 to make it easy?What is AppFabric?WCF + AppFabric = EasyWarning: Excessive use of implicit, explicit and angle brackets ahead
  • 5.
    The big pictureof WCF 4What is new?Configuration defaults, default endpointsWorkflow ServicesHigh performance tracing with ETWNew features for REST-based servicesQueued messaging enhancementsNew protocolsBasic Profile 1.2WS-Discovery and DiscoveryServiceRouterServiceNew DataContractResolver, extensibility
  • 6.
    My thoughts onWCFWCF is hardCompared to ASMXConfigurationBindingsEndpoints
  • 7.
    Building ServicesASMXWCF SexyWriteclass, add attributeInterface + AttributeExpose web methodsWrite class, add attribute“old” WCFJust work with POCOJust work with POCOInterface + AttributeWrite class, add attributeData ContractsConfigConfig Fixes
  • 8.
  • 9.
    Protocol MappingsThis isyour bindingStart with thisEg: http://demoDefault binding config!!!
  • 10.
    Default Endpoints &HostsSelf HostSupply base address via code or configExplicit: ServiceHost.AddDefaultEndPoints() Implicit: ServiceHost.Open() IISBase address is .svc endpointHTTP protocol is provided by defaultProtocols can be added in IIS Manager
  • 11.
    Are Default EndpointsA Good Thing?Designed to cater for the current majorityYou may be specialQuota issuesWSHttp or WebHttpMEXLimiting which contracts on which protocolsYou can override in machine.config (bad – mostly) or app.config (better – mostly)
  • 12.
    Refined Default Config<system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceMetadatahttpGetEnabled="true"/> <serviceDebugincludeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironmentmultipleSiteBindingsEnabled="true" /></system.serviceModel>
  • 13.
    POCO BEFORE .NET3.5 SP1Explicit[DataContract]publicclassUser{ [DataMember] publicstringFirstName { get; set; } [DataMember] publicstringLastName { get; set; } [DataMember] publicstring Username { get; set; } publicstring Password { get; set; } // do not share}
  • 14.
    POCO FROM .NET3.5 SP1IMPLICITpublicclassUser{ publicstringFirstName { get; set; } publicstringLastName { get; set; } publicstring Username { get; set; } [IgnoreDataMember] publicstring Password { get; set; } // do not share}
  • 15.
    Been to myother talks?
  • 16.
    A rose byany other name…Windows Server AppFabric Contains two key componentsHostingEndPoint, Windows App Server Extensions, DublinCachingVelocityNot to be confused with Azure AppFabric
  • 17.
    N.B. AppFabricRequires .NET4 on ServerApplications for not need .NET 4, depends on featuresStandalone download or Web Platform InstallerHigh Availability is only in Windows Server 2008 Enterprise & Data Centre
  • 18.
    Windows Server AppFabricArchitectureWindows Server AppFabricWindows Activation Services.NET FrameworkSQL ServerToolingLoggingIISWCFWFASP.NETVisual StudioSCOMPowerShellEvent Tracing for WindowsPersistenceMonitoringCaching
  • 19.
    AppFabric + WCF= EasyDemo
  • 20.
    SummaryWCF 4 canbe as easy as ASMXFor majority of simple scenariosAbility to break the mould is thereAppFabric & WCFThe tools to configure and manage servicesScalable, manageable solution for hosting services on Windows
  • 21.
  • 22.
    ResourcesRequired SlideLearningSessions On-Demand& CommunityMicrosoft Certification & Training Resourceswww.microsoft.com/techedwww.microsoft.com/learningResources for IT ProfessionalsResources for Developershttp://microsoft.com/msdnhttp://microsoft.com/technetNeed more Information?SMS [ Your Name ] and the word “AppServer” to 41491
  • 23.
    Complete an evaluationvia CommNet and Tag to win amazing prizes!
  • 24.
    © 2008 MicrosoftCorporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.