SlideShare a Scribd company logo
1 of 14
Submitted by,
Mohamed Mohsin K
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.
Leo Horie ,Software Engineer, author of Mithril.js
 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
 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.
PERFORMANCE
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.
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.
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.
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
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
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.
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
THANK
YOU

More Related Content

What's hot

Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device DriversNEEVEE Technologies
 
Web api crud operations
Web api crud operationsWeb api crud operations
Web api crud operationsEyal Vardi
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFBrendan Gregg
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack IntroductionAnjali Chawla
 
Splash screen for Embedded Linux 101: How to customize your boot sequence
 Splash screen for Embedded Linux 101: How to customize your boot sequence Splash screen for Embedded Linux 101: How to customize your boot sequence
Splash screen for Embedded Linux 101: How to customize your boot sequencePierre-jean Texier
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
Process Address Space: The way to create virtual address (page table) of user...
Process Address Space: The way to create virtual address (page table) of user...Process Address Space: The way to create virtual address (page table) of user...
Process Address Space: The way to create virtual address (page table) of user...Adrian Huang
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack DevelopmentDhilipsiva DS
 

What's hot (20)

Php ppt
Php pptPhp ppt
Php ppt
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
Web api crud operations
Web api crud operationsWeb api crud operations
Web api crud operations
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Splash screen for Embedded Linux 101: How to customize your boot sequence
 Splash screen for Embedded Linux 101: How to customize your boot sequence Splash screen for Embedded Linux 101: How to customize your boot sequence
Splash screen for Embedded Linux 101: How to customize your boot sequence
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Process Address Space: The way to create virtual address (page table) of user...
Process Address Space: The way to create virtual address (page table) of user...Process Address Space: The way to create virtual address (page table) of user...
Process Address Space: The way to create virtual address (page table) of user...
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack Development
 

Similar to Build Fast SPAs with Mithril's Lightweight MVC Framework

Developing Real-Time Systems on Application Processors
Developing Real-Time Systems on Application ProcessorsDeveloping Real-Time Systems on Application Processors
Developing Real-Time Systems on Application ProcessorsToradex
 
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...MongoDB World 2019: Building Flexible and Secure Customer Applications with M...
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...MongoDB
 
Why should you Choose CodeIgniter Framework for your Next project
Why should you Choose CodeIgniter Framework for your Next projectWhy should you Choose CodeIgniter Framework for your Next project
Why should you Choose CodeIgniter Framework for your Next projectMarie Weaver
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to MicroservicesKyle Brown
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notesWE-IT TUTORIALS
 
Get Codeigniter Developement Services From Us
 Get Codeigniter Developement Services From Us Get Codeigniter Developement Services From Us
Get Codeigniter Developement Services From UsJoe_Mason
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
Foundry Management System Desktop Application
Foundry Management System Desktop Application Foundry Management System Desktop Application
Foundry Management System Desktop Application Dharmendra Sid
 
XBOM Enterprise one page
XBOM Enterprise one pageXBOM Enterprise one page
XBOM Enterprise one pagePrasaga
 
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...ghodgkinson
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdf
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdfCLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdf
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdfssuserbe139c
 

Similar to Build Fast SPAs with Mithril's Lightweight MVC Framework (20)

Developing Real-Time Systems on Application Processors
Developing Real-Time Systems on Application ProcessorsDeveloping Real-Time Systems on Application Processors
Developing Real-Time Systems on Application Processors
 
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...MongoDB World 2019: Building Flexible and Secure Customer Applications with M...
MongoDB World 2019: Building Flexible and Secure Customer Applications with M...
 
Why should you Choose CodeIgniter Framework for your Next project
Why should you Choose CodeIgniter Framework for your Next projectWhy should you Choose CodeIgniter Framework for your Next project
Why should you Choose CodeIgniter Framework for your Next project
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
 
Benefits and Features of CodeIgniter.pdf
Benefits and Features of CodeIgniter.pdfBenefits and Features of CodeIgniter.pdf
Benefits and Features of CodeIgniter.pdf
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
 
Get Codeigniter Developement Services From Us
 Get Codeigniter Developement Services From Us Get Codeigniter Developement Services From Us
Get Codeigniter Developement Services From Us
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
Foundry Management System Desktop Application
Foundry Management System Desktop Application Foundry Management System Desktop Application
Foundry Management System Desktop Application
 
XBOM Enterprise one page
XBOM Enterprise one pageXBOM Enterprise one page
XBOM Enterprise one page
 
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
 
Kushal
KushalKushal
Kushal
 
Documentation
DocumentationDocumentation
Documentation
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
.net Framework
.net Framework.net Framework
.net Framework
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdf
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdfCLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdf
CLR_via_CSharp_(Jeffrey_Richter_4th_Edition).pdf
 
Seminar.pptx
Seminar.pptxSeminar.pptx
Seminar.pptx
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Build Fast SPAs with Mithril's Lightweight MVC Framework

  • 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.
  • 3. Leo Horie ,Software Engineer, author of Mithril.js
  • 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