A lot of email comes my way beginning with the sentiment: “I’m not sure who to ask, and you’re the Silverlight Geek, so….” Which is great. I often refer them elsewhere, but it gives me a sense of what is on people’s minds, and also how well we’re doing making it obvious where the answers are.
The site redeisgn helps a lot (you’ve seen our new site, right?) but with this much information available, and this rapidly changing a product, it can be very difficult to find exactly what you need, especially if you are approaching things from a problem-specific vantage point. We’re working on these issues, and more on that to come.
In answering this person’s question, however, I realized that there was some generalizable advice about how to get started and find what you need that it made sense to blog about.
How Do I Accomplish This In Silverlight?
That simple question can have an answer as short as “Go look at this video where we do something very similar and then download the code and modify it” and as long as “here are the 20 things you need to learn before you can try to do that…..” This is all made more complex because virtually every user brings a different level of experience, domain expertise, and confidence to the table.
That said, there are some general pointers that we (here at Microsoft) need to get out as often as we can.
What Is Your Real Goal
That is the first question you have to ask yourself and that anyone offering you advice should be asking. As they say, you can’t get there if you don’t know where you want to go.
To simplify greatly, I usually see one of four goals (or something along the spectrum, in any case)
1. I want to create an application that does this and I want to do it fast, and not learn anything else; tell me how to get this done.
2. I need to create an application that does this, and along the way I’ll pick up some useful and reusable skills
3. I’d like to learn Silverlight (or Expression or….) and to do so I’ll build this to keep me focused
4. I have no idea where to start, but this sure looks like fun.
What Do You Know,
What Are You Willing To Learn,
and How Much Time Do You Have?
Let’s take an easy case: you are not a programmer and you don’t want to be one, you don’t have that much time and you want to learn only enough to get your job done. this case is easy because my advice is straight forward: be the domain expert: hire the programmer. If what you want to do is not trivial, then you’re going to fall into the Prime Directive of coding:
|Easy, Fast, Good: Pick Any Two|
So, let’s back up and assume that you are not case #1 (Starting from scratch, don’t want to learn to program, want to get there fast) because I believe the idea of that person writing a meaningful program that will satisfy their requirements of commitment, time, etc. is a non-starter.
For the other three cases, much depends on where you start out. The spectrum ranges from experienced .NET programmers to total novices. Suffice to say that the speed with which you’ll pick up Silverlight Programming is a stochastic outcome of talent, experience, luck and effort.
So what to do?
Rather than mire ourselves in the myriad approaches people take, let’s simplify this to the big 3:
- Buy It
- Learn from the bottom up
- Learn from the top down
#1 is not to be disparaged; in the build/buy decision many a programmer has burned a lot of their client’s money out of an insistence on building that which could be bought more inexpensively and with more reliability. But let’s set that aside for this discussion.
Top Down vs. Bottom Up
I’ll define these as follows (and let’s not quibble about corner-cases)
Top Down – Learn Silverlight by starting with what you want to build and learning how to build that – learn just enough of each skill to build your product.
Bottom Up – Set your project aside, learn the core skills, then look to combine them to successively approximate your project.
Of course, very few thoughtful people will take one approach to the total exclusion of the other but it is startling how many folks really try the Top Down approach.
I’m pretty sure some folks succeed with Top Down, but I’ve never seen it.
That doesn’t mean you have to learn everything about everything before you can do anything about anything, but it does mean that There Still Ain’t No such Thing As A Free Lunch.
Now, back in the dark ages, when I was moving from hacking to coding for cash, you could still learn everything there was to know about programming a PC in a couple weeks or months (and then about a year later, realize you were wrong, but that too is another story).
Today, you’re going to have to pick and choose, and what you pick and choose will be determined by your interests, goals and curiosity ,but it should be guided and informed so that you don’t “waste” a lot of time (as if learning something is ever a waste).
A Focused Course Of Study With A Little Help From Your Friends
Here’s the good news, I’m convinced you can learn to program Silverlight much more quickly than you might expect, if someone provides bread crumbs for you to follow. So I’ll have a go at providing an example of what I mean.
The person who wrote to me (remember him?) wanted to create an application that I will modify into the following spec. Start by taking a look at this graphic (click on the image to make it larger:
The size of a square shows the market share and relative size of a category, while the color shows the rate of change in sales. Red is down, and green is up, with the intensity of the color representing the magnitude of the change. [This image] shows gains and losses by category, comparing the fourth quarter of 2008 with the fourth quarter of 2007.
You can certainly build this in Silverlight, you can make it wicked cool, and you can make it even better by adding, for example, animation that lets the user click on a box and have it flip over and provide more detail, by adding animation to indicate change over time, and in many other ways.
But it is non-trivial.
How To Build This?
If, like today’s writer, you were to tell me that you have all this data, and you have this vision but you are not a programmer, I would suggest two approaches that might work well:
1. Hire someone who is a solid Silverlight Programmer to code it for you or
2. Plan to learn a good bit of Silverlight and Expression before tackling this.
Assuming you chose option 2…..
A Road Map
I would recommend that you accept that you do need certain fundamentals, but not all of them. With guidance, you can choose to learn some relatively advanced material before mastering some relatively introductory material, as long as you choose well. Thus, I might suggest:
1. Pick a language (C#, VB, IronRuby, etc.). Do not discuss this with anyone as you’ll start a religious war that will lead to great suffering of innocents. Just pick one. It almost doesn’t matter which you pick. I tend to use this algorithm:
Langguage whichLang = null;
while ( PickALanguage(randomChoiceGenerator) != C# )
Assuming, somehow, you picked C#, find a decent introductory book. There are many good choices, here is one at random…
Learn the following topics even if you can’t see how they relate to what you want to do:
- Visual Studio
- Language Fundamentals
- Operators, Branching
- Object Oriented Programming
- Classes, Methods
- Lists, Generics
- Interfaces and possibly Exception Handling
Learning Silverlight and Expression
Then set that aside and get a good book on Silverlight and another good book on Expression Blend and start working through those. At this point, you’ll also want to start taking advantage of the resources that are available on our sites, such as Videos and mini-tutorials about specific techniques, mini-tutorials, etc.
Find a community where you can get your questions answered: a great starting place are the forums on Silverlight.net and on the Expression Site and be sure to subscribe to Silverlight Cream – a daily edited compendium of the very best blog entries.
All this is daunting, and I’m looking at a very accelerated course! The simple reality is that Silverlight programming can be your first programming language/platform, but it won’t be trivial.
How Long Will It Take?
How long will it take for me to get in shape? For Joe to learn to sing? Much depends on motivation and talent, but realistically, I would think that someone working at this with some effort, who is pretty bright, could learn enough to build that application in 3-9 months (a bit of a range, eh?) Some will depend on how much help they can get.
The Good News
The good news is that the more you already know about programming; Windows; .NET; Silverlight; Design etc. the shorter the learning curve, and the even better news is that you can do all this for free using the resources on Silverlight.net and its sister sites.
Good luck, and when in doubt, use the forums; they are the single most powerful way to get questions answered quickly and with some authority.