Windows 8 TTT First Day Summary

Ok, so the first day of the TT has passed, and I guess it is time to sum it all up… Well, my impressions of the first day is that I feel that both VS11 and Windows 8 has matured a lot between the releases. It feels a lot more solid, and I am actually going to switch my private laptop, and maybe even my work one over to Windows 8 as soon as I get back.

It is hard to pinpoint what exactly make me say this, but it just feels a lot more solid. It seems to have a lot less “quirks” and the errors you get while coding against it seems a WHOLE lot better. Having that said, we haven’t actually coded a whole lot today. It has mostly been walkthroughs of features and design and so on. Basically covering the same thing that was covered during BUILD last year…

So unfortunately there isn’t a whole lot to sum up. Nothing really new at all…

More...

On the way again…

I barely managed to get back from this years MVP Summit before I am on my way again. I landed in Stockholm yesterday at 11:30, and it is now 15:30 and I am back on the train to the airport…

This time I am headed to Amsterdam for a “Train the Trainer” for Windows 8. For those of you who do not know what TTT events are, they are basically a way for Microsoft to educate trainers on their new platforms, making sure that there are trainers out there ready to educate people when their new platforms launches. I personally think this TTT is going to be extra interesting as it is covering the next version of Microsoft’s biggest product (Windows…duh), which just a couple of days ago was released as a “consumer preview” version. And this time, Microsoft is handling the whole thing a bit differently than normal, so it is quite exciting…

More...

HttpRequests using HTTP verbs, headers and cookies in Silverlight

When working with Silverlight, we often end up communicating with some form of services. They might be SOAP-based WCF services, which Silverlight handles fine, but lately REST-like services have become a lot more popular, and Silverlight doesn’t always handle them as nicely… They often rely on headers and HTTP verbs other than GET and POST, which Silverlight doesn’t handle very well by default.

In my world, I am currently spending a lot of time working with a Silverlight client that is used in a situation where we use federated security. This requires the client to carry around a token that tells the service who he/she is, and what claims are being made.

In this case, we are using the thinktecture IdentityServer, which after a bit of configuration works very well. It makes it very easy to integrate with using Silverlight, which is nice. All you need to do is do is to make an HTTP GET call to the identity server, passing along the credentials in the form of a basic authentication header. The identity server in turn replies with a token that identifies the client (at least if the credentials are valid). The client can then POST that token to the the service (relying party) who will then use that token to authenticate the client. And after that, everyone is happy, and the service can trust the client being who he/she says he/she is…

More...

Building a template selector in Silverlight

There are several “missing” features in Silverlight that people keep bringing up, or keep trying to find solutions for. One of them is the template selector, or DataTemplateSelector class to be more specific.

The DataTemplateSelector has a single responsibility, which is the way it should be. It is responsible for returning a DataTemplate based an object. Generally, it is used in lists, where the data template can be selected based on the bound item, and thus give different templates to different kind of objects in the list.

In Silverlight, this is not possible out of the box, and instead requires us to create multiple UI controls, and hide and show them using data binding. This approach works, but it easily becomes heavy and complicated, which is why I want a template selector that works…

More...

Trying Out Azure Service Bus Relay Load Balancing

As you might have noticed from previous posts, I am somewhat interested in the Azure Service Bus. Why? Well, why not? To be honest, I don’t actually know exactly why, but I feel that it offers something very flexible out of the box, and without to much hassle.

One of the later feature that was added to it is the support for load balancing when using message relaying. (You can read more about message relaying here)

It is pretty cool, and just works… And by just works, I mean it really just works. If you have a service using message relaying today, adding another instance will automatically enable the feature. But remember, the messages are delivered to ONE of the services, not both. So if your service cannot handle that, make sure you change the implementation to make sure that only one instance is running at any time.

More...

Encryption is not everything

Sorry, for the cryptic title for this post, but it is sort of true, at least when it comes to client access policies. And I didn’t know it until a couple of days ago…

As a part of a project I am working on, we are deploying an STS (Secure Token Service) to handle authentication the users of an OOB Silverlight application. The STS is completely decoupled from the application, as it should be, and is hosted on its own, and the client requests a token from the service through a simple HTTP GET with basic authentication.

More...

Exposing and consuming REST-based APIs with WCF WebApi and Silverlight

There are many ways to expose functionality and data from a server to a client. And there is probably almost as many going the other way… In Microsoft scenarios, using WCF is the obvious choice for most of us, and when people talk WCF, they generally talk SOAP based webservices.

SOAP can however be a less than ideal choice in a some cases. It is way more complicated than some of the other options, and on top of that it has a tendency to bloat the messages being sent, which can be an issue when working with mobile clients for example.

More...

SignalR and Silverlight

SignalR is a somewhat newish open source project that makes it possible to simulate push notifications on the web. It does so using long-polling (websockets available as an extra download), so it isn’t true push as such, but it gives the appearance of push. And on top of that, it is so ridiculously simple to set up…

Unfortunately, the NuGet package for SignalR doesn’t include the Silverlight client, which the GitHub project does. This is most likely going to be fixed in the near future, but currently you will have to do it the manual way instead of using NuGet.

The server part of SignalR works fine through NuGet, however, it doesn’t play nice with the Silverlight version as a property has been renamed and causes issues. So we have to do the whole thing manually to make sure both the client and server has the modified property… Once again, it is probably going to be fixed some time really soon.

More...

Adding WCF custom service behaviors in config

Lately I have been working with a bit of WCF for a client, and one of the things I have had to do is to create a service behavior to handle some security things. However, due to the fact that this application needed to run in several different environments, it needed to have different configuration under different circumstances.

The real need was actually to be able to remove the behavior in some circumstances, and add it in some. But I didn’t really want to do it through a bunch of if-statements in my behavior. Instead I wanted it to be done through configuration so that I could turn it on and off using config transforms…

More...

Is Windows Phone 7.5 Too Good?

I know I am a Microsoft fanboy, and I am the first to admit it. But I still want to say that I can listen to other peoples arguments and try to look at the facts objectively. I tend to see benefits in a lot of Microsoft things, but that doesn’t mean that I believe that everything else sucks.

I have used a Windows Phone device since before they were even released, built a couple of apps for it and talked about it for different audiences. And it is not a big secret that I like it, especially since I got Mango on my phone.

Having that said, I still believe that there are 2 very good alternatives available. The iPhone is, whatever kind of fanboy you are, a great phone. No, I don’t like a lot of things when it comes to Apple, and I don’t like being stuck with iTunes, and I don’t like Apple’s censorship. But it still is a freaking awesome phone, and pretty much single handedly managed to change the smartphone market into what it is today, which is SO much better than it was with Windows Mobile.

More...