Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this questionFor those just starting to learn WCF, what 开发者_运维问答are the major/basic things I should look at and learn first?
What concepts would you recommend to learn first, to be productive in WCF?
What resources/articles/training/books would you recommend to someone learning WCF?
In C#, for example, one can learn LINQ at a later stage. Along similar lines, in WCF also there should be basics to learn first, and then later invest time in advanced features to enhance productivity.
The book I always recommend to get up and running in WCF quickly is Learning WCF by Michele Leroux Bustamante. She covers all the necessary topics, and in a very understandable and approachable way. This will teach you everything - basics, intermediate topics, security, transaction control and so forth - that you need to know to write high quality, useful WCF services.
Besides that book, I also really learned a lot from these two one-hour screencasts on WCF:
- DotNet Rocks TV Show #122: Miguel Castro on Extreme WCF
- DotNet Rocks TV Show #135: Keith Elder Demystifies WCF
I like this one: http://wcfguidanceforwpf.codeplex.com/
It's aimed at WPF developers who want to learn WCF, but I would recommend it even if you aren't that familiar with WPF either.
Also, I always suggest to people to use a tutorial that shows WCF working without using Visual Studio's "Add Service Reference," which is a tool in VS that you can point at a WCF or other web service and have it generate a bunch of foundational classes that help you connect to that service easily. Most tutorials will have you create a service and then create a client for that service using Add Service Reference, at least to start with.
I highly recommend a tutorial like the above, or this one if you want to start typing sooner (bugmenot.com has devx.com logins you can use if you don't want to register) that goes beyond that and shows you how to do it "by hand", because it really reinforces the core idea of WCF, which is that if an app wants to consume a service, all it needs to know is the ABC's: the address of the service, the type of binding to use, and the contracts (the methods on the service and the classes it uses as parameters and return types).
Also note that a lot of tutorials still out there are for VS2008. Not much has changed, but one thing that can confuse newcomers is that the XML configuration for bindings has been reworked in .NET 4 / VS2010 to make better use of defaults. The config files that VS 2010 will generate for you to start with are shorter than they used to be and look like they are missing required information, but in fact they are just using defaults.
Here are some good links:
http://msdn.microsoft.com/en-us/netframework/first-steps-with-wcf.aspx: Some cool videos here.
http://msdn.microsoft.com/en-us/library/ms734712.aspx
http://www.wcftutorial.net/
http://www.aspnet101.com/2010/08/windows-communication-foundation-wcf-tutorial/
http://aackose.wordpress.com/2010/05/11/basic-wcf-tutorial-for-beginners/
If you want to learn the basics fast (the ABC's), look at Dime Casts, WCF.
Videos (around 10 minutes each)
- Introduction to WCF: Creating your first service
- Migrating from .asmx web services to WCF web services
- Learn how to consume a WCF service
- Taking a look at how to separate out your WCF service project into multiple parts
- Adding IoC support to your WCF Services
That means you can have a good idea within an hour :) Epic win
Don't miss this GREAT Book:
Ron Jacobs, (Senior Technical Evangelist for WCF at Microsoft) wrote on its forewords that "The best testament to this is to wander the halls of building 42 in Redmond (where the WCF team works); in many of the offices you will see Programming WCF Services on the shelf."
So from that I gathered that the team at Microsoft first wrote WCF and then they bought this book to understand what they actually have written!!
But seriously, I strongly recommend this book not to only understand WCF but also to learn how Juval Löwy - one of the most prominent distributed systems experts in the world today - thinks and looks at WCF and the concept of designing Enterprise SOA applications in general.
Learn the ABC of WCF: "Address, Bindings, Contracts".
Best is to look for tutorials on the Internet as they have mentioned above, and to then create your own Service, host that service in a console app and then use VS2008/10 Add Service Reference to create the client interface to your wcf service.
WHen you get the hang of things, you must definitely invest in either Michelle's book or Juval's book, they are the best in the industry.
There are a lot of information which can really make it difficult to learn WCF but focus on the ABC and start with a specific binding and address type and work your way from there.
The below link will be useful.
There is also a sample WCF Project Tutorial included which is meant for beginners
Link - http://softsprogrammer.blogspot.in/2014/02/wcf-tutorial-for-beginners.html
- First understand service orientation theory and why we need to rely so heavily on services in modern development. This study should include research into service-oriented architectures (SOAs) and how the SOAP protocol works at a high level. This should also cover how to effectively segregate your interfaces and what are appropriate levels of information. Keywords include: Coherency, consistency, cohesiveness, and designing for distribution.
- Follow this by learning the so called ABCs (Address, Binding and Contract) of the WCF framework, or stated differently the basics of WCF. Make sure you understand that a binding is merely a consistent, canned set of choices regarding the transport protocol, message encoding, communication pattern, reliability, security, transaction propagation and interoperability.
- Follow this up with a study of the hosting options in WCF. It includes not worrying about the creation and disposal of service, on-demand availability of web services, etc. But this approach has one major drawback in that protocols other than HTTP are not supported. WCF comes with the possibility of being invoked and used by protocols other than HTTP. So along with IIS, WCF can also be hosted in different ways so that its full power can be utilized (if required). Keywords here: IIS, WAS, and self-hosted Windows Services
- Then explore the various nuances of marking up the various contracts. This include the service contracts, data contracts, fault contracts, and message contracts. Tie this back to the understanding of how your markup will ultimately be translated to the WSDL contract and the XSD data contract types. You should at this stage also do some investigation into backward and forward compatibility.
- At some stage security will become a factor, so the next step would be to get comfortable with both message and transport security. At this stage it would be good to start tying your knowledge to the WS-* standards. More specifically the security standard.
- Follow this by a study of the different concurrency models and how to design WCF services for scalability.
- WCf is massively extensible and as such at this point start playing with behaviors and gain an in-depth knowledge of the framework's evaluation order.
- Play with service throttling
- Play with different protocols
By this stage you would be pretty proficient....
精彩评论