PDC 2008 – afterthoughts

So, here we are – PDC 2008 has just finished (yesterday, that is). Here is my take on what PDC 2008 was all about.

Surely, Azure – Windows in the cloud was the main attraction, and certainly interesting and a bit exciting. We will take a closer look at the technology and what this will mean for our customers when we get back home – but there is definitely something there. The ability to take an existing service or web application and scale into the cloud does sound intriguing. With the possibility to also have other services to rely on in the cloud, such as the SQL services or SharePoint services, Microsoft has a good offering and should be very competitive with their platform.

The second thing that got a lot of attention was the “Oslo” project. “Oslo” has been something I’ve been somewhat following a bit since the first time I heard about it, but have had trouble sort of grasping what it was all about. Every time someone talked about it, it sounded different than from the previous talk someone had. It seems that they’ve held the cards close to their chest on this one. What we got presented at PDC sounds very interesting; a language for creating DSLs. Sure, Microsoft has tried this before with Microsoft DSL – but this initiative seems more mature than their previous attempts.

One of the things that I was really keen to learn more about, was .net 4.0 and C# 4.0. With the introduction of the static type called dynamic, they are opening up a new ballgame to the world of static programming languages. I’m one of the guys who’ve always been very fond of static programming languages, but has started to see the true benefits of dynamic languages. With the introduction of dynamic in C#, there is a whole bunch of things one can do that you couldn’t before – not only work with dynamic languages, but more common scenarios as well. For one, you could “consume” services at runtime, without the need for generating proxies that change over time and could potentially cause source control headaches. Also Anders Hejlsberg talked about the introduction of named parameters and default values, something that Visual Basic has had for years. Coming from a C++ world, I missed the possibility to have default values in C# for method parameters. The combination of default values and named parameters, the language will get really powerful. I’m embracing this completely.

Another subject that got a lot of attention at PDC, was not surprisingly; Silverlight 2. Microsoft released during PDC the Silverlight Control Toolkit with the full source code and test harness. There were quite a few really good talks on Silverlight 2 and I found this content to be very satisfying.

Last but not least; Windows 7. This subject needs no introduction nor explanation. ๐Ÿ™‚

My take on PDC was that there was a lot of good sessions, and I attended some bad ones (without going into details here; my survey responses will reflect this). One thing I felt was a bit of a target miss, was some of the keynotes. They felt like marketing rather than targeting developers. I walked out on most of them, actually. My whole reason for being at PDC was to get good developer content, so this was a bit of a miss for me, I think.

All in all Microsoft delivered quite a bit of goods, some relevant for myself and my work and some not – but you can’t please everyone. They showed off what their focus is the next years.  

Its been a really busy week, my initial plan was to blog and twit about PDC all week – but got caught up with reality of focusing in on sessions and social activity during the nights. Seeing that Microsoft has all the material up on their site, you should just jump over there and start consuming all the video feeds.


Getting ready and excited for PDC tomorrow

Finally, the day is almost here; PreConference PDC. Landed approximately at 3PM local Los Angeles time and picked up my rental and headed down to Huntington Beach, were I am staying at a friends house.

Tomorrow there will be all kinda cool material at the PreConference, but my eye is on (not very surprising) the Silverlight part held by Jeff Prosise (read more here). Looking forward to this and 4 more days of endless coolnes. Hope to meet up with a lot of people.

And now, on to consuming a couple of beers and enjoying life as a whole. ๐Ÿ™‚


Silverlight Unit Test Runners on CodePlex

The Silverlight unit test runners project started off as an internal project at work (Objectware) more or less a a proof of concept to prove that it was possible to run Silverlight unit tests based upon Jeff Wilcox' test framework. We decided early on to release the binaries of it as soon as we had it up and running.

Now we've decided to release the source code as well and we're encouraging people to join in on the development.

If you'd like to join in on the project, drop me a comment here, send a message on the leftside or a message on CodePlex. Remember to include your CodePlex username and I'll add you to the project.

Anywho, the project can be found here.

The plan
If there is such a thing as plan, I am not aware of it. ๐Ÿ™‚  There are a couple of ideas, most of them are found in the project description on CodePlex. The basic idea is to be able to work with Silverlight unit tests like one is used to work with unit tests on any other project. We want to be able to use familiar tools and be able to run unit tests during continous integration.


Silverlight 2 released and available: New controls, tools

Microsoft follows up on their announcement yesterday and releases Silverlight 2 today.

You'll find everything on the official Silverlight site, but I'll post all the links for your convience here:

Silverlight tools for Visual Studio 2008
Silverlight 2 Developer Runtime (Windows)
Silverlight 2 Developer Runtime (Mac)
Silverlight 2 SDK – Offline documentation (CHM)
Blend 2 SP1

If you are using the Visual Web Developer Express 2008 edition, the Silverlight tools works fine with these as well. That is really neat, you can do Silverlight development without having to fork out any money!

