mithril-vndb/archive/v0.2.0
2015-05-01 09:29:54 -04:00
..
comparisons docs build 2015-04-30 22:02:06 -04:00
lib/prism docs build 2015-04-30 22:02:06 -04:00
tools docs build 2015-04-30 22:02:06 -04:00
auto-redrawing.html docs build 2015-04-30 22:02:06 -04:00
benchmarks.html docs build 2015-04-30 22:02:06 -04:00
bower.json docs build 2015-04-30 22:02:06 -04:00
change-log.html docs build 2015-04-30 22:02:06 -04:00
community.html docs build 2015-04-30 22:02:06 -04:00
comparison.html docs build 2015-04-30 22:02:06 -04:00
component.json docs build 2015-04-30 22:02:06 -04:00
components.html docs build 2015-04-30 22:02:06 -04:00
getting-started.html docs build 2015-04-30 22:02:06 -04:00
how-to-read-signatures.html docs build 2015-04-30 22:02:06 -04:00
index.html docs build 2015-04-30 22:02:06 -04:00
installation.html fix link 2015-05-01 09:29:54 -04:00
integration.html docs build 2015-04-30 22:02:06 -04:00
mithril-tests.js docs build 2015-04-30 22:02:06 -04:00
mithril.component.html build new pages 2015-05-01 09:24:28 -04:00
mithril.computation.html docs build 2015-04-30 22:02:06 -04:00
mithril.d.ts docs build 2015-04-30 22:02:06 -04:00
mithril.deferred.html docs build 2015-04-30 22:02:06 -04:00
mithril.deps.html docs build 2015-04-30 22:02:06 -04:00
mithril.html docs build 2015-04-30 22:02:06 -04:00
mithril.js docs build 2015-04-30 22:02:06 -04:00
mithril.min.js docs build 2015-04-30 22:02:06 -04:00
mithril.min.js.map docs build 2015-04-30 22:02:06 -04:00
mithril.min.zip docs build 2015-04-30 22:02:06 -04:00
mithril.module.html docs build 2015-04-30 22:02:06 -04:00
mithril.mount.html build new pages 2015-05-01 09:24:28 -04:00
mithril.prop.html docs build 2015-04-30 22:02:06 -04:00
mithril.redraw.html docs build 2015-04-30 22:02:06 -04:00
mithril.render.html docs build 2015-04-30 22:02:06 -04:00
mithril.request.html docs build 2015-04-30 22:02:06 -04:00
mithril.route.html docs build 2015-04-30 22:02:06 -04:00
mithril.sync.html docs build 2015-04-30 22:02:06 -04:00
mithril.trust.html docs build 2015-04-30 22:02:06 -04:00
mithril.withAttr.html docs build 2015-04-30 22:02:06 -04:00
mithril.xhr.html docs build 2015-04-30 22:02:06 -04:00
optimizing-performance.html docs build 2015-04-30 22:02:06 -04:00
package.json docs build 2015-04-30 22:02:06 -04:00
pages.json docs build 2015-04-30 22:02:06 -04:00
practices.html docs build 2015-04-30 22:02:06 -04:00
README.md docs build 2015-04-30 22:02:06 -04:00
refactoring.html docs build 2015-04-30 22:02:06 -04:00
roadmap.html docs build 2015-04-30 22:02:06 -04:00
routing.html docs build 2015-04-30 22:02:06 -04:00
style.css docs build 2015-04-30 22:02:06 -04:00
tools.html docs build 2015-04-30 22:02:06 -04:00
web-services.html docs build 2015-04-30 22:02:06 -04:00

JS.ORG Join the chat at https://gitter.im/lhorie/mithril.js Build Status

Mithril

A Javascript Framework for Building Brilliant Applications

See the website for documentation

There's also a blog and a mailing list


What is Mithril?

Mithril is a client-side MVC framework - a tool to organize code in a way that is easy to think about and to maintain.

Light-weight

  • Only 5kb gzipped, no dependencies
  • Small API, small learning curve

Robust

  • Safe-by-default templates
  • Hierarchical MVC via components

Fast

  • Virtual DOM diffing and compilable templates
  • Intelligent auto-redrawing system

Sample code

//namespace
var app = {};

//model
app.PageList = function() {
	return m.request({method: "GET", url: "pages.json"});
};

//controller
app.controller = function() {
	var pages = app.PageList();
	return {
		pages: pages,
		rotate: function() {
			pages().push(pages().shift());
		}
	}
};

//view
app.view = function(ctrl) {
	return [
		ctrl.pages().map(function(page) {
			return m("a", {href: page.url}, page.title);
		}),
		m("button", {onclick: ctrl.rotate}, "Rotate links")
	];
};


//initialize
m.module(document.getElementById("example"), app);

Learn more