ASP.NET MVC4 with Unobtrusive JQuery Validation – Part I

When I first read about JQuery’s validation plugin I was pretty interested; client side validation is almost a required feature for any modern web-form. And it’s integrated with my model classes’ Data Annotations so I don’t have to repeat the validation rules? Perfect! It’s also pretty easy to set up, although can get a bit …
Read more

Refactoring the Switch – Part II

In the previous post I demonstrated a few simple ways of eliminating the switch statement from places it doesn’t belong. This will be a continuation, showing how the Visitor pattern (cleaned up by some C# features) can improve this further. Let’s assume we’re going to be cleaning up some existing code. I’ll stub out a …
Read more

Refactoring the Switch – Part I

I’m not a huge fan of the switch statement. While when used in the correct scenarios it can be a big help, eliminating code duplication and increasing readability and maintainability, it is often thrown around in many situations when it actually works against developers and decreases these important metrics. A common use is to assign …
Read more

Simplicity

Simplicity is the ultimate sophistication. — Leonardo da Vinci.