Over the past several months, I’ve been participating as an adviser to an interesting Microsoft patterns & practices effort named Project Silk. I don’t publish posts here about every project I’m tangentially involved in, but I think Project Silk is worth a look if you’re building modern, JavaScript-heavy web applications.

The project itself is comprised of a complete reference application and an extensive set of documentation describing how the app works and the process behind the design decisions that the team made along the way. Think of it as the NerdDinner sample (and accompanying book chatper), but focused almost entirely on client-side development rather than the server-side MVC component.

One of the most valuable aspects of the project is that it takes aim at the almost intractable topic of building large, maintainable JavaScript applications. You can see how seriously they took that goal by the time you get to just the second paragraph of the project summary:

An intentional design indicates that deliberate attention was paid to the modularity of the JavaScript code, and the usability of the application was an explicit focus. […] Modularity is important when building highly interactive web applications because they often require a significant amount of JavaScript code. This guidance aims to help you understand how to write maintainable JavaScript code that reaps the many benefits of a modular design.

Large, maintainable JavaScript is one of those topics that desperately needs a commensurately large real-world sample. Patterns like pub/sub and modular decomposition seem to add unnecessary complexity to small examples, but become invaluable as your codebase grows. It’s great to see a sample application that’s large enough to demonstrate how these problems arise and that attempts to tackle them head-on.

Have a look at the following locations to learn more about the project, download the sample application, and read the accompanying documentation:

Or, if you don’t want to build the sample project yourself just to see how the Mileage Stats application works, you might prefer this demo of it in action: