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

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 JavaScript. This post is tacks some script onto that approach! It wasn’t as simple as…


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


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…


Ajax Control Toolkit Coding Standards are Live

Two of our ADCs (Simon Ince and Stuart Leeks) have been coordinating work with people across Services and various product groups to produce a comprehensive set of coding standards for the Ajax Control Toolkit. This was in direct response to requests from the ADC team’s customers for such documentation. The ASP.NET Ajax product team liked…


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…


A JavaScript Event Bus

I was working on a Proof of Concept recently that needed to support loosely coupled Ajax components. The idea is a common one – components need to be able to hook into an existing page without detailed knowledge of how the page works, and immediately start responding appropriately. This is basically using loosely coupled events…


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…


Enforcing Unobtrusive JavaScript

Unobtrusive JavaScript is a concept that’s been around for quite a while, but it’s now finally starting to make its way into the mainstream. The basic idea is that you should separate your JavaScript from your HTML – so instead of; <a href=”Default.aspx” onclick=”alert(‘Sorry, that is unavailable’); return false;” >Click Here</a> You should have something…