www.a51.org.uk

Consuming a healthy amount of suckers online everyday!


« Bionic Commando: Rearmed PS3 trophy patch now live in UK

Crash Commando price to be slashed on Playstation Store »

Microsoft Silverlight 3 – It’s hard work!

This blog has been a bit all play and no work so far. Unfortunately I don’t get to play games all the time. :)

At work we’re currently evaluating a new shiny development environment called Silverlight 3. If you aren’t familiar with Silverlight (and there’s a good chance you won’t be) it’s Microsoft’s answer to Adobe’s Flash. In short you can code .NET Framework applications and run them in a browser with the Silverlight plug-in.

The main hurdle at the moment is that because it is so new, Microsoft have only just got it out of beta and haven’t actually got around to releasing any official books and documentation on how to develop applications in it.

So, although it’s always fun to learn, it’s very much a trial and error process at the moment. Anyone else trying to get their head around Silverlight 3 has my sympathies. Here’s a tip: Ibuprofen is great for headaches! :)

I think we may have jumped right in the deep end though. This is what we are trying to simultaneously comprehend at the moment:

We are creating a WCF (Windows Communication Foundation) web service in C#. This is consumed by a Silverlight application developed in VB.NET (we should have coded it in C# as well, hindsight and all that). The “pages” in the Silverlight application are created using a subset of XAML (Extensible Application Markup Language) which is part of Microsoft’s new XML-based application design framework called Windows Presentation Foundation (or WPF for short).

Confused? So were we and we still are to a certain extent. But we’re getting there.

It’s hard work.

[If you are currently starting out developing in Silverlight please beware when googling. Most of the information out there is related to Silverlight 2 and the Silverlight 3 beta. The final Silverlight 3 release code is radically different in many ways so careful what you read online. If you are faced with a method or property in your code that just won't compile, double-check it actually exists in the version of Silverlight you have installed.

Until something official is published, the best help and advice I've come across so far is from the blog's of the Silverlight developers themselves. One of the most useful resources is Method ~ of ~ failed by Tim Heuer at http://timheuer.com/blog/.]

Tags:
August 21, 2009 - 10:43 PM
2 comments »
  • Edar Harris

    August 23, 2009 | 5:21 AM

    I’m actually wrapping up an application written in Silverlight 2 right now. We’ll move it over to Silverlight 3 as soon as we release the application. As of now I strongly recommend you read Pro Silverlight 2 in C# 2008, authored by Matthew MacDonald. ISBN: 978-1-59059-949-5. I realize that this is a Silverlight 2 book, but almost everything that applies to Silverlight 2 also applies to Silverlight 3. It’s also important to note that in many ways Silverlight 3 just builds off of Silverlight 2. I know this book gave me a huge edge on our project, so much so that I became the team lead on the project. I agree with you on Time Heuer’s blog, it’s a great resource. I also recommend studying up on the Model, View, View Model (MVVM) pattern that has become very popular in the WPF world.

    I’ve also noticed that many developers get confused about Silverlight, because they don’t understand what it is. Many developers think that since Silverlight runs over the Web it must be similar to ASP.NET. Silverlight is actually nothing like ASP.NET, because Silverlight is a client side technology, whereas ASP.NET is a server side technology. I find it’s useful to think of a Silverlight application as a client application that communicates with the server, mostly because that’s what it is. With this in mind you should definitely quit thinking about “pages” and instead think about user controls, there’s a huge difference. Good luck on your application. I hope you find using Silverlight to be as enjoyable as I did.

  • zyclonium

    December 19, 2009 | 12:05 AM

    Hi Edar,

    Firstly, let me apologise for my extremely late response to your post. It got lost in a flood of spam comments until I found and approved it recently. (Akismet has since been unleashed and the spam is generally getting bashed about and banished now! :) )

    Silverlight is a technology that I would love to spend some more time with. At the time I wrote the post we were just trying to quickly evaluate it alongside other solutions. I did find a few minor but annoying differences between Silverlight 2, the Silverlight 3 beta and the Silverlight 3 final release. It was usually just methods being moved between namespaces which isn’t a big deal but it does throw you a little.

    I tend to think of a Silverlight application as a Windows application running as an applet inside a small ASP.NET wrapper page. I’m not sure if that’s the best description though. (I think of Silverlight as being more related to Flash than ASP.NET.)

    We were looking at the new Silverlight Navigation framework in Silverlight 3 though so the analogy of “pages” is appropriate. Although I accept that it is very wrong to think of them in the same way as ASP.NET pages. I just think of “changing page” as “flipping the XAML layout”.

    Thanks for your comment and good luck with your future Silverlight projects. (Also thanks for the book recommendation, I will have a look for it!)

Leave a reply