Immersive MVC and jQuery: Project Silk

Patterns and Practices have just released their latest round of guidance for developing web applications – “Project Silk”. I’ve been watching what they generate closely and I think you’ll be impressed. To quote the landing page; “Project Silk provides guidance for building maintainable cross-browser web applications that are characterized by an intentional design, rich interactivity,…


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…


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….


JavaScript Coding Standards

About six months ago a few customers asked me about coding standards when writing custom JavaScript using Microsoft’s frameworks… it turned out that we didn’t really have any publicly available standards. To address this myself and Stuart Leeks set about coordinating and writing some standards to fill this gap. With some highly valuable input, support,…


Client Script Patterns: Predictive Fetch

Why do you write JavaScript? It’s probably for one of two major reasons – Responsiveness or Richness. Richness we know about – it’s the flying, sliding, flashing, and sometimes annoying UI features we see J But Responsiveness is much less tangible – it’s about how an application feels to use. Does it feel like it’s…


jQuery + MVC = Progressive Enhancement

If you write a lot of JavaScript, you really should consider adopting Progressive Enhancement as the standard way that you work. This is basically whereby you write a web site without script, and then enhance it with script. The result is a site that does not rely on JavaScript (and hence works with accessibility tooling…


JavaScript Prototypes versus Closures

Recently I’ve been coordinating and authoring some JavaScript best practice documentation, and one area that came up which I thought was interesting was the reason for using prototypes instead of constructors to define JavaScript class members. Thanks to Bertrand, Dave, and Stephen for assistance with this. There are two main ways to create JavaScript class…


Important news for ASP.NET MVC, Ajax and jQuery

It’s been a busy period for announcements, so if you’ve not heard check these two out; 1.       ASP.NET MVC 2 was released late last week! See Scott’s post. 2.       We’ve announced that we’re investing heavily in (by contributing to) jQuery as the JavaScript platform of choice for MVC development, and that we’re merging the Ajax…


Handling errors with jQuery.load

I’ve just posted a very simple walkthrough of the different ways to handle errors when you’re using jQuery’s “.load” function to do partial rendering… it’s on our team blog so check it out here;


Closure Exposure: A JavaScript Scope Trick

You might have seen some JavaScript is wrapped up in funny looking functions, such as this screen shot, and wondered why – even parts of the Microsoft Ajax Framework previews use such an approach. At first it can seem very strange, but don’t worry – it’s actually very simple, and equally useful. Scope First of…