Language

Know a library other than Knockout?

By Mads Kristensen|

The Single Page Application (SPA) template is a great way to get started writing single-page applications. The template uses KnockoutJS to bind application data to DOM elements.

But Knockout is not the only JavaScript library for creating rich client applications. Other libraries solve similar challenges in different ways. You might prefer a one library over another, so we've made several community-created templates available for download. Each of these templates uses a different mix of client JavaScript libraries.

To install a community-created template, visit one of the template pages listed below and click the Download button. The templates are provided as VSIX files.

BackboneJS

Backbone.js SPA template. This template provides an initial skeleton for developing a Backbone.js application in ASP.NET MVC. Out of the box it provides basic user login functionality, including user sign-up, sign-in, password reset, and user confirmation with basic email templates.

BreezeJS

BreezeJS is an open source library for managing rich data in a JavaScript client. Breeze handles querying, caching, change tracking, validation, and more. Two templates feature Breeze:

  • The Breeze/Knockout template extends the Knockout SPA template, showing how easily you can build a single-page application with Breeze for data management and KnockoutJS for data binding.
  • The Breeze/Angular template also extends the Knockout SPA template with Breeze, but using the AngularJS library for data binding, dependency injection, and screen management.

In addition, the Hot Towel SPA template uses BreezeJS.

Durandal

Durandal SPA template. This template uses Durandal, an open source JavaScript library for rich client application development. Durandal provides an enjoyable and productive developer experience centered around simple conventions and standard patterns like MVC, MVP and MVVM.

The Durandal SPA template provides a bare-bones starting point for a typical navigation-style application architecture, ready for your own content and features.

EmberJS

EmberJS SPA template. This template uses Ember, a powerful MVC JavaScript library that solves a wide array of challenges for building rich client applications.

The Ember SPA template is a re-implementation of the Knockout SPA template, using EmberJS and Handlebars templating.

Hot Towel

Hot Towel SPA template. This template brings in several JavaScript libraries, including Breeze, Durandal, Knockout, RequireJS and Twitter Bootstrap.

Compared with the other templates listed here, the Hot Towel teample provides a more complete application from which you can build your own. There are more concepts to be aware of, but once you understand them, this template might just be what you are looking for. If you want to build a SPA but can't decide where to start, use Hot Towel and in seconds you'll have a SPA and all the tools you need to build on it.

Feature table

Here are the features provided by each SPA template:

  ASP.NET SPA Backbone Breeze/Angular Breeze/KO Durandal Ember Hot Towel
ToDo sample  
Bare template  
Navigation and history
Libaries              
 Angular            
 Backbone            
 Breeze        
 Durandal          
 Ember            
 Knockout      

This article was originally created on February 5, 2013

Author Information

Mads Kristensen

Mads Kristensen – Program Manager at the Web Platform & Tools team, author of Web Essentials and founder of BlogEngine.NET. You can always find Mads at madskristensen.net or on twitter at @mkristensen