View Model versus Domain Entity Validation with MVC

I blogged way back in January about what I see as the three variants of View Model usage in ASP.NET MVC. If you’ve not read that post, check it out here and report back! The Problem What I’ve started to see is that many other developers like my approach of defaulting to Variant 2 (a…


What is hard to do in Web Development?

Patterns and Practices are spinning up their next round of guidance soon, and they want to know what to focus on… so go and answer their incredibly short survey if you want your chance to make a difference to what they produce! Check out Karl and Don’s posts with links to the survey. Don’t be…


Different Routes for Different Hosts Using Constraints

I had the pleasure of visiting some guys in Munich this week to talk about ASP.NET MVC. Well, the time with them was a pleasure, but I did have two awful airport experiences due to snow in 48 hours! Something we discussed that I’ve come across before is using different routes depending upon the domain…


Offline Data Cache in Windows Phone 7

I’ve been building a Windows Phone 7 application that basically lets a user create records offline, and then pushes those up to a cloud service when network connectivity is available. These offline records are not as offline as I would like though – it’s never that simple is it? The records contain data fields for…


Bubbling PropertyChanged Events in Silverlight

I’ve been working with Silverlight (specifically for Windows Phone 7) recently and something I’ve found useful is the ability to “bubble” PropertyChanged event up. So for example; 1: public class MainPageViewModel : INotifyPropertyChanged 2: { 3: public ObservableCollection<Person> People 4: { 5: get 6: { 7: return _repository.Items; 8: } 9: } 10:   11:…


Controller Action Design in MVC

Validate, Act, Translate, and Respond. That’s about it. I’ve been trying to come up with a nice acronym for how to structure code in Actions for some time now, and this is the best I have managed. I wish it spelt a nice word – so if you’ve a better suggestion shout up. What I’m…


Comparing Architectural Options

Often when I speak with people that are planning a new solution they have a few different products or platforms in mind. To compare these options, most try something like a “capability matrix” (which goes by many names). Roughly these end up looking like this; Feature Product One Product Two Supports .NET X X Supports…


Adding Client-Side Script to an MVC Conditional Validator

Update: If you like this, you’ll like Mvc.ValidationTookit even more – check out this post! In a previous post I covered how to write a conditional validator to work with ASP.NET MVC, and a little gotcha to avoid. However, I didn’t include any details on how to wire up this validator with some client side…


Conditional Validation in MVC

  Update: If you like this, you’ll like Mvc.ValidationTookit even more – check out this post! Recently I put together samples for different types of validation for some customers, and one of those was Conditional Validation – that is “this field is required if another field is true”, and such like. But a few weeks…


jQuery.validate and Html.ValidationSummary playing nice together

A customer recently asked me how to get MVC with the MVC Futures project’s MicrosoftMvcJQueryValidation.js adapter file to play nicely with the Validation Summary HTML helper. It turns out that this functionality isn’t built into the adapter script file. They also pointed me at this post by Soe Tun that gets things up and running….