How to start using WCF/WPF?
I've been using .net for quite some time, and everywhere I in开发者_开发知识库terview these days, I keep getting asked about my knowledge with .NET 3.0/3.5 technologies (WF, WPF, WCF etc.)
How do you start learning those? Any good links available out there?
Should I change my current code to start working like that?
I tried to learn WPF the same way I've always learned new technologies: I got a hold of the best book I could find on the subject (Adam Nathan's Windows Presentation Foundation Unleashed) and read it.
And it just didn't work. Don't get me wrong. It's an outstanding book. It's one of the few objects on my desk that doesn't have another object on top of it because I pick it up so frequently. I'm sure it's possible to learn WPF without it, but I wouldn't want to try. I recommend it wholeheartedly.
The problem is that there's so much that's new in WPF that a book intending to explain it all to you is going to be overwhelming. And, unfortunately, all of the books I've seen on WPF are about the technology, not about how to develop WPF programs. That's not an insignificant distinction.
My experience with Nathan's book was that I read about XAML and markup extensions and value converters and a half-dozen other things, and then, when my head was completely full and I still hadn't learned how to do anything useful yet, I got to the section on dependency properties work, and I was just done. It took me months to get over that hump.
And it's not because dependency properties are hard to understand. They're easy to understand. They're just hard to understand if someone is explaining their implementation details at the same time he's explaining the implementation details of everything else, and you're trying to figure out how to write a program.
That's why I think worked examples are invaluable. I found Josh Smith's articles on the Model-View-ViewModel (MVVM) pattern and data binding really, really helpful.
Fundamentally, I think that if you try to learn WPF without learning MVVM, everything you do is going to be much harder. It's not like MVVM is hard to understand. It's got an unfortunate name that makes it sound like the architecture astronauts are running the asylum, but it's really very straightforward.
There's a brilliant site for WPF: WPF Tutorials. This gives loads of information and tutorials on how to do many things.
For WCF, Microsoft is still the best place to start: Getting started with WCF
Of these technologies, I have used WCF only from now, and I must say that it really simplifies work when developing distributed systems (Silverlight applications that communicate to data servers in my case).
A good place to start with WCF could be Microsoft itself: http://msdn.microsoft.com/en-us/library/ms734712.aspx
I think the best way to learn it is to grab a book or go on a course.
And there's no magic way of "starting to use technology xxxx in my code". Once you know what a certain technology is about, see where it can fit in your architecture.
Its up to you actually, there is no best way to learn something; everyone has his own way of learning. I wouldn't start changing existing code to learn something; there are way too many things to go wrong this way. I would start with "hello world" applications and build up from there.
"Learning WCF" by Michele Leroux Bustamante is an excellent book for understanding and beginning with WCF especially if you like to learn hands-on with labs.
The good news is that the author of the book published the first chapter as PDF file in her BLOG. This chapter explains the basic concepts of WCF and SOA clearly and also provides some labs to teach the basic techniques of WCF. In my opinion this book is the best way to start with WCF because it's very well written and the labs are fun.
精彩评论