Api aggregator services

I’ve been looking at gigya socialize this week which seems to be a great tool for easily adding authentication to your site based on facebook, Twitter or openid. Seems very easy to implement and removes some of the complexity of managing all the different Apis in your own code. I’m sure services like these (api aggregator) will become more prevalent as commercial sites seek to allow their users to interact with them socially more and more. As these services reduce the technical complexity of implementing these social features the adoption curve should rise quickly. They also allow (smaller) social networks to offer more to their users – if they implement Apis on their end then their users can carry their network with them and have less reason to migrate to rival social networks.


validating radio buttons in a controller rather than the model requires a ValueProviderResult to be set explicitly

Catchy title to this little post! If you are validating a radio button and the user has not selected any radio buttons in the group then you will get an error if you use ModelState.AddModelError(“radiobuttonname”,”my error message”) unless you explicitly use ModelState.SetModelValue and pass in a ValueProvierResult as the model binder doesn’t like the null when it binds the view.

ModelState.AddModelError(“gender”, “Please select male or female.”);
ValueProviderResult vpr = new ValueProviderResult(null, “”, null);
ModelState.SetModelValue(“gender”, vpr);

Updating selected fields with linq to sql

I have been writing a bunch of stuff in asp.net mvc of late and have been using linq to SQL to quickly pull together my DAL (although I have been using a repository pattern and castle Windsor to implement an IOC container which I picked up from the excellent pro asp.net mvc book). One of my entities is a profile object and, on editing, I only wanted to update the image field if the user uploaded a new image. After struggling to skip the field with linq I found I could select the old profile object from the data context and simply update the other fields declaratively if no Image is passed in the new profile object. I can’t help feeling there is a more elegant way of doing this but I have had to be pragmatic and implement this as it works. I’ll post the code shortly.

Asp.net mvc

Playing around with.net mvc. Quite cool architecture and gets over lots of the issues with classic .net like page bloat and trying to force statefulness on to an inherently stateless system. I like the tight integration that’s possible with jquery as well so I will adopt asap but I have to figure out how well it can run alongside classic .net whilst I rewrite existing components into mvc versions. Pattern based, test driven development – should be good.

Facebook connect

So I am finally going to use facebook connect on our next project. Got some big architecture decisions to make in order to implement properly as our membership normally runs on the asp.net membership schema. Also have to experiment to see if I can push messages to the members facebook wall or inbox or whether I will still have to ask for their email. Most likely will give them the option if I have time.

Will report on progress as it happens.

Iphone blog post

So here is my first post from my new iPhone. I am very happy so far but had a real tough choice between it and one of the new android powered handsets starting to become available. Although I would have preferred the better speed of another network than o2’s net access I generally avoid version 1.0 of any new tech. That said some of the features are very cool and in twelve months time I think apple will have some real competition from google in the mobile space. That should make for some great new features being developed and hopefully better price plans to tempt customers.