How to write programs in Silverlight

Posted by

I've been playing around with Silverlight recently, and I've discovered that my method of programming in Silverlight is slightly different to programming with any other framework that I've used in the past.

Normally, I'll read an "introduction" or "getting started" style guide, which will usually get you a basic "hello world" or whatever, and then it's usually a fairly simple matter of adding functionality to that until I get whatever I was trying to do in the first place.

For example, my recent forays into Lua and Luabind were like that. I started off reading the "Programming in Lua" book, which gave an overview of the language itself, then I used the fantastic Luabind documentation to fill in the gaps of how to integrate it with my game.

Now, I did struggle a bit with one or two things (as you can see my blog post), but for the most part it was exceedingly simple and I was up and running in about 3 days.

But Silverlight has been different. The way I've been programming in Silverlight is:

  1. Decide what I want to do next
  2. Fumble around with the classes, properties and methods I can see in the Intellisense list
  3. Give up and google search
  4. Find a post on the Silverlight forums, Stack Overflow, or something like that
  5. Do whatever it says to get stuff to work
  6. Go to step #1

I don't know if it's just because the Silverlight framework is so huge (though I never had this problem with Win Forms or ASP.NET, I'm sure) maybe it's just because in the past, when I've started on a new technology, it's usually been by starting with an existing codebase (that is, when I start a new job), or whether it's just because Silverlight really is that confusing and inconsistent.

Anyway, I'll stick with it, and hopefully I'll have that "aha!" moment when it'll all start to fall into place and I'm no longer just fumbling around in the dark... we'll see.

blog comments powered by Disqus