ButtercupReader – A Silverlight Digital Talking Book Reader
For the second Mix in a row Intergen is launching a cool new Silverlight application: ButtercupReader!
ButtercupReader is a free Silverlight 2.0 application for viewing and playing digital talking books (DAISY) on the web by blind and partially sighted users.
As well as using Silverlight to render text and play DAISY document audio, ButtercupReader also showcases many of Silverlight’s accessibility features including screen reader support, shortcut keys, different contrast settings and zoomability. Andrew Tokeley, a member of the ButtercupReader team, has a great blog post on those features here.
I only worked briefly on this project, spiking out functionality at the beginning. It is great to see how it has all come together.
Sunday Podcasts
Hanselminutes - Mo Interviews Scott Hanselman
One of my highlights of TechEd NZ 2008 was meeting Scott Hanselman. Chatting about random techie things in the speakers room and working side by side to prepare our presentations was a lot of fun. Here Mo, Scott’s wife, interviews him about what it is like being The HanselMan.
Econtalk - Wales on Wikipedia
Wikipedia is a fantastic example of harnessing the cloud to collaboratively create something amazing. Jimmy Wales talks about what has made Wikipedia successful, dealing with conflict and how Wikipedia is a self managing entity.
Dungeons & Dragons Podcast – Penny Arcade Episode 1
The Penny Arcade guys are always funny and listening to them play D&D is hilarious. The first of episode of many.
Thoughts on improving JsonSerializer. IMappingResolver?
JsonSerializer is pretty darn flexible. It has a half dozen options on the class to customize how an object is serialized, attributes for more fine grained control and finally JsonConverters if you need to do something completely different.
The most popular request I get these days is control over how JsonSerializer determines what members on a type to serialize (e.g. serialize private as well as public properties) and control over the name of the written property (e.g. instead of “FirstName” write the property camelcase style: “firstName”).
Controlling this behaviour is actually already possible by inheriting from JsonSerializer and overriding GetMemberMappings. The MemberMapping class contains all the information about how a .NET member gets mapped to a JSON property (name, readable, writable, converter, etc) and is used internally by JsonSerializer. The problem is it isn’t terribly discoverable to the average user.
IMappingResolver
What I am thinking of doing is adding is an IMappingResolver interface.
public interface IMappingResolver
{
JsonMemberMappingCollection ResolveMappings(Type type);
}
JsonSerializer would have a MappingResolver property and the instance of the object assigned to it would determine how the members on a .NET class get mapped to a JSON object (if you’re hip with the GOF urban street lingo this is an example of the strategy pattern).
Examples of resolvers that could come with Json.NET or you could create yourself: CamelCaseMappingResolver, TypeDescriptorMappingResolver, PrivateMembersMappingResolver and so on.
I like this over inheritance because it is obvious and in a user’s face. MappingResolver could also be added to the JsonSerializerSettings class and used from the serialization helper methods on JsonConvert.
Yay or nay? Suggestions welcome [:)]
All those moments will be lost in time... like tears in rain... Time to die.
IE7 has been out for two and a half years. It is time to stop living in the past and retire IE6.
IETester
As an aside I highly recommend IETester (see the screenshot above) to anyone needing to test websites in old versions of IE. It renders IE 5.5, 6, 7 and 8 side by side in one application. It even supports tabs!