ICANN RFC for anything.* domain names. Might want to take a look. Most of you readers play in this here internets thing, this could effect you or the company you work for. :)
October 27, 2008
October 19, 2008
ActionFilter / ParameterBinder sequence
For future reference for myself and others:
1. CustomModelBinderAttribute -> GetBinder()
2. IModelBinder -> BindModel()
3. ActionFilterAttribute -> OnActionExecuting()
4. ActionFilterAttribute -> OnActionExecuted()
5. ActionFilterAttribute -> OnResultExecuting()
6. ActionFilterAttribute -> OnResultExecuted()
(As of Beta 1)
Stack Overflow! MVC Model Binders Gone Awry
The recently released MVC Beta 1 has some pretty cool features. One of the features that I’ve been using for a while is Model Binders. These are now turned on by default which can cause some problems if you’re not expecting this behavior. For example, say you have an action as follows:
public ActionResult Binder(Dog dog)
{
return View("Index");
}
Here’s the model:
public class Dog
{
public string Name { get; set; }
public Dog cat { get; set; }
}
Calling this action will cause a stack overflow error, as the default model binder will attempt to recreate every dog in the chain.
I would not have noticed this as I use my own implementation of the model binders to provide functionality for pulling an entity from NHibernate that is passed by ID via Ajax. The problem is that I recently switched over to the [Transaction]/ATM method of managing transactions with NHibernate. The problem with this method is that it creates a dynamic proxy of your controller so it can intercept the transaction. In doing so it looses the method argument attributes and then – boom – stack overflow. So now I’m off to hack YET ANOTHER open source project to see if I can get it to not remove the method parameter attributes. :(
October 17, 2008
Dead Wrong UI Design
I am a Microsoft Fan Boy. Today I’m going to show how good a friend I am and point out the bit of cilantro stuck between the teeth of Microsoft SQL Server Management Studio Express.
For this example I’m designing a new table in the management tool, using a bit field to indicate if a pet is dead or not. (Nevermind the obvious flaw that there are several types of dead.) Obviously I want a default value of NOT-DEAD or as we like to call it around here: 0.

Ok, no problems so far. Lets put in some sample data:

Wait a minute now. You mean that when I specify the default value I must put a zero, but when I enter data into the table I have to type out ‘false/true’ for every entry? Ohh, and just in case you’re curious no, you can’t type ‘false/true’ in for the default value.
I’m sure none my readers would ever do anything like this. :)
(All 5 of you.)