This is the story behind the WPF: Entity Framework MVVM Walk Through series.
My name is Andy and I am an addict. (Well... sort of ). I'm a Forum Junkie. Hanging out in the MSDN Forums you tend to notice trends in questions.
By self selection the people who ask most questions are learners - the inexperienced.
On the WPF forum, some of these are skilled developers who are just new to WPF. Most tend to be inexperienced generally though and they tend to want to use pretty basic techniques like drag and drop datasources.
The drag and drop approach to database access just isn't used in any professional teams I've worked in, but this is the "standard" for a fair few people who ask questions.
Explaining to these guys that they should use MVVM and Entity Framework in a forum post gets nowhere fast. They've marked some trivial click handler answer before you've even finished writing your post. All of which is a bit depressing because the poster has been encouraged to carry on using poor technique and you basically wasted your time writing anything.
Clearly, what was needed, was some working sample so they could and see THE LIGHT. See this stuff working and some sort of a published explanation about how it's work. The forum post could focus on why it's all great and so obviously the one true way.
I do this stuff all the time.
This'll be easy.
I throw something basic together and they can see that working.
Basic is easy.... Isn't it?
It's all very well dreaming of stuff in your armchair. As I started crafting my sample it was immediately obvious that the techniques I use are advanced. They're up the far end of the path which winds through the forest of learning. Beginners are stood there looking at the forest looking bemused.
In other words, I needed to strip things down simpler.
This also meant I had to devise some simpler way of working. Oddly enough, I don't use beginner orientated code. Haven't for quite some time now.
Basic but elegant isn't so easy.
How about when I was learning?
Well there's a problem there as well.
Back then, I didn't use very good techniques. Showing someone what I did back in 2009 or so wasn't going to be much use. Even once you do that then basic can't cover everything.
Sat there musing on this, it was obvious what had to be done. Take the standard project approach to this. The "obvious" thing was to break this whole thing into chunks and deliver v1 as a working prototype. Add more in v2.
Then of course these samples would need some explanation. Both the samples and articles would need hosting somewhere.
Which is one of the reasons my interest in Technet Wiki and Technet Gallery started. I was totally unaware of Technet Gallery until Ed told me about it over on the WPF forum.
If you were to check when my articles were published you might notice that this series appeared after a number of others. That's because constructing the things took so long. Re-inventing the way you work so it's understandable to a beginner is actually quite tricky.
Watch the Step
After some months my sample was working, the article was published and these could be used to answer Forum posts. The birds were singing and all was well in the world.
Everyone lived happily ever after? Well not exactly. It quickly became obvious there was an awful lot in that first step. Kind of the whole idea was to deliver a cut-down but working sample which would be the first step to a business ready model. Beginners needed to understand this thing. At least understand it enough that they didn't just give up.
It needed to be headed in the roughly the right sort of direction and it needed to work.
In order to do so it needed to cover:
- Breaking your app up
- Entity Framework set up
- Use with MVVM
What I Learnt
That first article should really have been preceded by a number of small ones focussed on specific pieces. The explanation of the sample could then refer to them and been rather shorter with a narrower scope. That way at least readers wouldn't be quite so daunted.
You get surprisingly few people bother to rate a sample. If the points from ratings are to encourage authors to publish quality work then the mechanism could probably do with changing. I guess just a simple upvote would see more people clicking it rather than asking them to decide whether an article rates rates 3, 4 or 5 stars.
I've written and published the second sample in this series. I've also broken out pieces of that for more explanation and added some explanation of particular pieces of sample 1.
What I haven't done, yet, is write article 2.
I should really have planned this better. There again, if I had realised how much time I would spend on this project then I'm not sure I'd have even started. It's probably just as well I didn't plan better ;^)