Making Web Apps Sizzle with Bing Maps and HTML5’s Geolocation API

A few weeks ago, I wrote about Silverlight for Windows Phone’s location API, which allows applications to ascertain their location – latitude, longitude, altitude (if GPS is available), and so on. More recently, I’ve been writing samples around HTML5’s geolocation API. The two APIs are remarkably similar save for HTML5’s lack of support for setting…

Jounce Part 14: Using MEF for Non-Shared Views and View Models

Even if you don’t use Jounce, this post will help you better understand how to create non-shared views and view models with the Managed Extensibility Framework (MEF). The architecture I prefer in Silverlight is to keep a shared view and view model where possible. If only one instance of the view is visible at a…

Comodo SSL Certificate Breach’s Potential Impact on Security Token Services and their Identity Providers

Recently, Iranian crackers used a username and password to make certificate requests from the Comodo Certificate Authority. These requests were successful and certificates were issued for 9 domains which are published on the Comodo Fraud Incident Report page: http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html This issue is of particular importance to me because SSL is the primary mechanism by which…

Weak Event Handlers

In a few editions of my book, I showed how to implement weak event handlers which allow an object to be GCd if no other reference is keeping the object alive. If the object is alive, it recieves the event notification and if it isn’t alive, it doesn’t receive the event notification. It has come…

Dynamic objects and Call Sites

In my previous article, I spoke about DynamicMethod. Today I would like to talk briefly about dynamic objects. Despite the similarity in name, these are completely different topics. It is a simple keyword really – “dynamic”. So innocent. So effortless to type. But this new keyword hides some powerful mojo. If you happen to be…

Using HTML5 Web Storage for Interprocess Communication

One of the exciting new features coming in HTML5 – and one that works in most HTML5 browsers today – is Web storage. The latest draft of the specification defines two types of Web storage: local storage and session storage. Local storage, which is analogous to isolated storage in Silverlight, persists data across browser sessions,…

Getting to know DynamicMethod

Many developers are unfamiliar with this very useful piece of machinery. The DynamicMethod class was introduced with framework version 2.0 and Silverlight version 3 as a way to offer a limited amount of IL generation at runtime without requiring the additional overhead that is needed when generating complete types or assemblies. The primary use case…

Building a Windows Phone 7 Application with UltraLight.mvvm

I recently released a new open source project called simply UltraLight.mvvm. The purpose of this project is to make it easier to build MVVM-based applications that support tombstoning (a must) on Windows Phone 7. The DLL is 22KB and the source is less than 300 lines of code. With that, the framework supports: Commands Command…

Jounce Part 11: Debugging MEF

The Jounce framework specifically relies on the Managed Extensibility Framework to help solve MVVM concerns. I recently presented an introduction to MEF and explained what I believe are the four core problems it solves: Discovery — it’s good to decouple, but at some point you need to provide an implementation, and MEF does a great…

Making HTML5 Come Alive with the Canvas API

The last five years of my career have been devoted to Silverlight. I began working with it long before version 1.0 was released, and with Silverlight 5 on the horizon, I’m even more excited about it today than I was then. The fact that you can write phone apps with it is icing on the…

Web Application Installer in WiX

If all you need to do is install your web application into Default Web Site, life is easy. Especially since Windows Installer XML (WiX) has all that support right in the box. Where things get nasty is if you need an installer that lets the user choose the web site, set the web application name,…

Silverlight for Windows Phone Programming Tip – Navigation

When using the Silverlight for Windows Phone APIs to navigate from one page to another, it is necessary to use the Navigate method on the PhoneApplicationPage instance’s NavigationService property. When making this call, it is important to note the required Uri Syntax, as follows: Navigating to a page in the same assembly: NavigationService.Navigate(new Uri("/Folder(s)/TargetPage.xaml", UriKind.relative));…