- index.html
- index.html - script.js - style.css
- about.html - contact.html - index.html - products.html - css/ - style.css - js/ - jquery.js - script.js
- index.html - css/ - style.css - js/ - controllers.js - init.js - model.js - presenters.js - routes.js - views/ - about.tmpl - contact.tmpl - home.tmpl - products.tmpl
Model-View-Controller
Model-View-Presenter
Model-View-View-Model
var Cat = function (options) {
this.colour = options.colour;
this.type = options.type
this.aim = options.aim;
};
Cat.prototype.setAim = function () {
return "Beginning " + this.aim;
};
Cat Info
<% name %>
This <% type %> cat is aiming for <% aim %>!
route.get("#/about/grumpy", function () {
var mycat = new Cat({
name: "Tardar Sauce",
type: "Grumpy",
aim: "World Domination"
});
// Bind data to template and render it
render("cat.tmpl", mycat);
});
Cat Info
Tardar Sauce
This Grumpy cat is aiming for World Domination!
BackboneJS
AngularJS
RiotJS
…and many more…