2. oMithril is a client-side MVC framework
-a tool to organize code in a way that is:
easy to think and to maintain
oMithril used for building Single Page Applications.
4. Light weight
o7 kb gzipped, no dependencies
o Small API and small learning curve
Robust
oIncludes everything needed to create a SPA
Routing
Requests
Hierarchical MVC via components
oPlays well with others
Fast
oVirtual DOM diffing and compilable templates
oIntelligent auto-redrawing systems
5. Documentation
o Mithril has more documentation in its Github repo than source code
o None of the documentation is auto-generated.
• Architecture
o Mithril does not provide base classes to extend from.
o Developers can get discoverable codebases without getting locked into the
framework.
7. Who Uses Mithril ?
Used to build brilliant applications.
• Guild Wars 2 - Guild Wars 2 is using Mithril to power its in-game marketplace
The best free, Chess server -
This is the second largest chess website in the world (and mobile app).
• Techwalla- Tech reviews you can trust
• IconFinder - IconFinder uses Mithril for its more complex user interfaces, such as sales
analytics.
• Memrise - Memrise is an online learning platform for language.
8. Comparison of Mithril vs React
React and Mithril share a lot of similarities.
• They both use virtual DOM, lifecycle methods and key-based
reconciliation
• They both organize views via components
• They both use JavaScript as a flow control mechanism within views.
The most obvious difference between React and Mithril is in their scope.
9. Performance
Here's a comparison of library load times, i.e. the time it takes
to parse and run the JavaScript code for each framework, by
adding a console.time() call on the first line and a
console.timeEnd() call on the last of a script that is composed solely
of framework code.
For your reading convenience, here are best-of-20 results with
logging code manually added to bundled scripts, running from the
filesystem.
React Mithril
55.8 ms 4.5 ms.
10. BenchMark
Library load times matter in applications that don't stay open for
long periods of time (for example, anything in mobile) and cannot be
improved via caching or other optimization techniques.
Here's a slightly more meaningful benchmark: measuring the
scripting time for creating 10,000 divs (and 10,000 text nodes). Again,
here's the benchmark code for React and Mithril. Their best results are
shown below:
React Mithril
99.7 ms 42.8 ms
11. Update Performance
Update performance can be even more important than
first-render performance, since updates can happen many
times while a Single Page Application is running.
You can compare a React implementation and a Mithril
implementation. Sample results are shown below:
React Mithril
12.1 ms 6.4ms
12. Advantages
• Small Size and easy to learn.
We chose Mithril because we were looking for a framework with two
main features.
• To be able to perform very fast on rendering
• To be versatile and small (in size, API and learning curve).
Mithril is great at both, and much more. Learning Mithril has been
more learning JavaScript rather than anything else.
13. Disadvantages
• Mithril’s small API and small Number of functions will be helpful for
small projects and applications where speed is required.
Mithril is unsuitable for larger more complex projects