MvcSpa is a framework for creating single page applications using model view controller design pattern.

The view templates are done using jazor an extreamly cool javascript component that is in it's early stages but does everything I've asked of it so far.

you can find out more about jazor at http://www.fidelitydesign.net/?p=375
This project was once called armza and was hosted here on codeplex

sample:
    var myApp = window.myApp = mvc.app.create();
    var controller = myApp.controllers.controller;

    myApp.controllers.homeController = mvc.define(function () {
        return {
            init: function () {
                this._super();
            },
            index: function () {
                var model = { name: "test" };

                return this.view(model);
            }
        };
    }, controller);

    myApp.views.home = {
        index: "hello @model.name <a href='#products'>Products</a>"
    };
    
    myApp.controllers.productsController = mvc.define(function () {
        return {
            init: function () {
                this._super();
            },
            index: function () {
                var model = { id: 1, name: "product" };

                return this.view(model);
            },
            edit: function(model) {
                model.name = "product";

                return this.view(model);
            }
        };
    }, controller);

    myApp.views.products = {
        index: "product @model.name <a href='#products/edit/@model.id'>Edit</a>",
        edit: "edit product id @model.id <a href='#products'>Back</a>"
    };
    
    myApp.routes.mapRoute('Default', '{controller}/{action}/{id}', { controller: "home", action: "Index", id: myApp.urlParameter.optional });
    myApp.run();

Last edited Feb 14, 2013 at 6:00 PM by JeffCirceo, version 3