Did you know that you can do Silverlight development in Eclipse?  Microsoft is funding a project to provide this. They've partnered up with Soyatec to provide the Eclipse Tools for Microsoft Silverlight.

There are some breaking changes between the beta versions and the release, have a look at the following document for these changes here.

Tim Heuer also have a great post with all the changes and how to get started with development and a quick overview of the breaking changes in Silverlight and in Blend2 SP1, here.



Steve Ballmer + NNUG = a bunch of happy guys

Two weeks ago, the day before I got awarded the MVP title – another big thing happened. The guys at NNUG (Norwegian .Net User Group), including myself had the chance to meet with Steve Ballmer and got our picture taken with him. How cool was that. I'll tell ya..  Reallllly cool..  Thanks to Rune Grothaug with the Norwegian DPE team at Microsoft for making this happen.


Silverlight 2 release announced today

Just got off a conference call with Scott Guthrie at Microsoft where he announced the release of Silverlight 2 today. It will be available tomorrow; 14th of October 2008 alonside a version of Expression Studio tomorrow that will have support for Silverlight 2 as well.

Unfortunately I wasn't able to type all the information they announced, as I was on my bike and for obvious reasons wasn't able to take notes. ๐Ÿ™‚

The download links aren't available yet, so pay attention to the official Silverlight.net site.


Creating a theme manager for Silverlight 2

 *** Update (2008-10-18): Added the solution as an attachment to this post + new title


One of the things I really feel like is missing in Silverlight 2, is a theme manager with the ability to apply the same style or template to all controls of a specific targettype, or to all controls in your page / usercontrol based upon a resource file on your application. If you're creating UI it seems so wasteful to have to include Style="{StaticResrouce blahh}", not to mention the fact that we aren't able to dynamically change the Style easy during the lifetime of the application.

I started today with creating the bits needed to do this, but quickly ran into a bit of a problem. All UIElements can have a resource dictionary attached to it with all the resources available for the context of that UIElement. So far so good. You can also use the XamlReader class to parse files with nothing but a ResourceDictionary in it. Then all we need to do, is to walk all the UIElements from the root visual you wish to apply for and set the Style property for these to the Style found in the ResourceDictionary according to the target-type specified. Problem is, the ResourceDictionary class does not implement the methods to just walk it, like for instance GetEnumerator().

But by doing a couple of minor magical things (not really magic, but it sounds cool), we can get all the keys for all the styles and use the keys to index the dictionary. We then use this to create our own dictionary based upon Type being the key. It is then just a matter of recursively going through all UIElements from the root visual and setting the Style property.

Heres the main method for getting the ResourceDictionary and parsing it:

Then we need the "recursiveness":

All you need then is to have a resource file with for instance the following markup as the start-tag:

And put all your styles in here and close it all off with a /ResourceDictionary

In your Page.xaml.cs file you just call the ApplyTheme with the RootVisual property on your page and the name of the file to use as a theme. The theme/resource file must be a content file:

In your Page.xaml for instance, you can then go about creating your UI without thinking about the styles.

The result will be something like this (Using Dave Crawfords Glossy theme):

Without the "theme" applied, it looks like this:

This technique can also be applied if you want to apply templates to your controls.

You can download the working solution from below:

SilverlightTheming.zip (36.69 kb)


All Game Camp 2008 Content available on YouTube

Finally we got the time to get all the content from the DV tapes onto a harddrive and have prepared it and uploaded it all to YouTube.

Below you’ll find links to all the content, most of it in Norwegian. The panel debate, the keynote and the second session by Scott Bilas are in English.

All videos

Keynote by Scott Bilas

Storytelling in games by Torbjรธrn Sitre from Funcom

Gamedesign by Trond Vidar Johansen from Artplant

Rapid prototyping by Eirik Moseng from Digiment Games

Optimizing the development pipeline by Scott Bilas from Loose Cannon Studios

Xna Workshop by Einar Ingebrigtsen from Objectware & Game Camp

Silverlight gaming by Einar Ingebrigtsen from Objectware & Game Camp

The panel debate featuring Rune Zakariassen / Microsoft, Jan Kasper Martinsen /NITH, Scott Bilas / Loose Cannon Studio, Eirik Moseng / Digiment Games and myself in front.


Performance Profiling in Silverlight

One of the things that is missing out of the box when developing Silverlight applications, is the ability to analyse performance. The performance monitoring tools in VS2008 does not support Silverlight. Seema Ramchandani at Microsoft has created a guide to two tools to aid with this; xperf and xperfView. These tools were previously only available internally to Microsoft, but is now available for everyone.

The xperf tool is a command line tool that be used to run the Silverlight application for collecting performance information. With xperfView you can take the output and get performance details from the xperf tool like this:

Thanks to Stefaan Rillaert for sending me this link.