Mithril
A Javascript Framework for Building Brilliant Applications
Yet another JS Framework?
What's the difference?
Filesize
AngularJS
Ember.js
jQuery
40kb
100kb
35kb
mithril
5kb
react
35kb
Why Filesize mAtters
- Faster download (Mobile friendly)
- Faster parsing and compiling (also Mobile friendly)
- Fewer code to reason about
- Fewer code with bugs
- More space for own code :)
API Surface
AngularJS
Ember.js
jQuery
200+
100+
200+
mithril
20
react
~ 50
???
Why API Surface Matters?
- fewer to learn
- fewer to reason about
- fewer to memoize
- more freedom for integration
- smaller lock-in-factor
Performance
AngularJS
Ember.js
Knockout
800ms
1000ms
300ms
mithril
80ms
react
600ms
http://matt-esch.github.io/mercury-perf/
Why Performance matters
- for reasons
- mobile friendly
- UX
Embraces Functional Programming
- Easy to test
- Easy to extend
- Less bugs because of sideeffects
Features
React-Like VDOM
Small Routes Layer
Modules
Ajax-Helper
- Nothing More -
NO GOD Class
No Inheritance Tree
No Template Langugage
No Module Loader
No Crap you probably don't need
Example
When not To Use
Beginners Or People who need Structure
a lot of 3rd Party Code to integrate
Copy of mithril.js
By Stefan Von Der Krone
Copy of mithril.js
- 421