Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Robert MacLean<br />Technology Specialist<br />BB&D<br />WCF Made Easy with .NET 4 & Windows Server AppFabric<br />
Who am I?<br />Robert MacLean<br />Microsoft ALM MVP<br />Microsoft ALM Ranger<br />Proud Community Lead <br />Information...
Overture<br />Level 300<br />What is new in WCF 4 to make it easy?<br />What is AppFabric?<br />WCF + AppFabric = Easy<br ...
The big picture of WCF 4<br />What is new?<br />Configuration defaults, default endpoints<br />Workflow Services<br />High...
My thoughts on WCF<br />WCF is hard<br />Compared to ASMX<br />Configuration<br />Bindings<br />Endpoints<br />
Building Services<br />ASMX<br />WCF Sexy<br />Write class, add attribute<br />Interface + Attribute<br />Expose web metho...
WCF Sexy<br />Demo<br />
Protocol Mappings<br />This is your binding<br />Start with this<br />Eg: http://demo<br />Default binding config!!!<br />
Default Endpoints & Hosts<br />Self Host<br />Supply base address via code or config<br />Explicit: ServiceHost.AddDefault...
Are Default Endpoints A Good Thing?<br />Designed to cater for the current majority<br />You may be special<br />Quota iss...
Refined Default Config<br /><system.serviceModel><br />  <behaviors><br />    <serviceBehaviors><br />      <behavior><br ...
POCO BEFORE .NET 3.5 SP1<br />Explicit<br />[DataContract]<br />publicclassUser<br />{<br />  [DataMember]<br />  publicst...
POCO FROM .NET 3.5 SP1<br />IMPLICIT<br />publicclassUser<br />{<br />  publicstringFirstName { get; set; }<br />  publics...
Been to my other talks?<br />
A rose by any other name…<br />Windows Server AppFabric Contains two key components<br />Hosting<br />EndPoint, Windows Ap...
N.B. AppFabric<br />Requires .NET 4 on Server<br />Applications for not need .NET 4, depends on features<br />Standalone d...
Windows Server AppFabric Architecture<br />Windows Server AppFabric<br />Windows Activation Services<br />.NET Framework<b...
AppFabric + WCF = Easy<br />Demo<br />
Summary<br />WCF 4 can be as easy as ASMX<br />For majority of simple scenarios<br />Ability to break the mould is there<b...
Questions<br />robert@sadev.co.za<br />@rmaclean<br />Meet me at the community lounge<br />
Resources<br />Required Slide<br />Learning<br />Sessions On-Demand & Community<br />Microsoft Certification & Training Re...
Complete an evaluation via CommNet and Tag to win amazing prizes!<br />
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be...
Upcoming SlideShare
Loading in …5
×

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

2,841 views

Published on

This is from my Tech-Ed Africa 2010 talk. For more information see: http://www.sadev.co.za/content/teched-africa-2010-slides-scripts-and-demos-my-talks

This session looks at what is new in WCF 4 to make our lives easier and how AppFabric brings that all together and makes it easier to deploy and manage.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

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

  1. 1.
  2. 2. Robert MacLean<br />Technology Specialist<br />BB&D<br />WCF Made Easy with .NET 4 & Windows Server AppFabric<br />
  3. 3. Who am I?<br />Robert MacLean<br />Microsoft ALM MVP<br />Microsoft ALM Ranger<br />Proud Community Lead <br />Information Worker<br />S.A. Architect<br />www.sadev.co.za<br />@rmaclean<br />
  4. 4. Overture<br />Level 300<br />What is new in WCF 4 to make it easy?<br />What is AppFabric?<br />WCF + AppFabric = Easy<br />Warning: Excessive use of implicit, explicit and angle brackets ahead<br />
  5. 5. The big picture of WCF 4<br />What is new?<br />Configuration defaults, default endpoints<br />Workflow Services<br />High performance tracing with ETW<br />New features for REST-based services<br />Queued messaging enhancements<br />New protocols<br />Basic Profile 1.2<br />WS-Discovery and DiscoveryService<br />RouterService<br />New DataContractResolver, extensibility<br />
  6. 6. My thoughts on WCF<br />WCF is hard<br />Compared to ASMX<br />Configuration<br />Bindings<br />Endpoints<br />
  7. 7. Building Services<br />ASMX<br />WCF Sexy<br />Write class, add attribute<br />Interface + Attribute<br />Expose web methods<br />Write class, add attribute<br />“old” WCF<br />Just work with POCO<br />Just work with POCO<br />Interface + Attribute<br />Write class, add attribute<br />Data Contracts<br />Config<br />Config Fixes<br />
  8. 8. WCF Sexy<br />Demo<br />
  9. 9. Protocol Mappings<br />This is your binding<br />Start with this<br />Eg: http://demo<br />Default binding config!!!<br />
  10. 10. Default Endpoints & Hosts<br />Self Host<br />Supply base address via code or config<br />Explicit: ServiceHost.AddDefaultEndPoints() <br />Implicit: ServiceHost.Open() <br />IIS<br />Base address is .svc endpoint<br />HTTP protocol is provided by default<br />Protocols can be added in IIS Manager<br />
  11. 11. Are Default Endpoints A Good Thing?<br />Designed to cater for the current majority<br />You may be special<br />Quota issues<br />WSHttp or WebHttp<br />MEX<br />Limiting which contracts on which protocols<br />You can override in machine.config (bad – mostly) or app.config (better – mostly)<br />
  12. 12. Refined Default Config<br /><system.serviceModel><br /> <behaviors><br /> <serviceBehaviors><br /> <behavior><br /> <serviceMetadatahttpGetEnabled="true"/><br /> <serviceDebugincludeExceptionDetailInFaults="false"/><br /> </behavior><br /> </serviceBehaviors><br /> </behaviors><br /> <serviceHostingEnvironmentmultipleSiteBindingsEnabled="true" /><br /></system.serviceModel><br />
  13. 13. POCO BEFORE .NET 3.5 SP1<br />Explicit<br />[DataContract]<br />publicclassUser<br />{<br /> [DataMember]<br /> publicstringFirstName { get; set; }<br /> [DataMember]<br /> publicstringLastName { get; set; }<br /> [DataMember]<br /> publicstring Username { get; set; }<br /> publicstring Password { get; set; } // do not share<br />}<br />
  14. 14. POCO FROM .NET 3.5 SP1<br />IMPLICIT<br />publicclassUser<br />{<br /> publicstringFirstName { get; set; }<br /> publicstringLastName { get; set; }<br /> publicstring Username { get; set; }<br /> [IgnoreDataMember]<br /> publicstring Password { get; set; } // do not share<br />}<br />
  15. 15. Been to my other talks?<br />
  16. 16. A rose by any other name…<br />Windows Server AppFabric Contains two key components<br />Hosting<br />EndPoint, Windows App Server Extensions, Dublin<br />Caching<br />Velocity<br />Not to be confused with Azure AppFabric<br />
  17. 17. N.B. AppFabric<br />Requires .NET 4 on Server<br />Applications for not need .NET 4, depends on features<br />Standalone download or Web Platform Installer<br />High Availability is only in Windows Server 2008 Enterprise & Data Centre<br />
  18. 18. Windows Server AppFabric Architecture<br />Windows Server AppFabric<br />Windows Activation Services<br />.NET Framework<br />SQL Server<br />Tooling<br />Logging<br />IIS<br />WCF<br />WF<br />ASP.NET<br />Visual Studio<br />SCOM<br />PowerShell<br />Event Tracing for Windows<br />Persistence<br />Monitoring<br />Caching<br />
  19. 19. AppFabric + WCF = Easy<br />Demo<br />
  20. 20. Summary<br />WCF 4 can be as easy as ASMX<br />For majority of simple scenarios<br />Ability to break the mould is there<br />AppFabric & WCF<br />The tools to configure and manage services<br />Scalable, manageable solution for hosting services on Windows<br />
  21. 21. Questions<br />robert@sadev.co.za<br />@rmaclean<br />Meet me at the community lounge<br />
  22. 22. Resources<br />Required Slide<br />Learning<br />Sessions On-Demand & Community<br />Microsoft Certification & Training Resources<br />www.microsoft.com/teched<br />www.microsoft.com/learning<br />Resources for IT Professionals<br />Resources for Developers<br />http://microsoft.com/msdn<br />http://microsoft.com/technet<br />Need more Information?<br />SMS [ Your Name ] and the word “AppServer” to 41491<br />
  23. 23. Complete an evaluation via CommNet and Tag to win amazing prizes!<br />
  24. 24. © 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.<br />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.<br />
  25. 25. Notes – Hide slide<br />
  26. 26. AgendaAgenda Subtitle<br />Agenda item 1<br />Agenda subheading<br />Agenda Item 2<br />Agenda subheading<br />Agenda item 3<br />Agenda subheading<br />Etc…<br />
  27. 27. Name<br />Title<br />Company<br />Title of Presentation<br />SESSION CODE: #####<br />
  28. 28. PowerPoint TemplateSubtitle color<br />Example of a slide with a subhead<br />Set the slide header to “Title Case”<br />Set subheads in “sentence case”<br />Generally set subhead to 36pt or smaller so it will fit on asingle line<br />The subhead color is defined for this template but mustbe selected<br />
  29. 29. Sample Fill<br />Sample Fill<br />PowerPoint Guidelines<br />Font, size, and color for text have been formatted for you in the Slide Master<br />Use the color palette shown below<br />Hyperlink color: www.microsoft.com<br />Sample Fill<br />Sample Fill<br />Sample Fill<br />Sample Fill<br />
  30. 30. Slide for Showing Software Code<br />Use this layout to show software code<br />The font is Consolas, a monospace font<br />The slide doesn’t use bullets but levels can be indented using the “Increase List Level” icon on the Home menu<br />To use straight quotes " instead of smart quotes ”, do this:<br />Click on the Office Button in the upper left corner<br />At the bottom of the menu, choose PowerPoint Options<br />From the left pane, select Proofing<br />Click on the AutoCorrect Options button<br />Select the AutoFormat As You Type tab, and deselect “Straight quotes” with “smart quotes”. Then Click OK.<br />
  31. 31. Table Format<br />
  32. 32. Bar Chart Example<br />
  33. 33. Pie Chart Example<br />
  34. 34. Breakout sessions<br />Breakout sessions<br />Breakout sessions<br />Breakout sessions<br />Related Content<br />

×