What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.
-
Upload
adam-weaver -
Category
Documents
-
view
213 -
download
1
Transcript of What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.
![Page 1: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/1.jpg)
![Page 2: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/2.jpg)
What’s New in WCF 4.5?
Richard Blewett
Rock Solid Knowledge Ltd
DEV326
![Page 3: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/3.jpg)
Agenda
The big pictureSimplificationModern communication
![Page 4: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/4.jpg)
The Big Picture
3.0Initial Release
2006
3.5Web Programming
2008
3.5 SP1POCO Support
2009
4.0Simplification and Routing
2010
4.5Simplification
and Communication
2012
![Page 5: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/5.jpg)
Simplification
Configuration simplificationContract firstFlat WSDLNew async model
![Page 6: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/6.jpg)
Configuration Simplification
WCF 4.0 simplified server configDefault endpointsDefault binding configDefault behaviors
WCF 4.5 simplfies client configAdd Service Reference only generates necessary config
![Page 7: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/7.jpg)
Contract First
Implement service based on existing WSDLGood model for interopUseful for integration callbacks – e.g. Salesforce notification
WSDL Svcutil /sc <wsdl>Service
Contract and Data Contracts
![Page 8: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/8.jpg)
Flat WSDL
4.0 WSDL contains schema imports for message definition
Can cause interop problemsSometimes import address isn’t routable
4.5 can generate flat WSDLAll constructs at one Uri
http://<metadata address>?singleWsdl
![Page 9: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/9.jpg)
Task based async
Async always supportedClient uses APM or EAPServer uses APM
4.5 introduces Task based asyncSame pattern client and serverIntegrates with async/await
![Page 10: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/10.jpg)
Async on the Client
Add Service Reference builds Async methods on proxy by default
[ServiceContract]public interface ITweetStats { [OperationContract] int GetTweetCount(string searchTerms); [OperationContract] Task<int> GetTweetCountAsync(string searchTerms);}
![Page 11: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/11.jpg)
Async on server
Far more elegant than APM
[ServiceContract]interface ITweetStats { [OperationContract] Task<int> GetTweetCount(string searchTerms);}
public async Task<int> GetTweetCount(string searchTerms){ // ... HttpWebRequest req = WebRequest.CreateHttp(uri);
WebResponse resp = await req.GetResponseAsync(); // ...}
![Page 12: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/12.jpg)
demo
WCF 4.5 Async Support
![Page 13: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/13.jpg)
Modern Communication
Metro ClientsUDPWebSocketsNetHttpBinding
![Page 14: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/14.jpg)
Metro clients
WCF client side available for Metro applicationsBasicHttpBindingNetTcpBindingNetHttpBinding (more on this shortly)
Proxy tuned for MetroOnly async methodsDuplex methods as events
No config filePartial method ConfigureEndpoint
![Page 15: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/15.jpg)
UDP
RFC 768 – User Datagram ProtocolConnectionlessUnreliableBroadcast
WCF support based on SOAP over UDPhttp://specs.xmlsoap.org/ws/2004/09/soap-over-udp/soap-over-udp.pdfText Encodersoap.udp addressing scheme
![Page 16: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/16.jpg)
demo
UDP Broadcast
![Page 17: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/17.jpg)
Web Sockets
http://www.w3.org/TR/websockets/Port 80 or 443Full duplex over single connection
WCF support Requires Windows 8 / Windows Server 2012Microsoft.WebSockets Nuget package for browser based clients
![Page 18: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/18.jpg)
demo
WebSockets to the Browser
![Page 19: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/19.jpg)
NetHttpBinding
Productionization of the NetHttpBinding SampleBasicHttpBinding with binary encoder
Supports HTTP based duplex over single connectionUses WebSockets for duplexRequires Windows 8 / Windows Server 2012
![Page 20: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/20.jpg)
demo
WebSockets to Metro Client
![Page 21: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/21.jpg)
And more …
Streaming enhancementsConfig intellisense and tooltipsConfig validationRevised quota defaultsMultiple authentication modes in IIS hosting
![Page 22: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/22.jpg)
Conclusion
.NET 4.5 makes WCF development easier
.NET 4.5 makes WCF development richer
![Page 23: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/23.jpg)
Resources
Connect. Share. Discuss.
http://europe.msteched.com
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Resources for Developers
http://microsoft.com/msdn
![Page 24: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/24.jpg)
Evaluations
http://europe.msteched.com/sessions
Submit your evals online
![Page 25: What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.](https://reader036.fdocuments.in/reader036/viewer/2022081520/5697bff61a28abf838cbe228/html5/thumbnails/25.jpg)
© 2012 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.