20 July 2008

How to learn Silverlight in 10 steps

I'm feeling like the luckiest geek on Earth. I had mixed feeling about starting work because I wanted to have some free time to learn Silverlight. And guess what - that's exactly what I've been doing at work for the last two weeks!

Here's what I started with: a strong background in programming, but mainly in ANSI C, a minimum knowledge of C#, a bit of experience in creating a GUI in Java... and that's all that's relevant, I guess. And here's what I've done so far, put in an as systematic way as I can, so if you wanna learn Silverlight too, follow me.

  1. Find out what Silverlight is and where it fits. If you're just gonna use it as a Flash replacement, there's no point.
  2. Get the tools from http://silverlight.net/GetStarted/. (You might as well learn from that website and be really happy, but for me, it's not systematical enough and I hate video tutorials, so I've been to many other places).
  3. Make a "Hello World" application to understand what is what in a Silverlight application. This tutorial is a great place to start and you can follow all the 8 parts right now for a quick walkthrough of the basic features. That's what I did, and then I googled for specific stuff I needed.
  4. Learn about the layout controls: grid, stack and canvas. Now you can add stuff to your application without wondering why they all are in the left top corner and overlap each other. And to make a more custom user interface, learn about basic geometric shapes.
  5. Learn about the basic controls: buttons, radio buttons, text boxes, and whatever you might need and is already out there ready for you.
  6. Learn about event handling.
  7. To use lists, grids and stuff, learn about data binding and data collections.
  8. Learn to make your own controls and to style them, in XAML directly or with Blender. See also this glass button tutorial.
  9. Learn to make animations: in XAML, in C#, with Blender. Why three ways? Blender produces XAML code, probably faster than you'd type it, but it's useful to understand how it works to be able to modify it. In C#, you may have problems keeping the logic separated from the presentation, but sometimes you need to create or modify animations at runtime or reuse them. Before you do too much with animations, learn about the Visual State Manager. This tutorial explains it in an excellent way, read it carefully. It has issues, unfortunately, see here.
  10. Learn about accessing the HTML DOM from managed code.
  11. Learn about networking and communication in Silverlight.
  12. Learn using isolated storage and application settings.
I've been done the steps up to number seven. You're not exactly done after number ten, there might be stuff I'm not yet aware of and there are more advanced topics like inheriting from User Control vs. Custom Control or security. You may need to improve your C#. Plus, no tutorial will ever replace experience, but if you wanna gain it, I hope I've helped you figure out how to start.

9 comments:

  1. Your post is really interesting.
    Thanks.

    ReplyDelete
  2. Hi Lilivatti,

    I and a friend are going to open an Internet business which involves Silverlight.

    Since I'm responsible for the marketing side of the business I don't have time and frustrated to search from where to start learning silverlight.

    Strangely I searched blogs using google for "steps for making site button" and I landed at your blog!!!

    Was it meant to be or just a coincidence? All I can say is that you saved me many hours of searchings and readings.

    Are you going to be posting more about Silverlight? Also, would you consider working as a consultant for us (I can't promise this at this time)?
    I have a feeling that it was destiny that brought me to your blog!

    Here is my email just in case: sabbas@saad.com.sa
    if you can remove my email from the post then it would be great.

    ReplyDelete
  3. Thanks guys!

    I sure will be posting more about Silverlight in the time to come. However, I am too busy to take another job.

    (Saleh, I can't remove your e-mail address, just the entire comment, so maybe remove your comment and post it again without the address.)

    ReplyDelete
  4. Amazing Anna.
    I m sure u hav devoted a lot of time in collecting and arranging all this
    inyo one topic .
    hats off to u.

    ReplyDelete
  5. love u darling.............

    ReplyDelete
  6. No, it didn't take me much time, I just took notes while learning so all I had to do was a bit of cleaning-up in those notes.

    ReplyDelete
  7. Thanks Anna u save my day. I am newbie to silverlight and find this blog so informative. It really helps me and save my lots of time. Anna keep it up all these good work in future again.

    ReplyDelete
  8. i have machine running win2000, is there any way i can install silverlight on my machine. please suggest me because i am not getting any help.

    ReplyDelete