- No support for SSL in routing (no URL generation configured in a single place). One big hack is here.
- No support for (non)SSL redirect using RedirectToRoute (so it is not possible to redirect to (non)SSL page from controller action, except generating absolute link manually).
- HttpExeption is handled as any other one except if its Code is 404. Inconsistent. But is “as designed” in ASP.NET generally (FTW again).
- It reuses interface of the HttpContext class just acting as a proxy (HttpContextBase). Thus it inherits all the issues it has. It had to be different interface that abstracts from HttpContext (in particular the ApplicationPath’s trailing slash issue).
- No support for Fragment part of URL in routing.
- Weird ValueProvider – sometimes its value is array, sometimes string. The behaviour is consistent, but not naturally understandable. Have to wrap all that stuff with my own utility to unwrap that.
- NullReferenceException occurs accessing routes if not properly used.
- Annoying RenderPartial with model. Has to create a new ViewDataDictionary.
- Empty values are used instead of NULLs. By default if user leaves a field blank (non-mandatory) empty string is bound to the property. It will be fixed in MVC2.
- In reality, rarely you can use the typed C# 3.5 syntax for routing MvcContrib fixes that and I did it.
- The default data binding is NOT secure and it is often encouraged. This also applies to Castle MonoRail. To protect it we need to specify white-list (which leads to another problem) or use ViewModel/DTO (which I do) and thus write more code.
- The white-list of databinding properties is array of STRINGS. No type sefety. I write my wrapper to convert Expression<Func> to string. Fixing and patching again.
Generally the idea behind ASP.NET MVC is great. Even one of my ideas had been implemented in it.
But the delivered implementation has to be patched and wrapped with your own utils. Only after that it can be used consistently.
I am using ASP.NET MVC for about half a year or so and I still do prefer it instead of WebForms. Probably I just had to choose Castle MonoRail. I have never used it, only looked around, read blogs and looked into code samples, but it seems to be a bit more mature. It probably has less “features” (one is worth noting - routing), but I believe it at least performs consistently everywhere.
I am just so tired of patching, wrapping, extending, fixing all the Microsoft things…
I probably just need to go to holidays for a while to cool down a bit.
I should also mention the most positive tools I used with ASP.NET MVC:
- MvcContrib’s grid.
- NHAML view engine – this is a real relief. I don't even need the previous “tool” with it. Such a times and mood saver. It sill has some things I am missing heavily:
Ohh. And I have a great idea. Let’s rewrite all the tools we find design issues in? Huh?
Are you brave enough to tell that?
…hmm… I am probably not.
Though I want to.