Implicit Data Templates, is that really a good idea?

In Silverlight 5, we can use a new feature called “implicit data templates”. An “implicit data template” is a data template that will be used based on the type of the bound object instead of a “manual definition”. That is, we can define data templates and tell them what type they render, and then let the system figure out what template to use as it binds objects.

This sounds really brilliant… Let’s try it out!

More...

Using ildasm and ilasm to fix the EPiServer Mobile Pack

Ok, so a couple of days ago (or something) EPiServer released a module called Mobile Pack. It is built to make it easy for companies to get their website up and running for mobile browsers, which is pretty cool.

It uses “Visitor Groups” and a browser criterion to redirect mobile users to a mobile version of the website. A solution which is actually quite simple, but it works well, and simple well working things are great. At least it works in theory. Unfortunately, in the real world the code doesn’t work…

More...

Have you seen Uri.GetComponents()?

If you haven’t, it is freaking brilliant! Well, at least very useful! And it has been around since .NET 2.0…

For some reason I keep ending up in situations where I need to get certain parts of a Url. In a lot of cases, I just want to extract the scheme and host name, eg https://chris.59north.com/, from a longer Url, and I don’t think I am alone. But if you Google it to find a good solution, you get a gazillion hits talking about how people have created this awesome method that takes the parts of the Url and uses string concatenation to build the result. Well, guess what…that sucks!

More...

Custom type providers in Silverlight 5

Ok, after yesterdays less technical post, I guess it is time to get back to writing a real techy post. This time, it is even techy, or geeky, enough to be about Silverlight 5, which currently is still in beta.

This obviously means that we can’t use it, but it doesn’t mean that we can’t have a look at some of the new features and start thinking about how we can upgrade our existing applications as soon as the new version is released…

Custom type providers might sound really obscure, and to be honest, not very interesting. But that’s where you are wrong…

More...

BUILD Windows, the weirdest conference I have ever signed up for

Ok, so I have finally got myself settled in Stockholm (Sweden) and started my new job at Active Solution. It has started slow, but it is looking very promising after having been here a day and a half. It might even give me a bit more time to keep my dear blog active, which has unfortunately been a bit neglected during the whole move from Sweden.

One of the first things I am going to do for my new employer, is to go to the BUILD Windows conference in Anaheim, and blog and tweet as much of the information I get my hands on as possible…with my personal views included of course (not that they really asked for that)…

So I went to the BUILD website and registered myself, something that went very smooth. I guess that is to be expected. Whenever someone wants you to give them $1595 (or whatever it was), they generally remove any friction from the process.

More...

Adding X(A)ML Based Configuration of IoC Containers in Silverlight

One thing that I have been missing with my IoC container in Silverlight is the ability to configure it using a config file. In “regular” .NET, this is an option that most containers support in one way or another. It makes it easy to have different config files for dev, stage and production for example, which is really nice. In Silverlight the story is different… Why? Well, I assume it is because it is a bit hard to switch config files in Silverlight as the file gets embedded in the XAP file, which makes it less usable than it does in the bigger sister.

Having that said, I still believe it could be a good option for some apps, and decided to build my own implementation…like I always do…

More...

Options for localizing Silverlight applications

As a very small group of people might have noticed, my blog has been more or less dead for the last couple of weeks…or months to be honest… The reason for this is that I have had a bit to do as I have packed up my life in New Zealand and moved back to Sweden. This is a little bit more time consuming that you’d expect, so I have had to move my focus away from certain things. And unfortunately, my blog was one of the things I had to axe.

The move back to Sweden did however make me think about localization, as building apps in Sweden often means adding at least 2 languages, Swedish and English. The topic has been in the back of my mind for a long time, but I never really settled on a good way to handle the whole thing. However, at this point in time, I felt that I really had to come up with some options. And with the introduction of a specific feature in Silverlight 5 called markup extensions, I felt that it might be time to have a look at it.

More...

I have had enough…

I really tried not to write this post. A lot of other Silverlight devs have already written it so I shouldn't, but I have had enough… I have finally got asked about the death of Silverlight so many times that is has pushed me over the edge…

Silverlight isn’t dead… It isn’t dying… It isn’t about to be killed…

How do I know this? Well, except for some of the information I am hearing from Microsoft about it, it doesn’t make sense… It makes no sense at all!

More...

WCF service clients for the complete n00b

Ok, so in my last post, I gave a brief introduction to WCF for the complete n00b. As a follow up to this, I would like to have a look at some different ways to consume these services.

The “normal” way to do it is obviously by adding a service reference to the project in VS, but there are alternatives that can make sense.

The samples I am going to use are specifically for Silverlight as they focus on simple bindings and features that Silverlight supports, but it can still be used for any .NET client.

More...

A WCF introduction for the complete n00b

Ok…So I am more of a general .NET and Silverlight developer, but it is hard to get around the fact that WCF infiltrates most of the projects I ever work on. And after having read a substantial part of Juval Löwy’s book about WCF, I have realized that there was a lot that I didn’t know and didn’t fully understand. Not that I am saying that I get it all now, but I have a better understanding at least.
The thing is that WCF isn’t really very hard in most cases, but having a basic understanding makes it a lot easier. And to be honest, the basics will take you a long way when working with Silverlight, since Silverlight doesn’t support a lot of the more advanced features. To be honest, the WCF support  in Silverlight is fairly basic, but it is enough…
So based on this, I thought I would try and write a down to earth and simple introduction to the main concepts in WCF.