Ranked in these QuestionsQuestion Ranking
Pro Easy data binding
Pro Easy to learn
Has a low entry barrier and an easy learning curve. It's especially easy to learn for beginners.
Pro Built in templating
Bindings in Knockout can also be used to control the generated structure of the HTML. There are bindings provided to allow for iteration and conditionals. The structure of the html reflects the structure of the data so iterative elements are bound to arrays in the data model. Having the HTML structure maintained by bindings keeps the templating simple, easy to read, and maintain.
Knockout also allows for string based templating so you can use whatever templating library you prefer.
Pro Legacy browser support
Supports a large number of browsers, including IE6.
Pro Great documentation
The excellent tutorials with built-in exercises are a great learning experience, even for people without prior MVVM and data binding experience.
Pro Lightweight and plays nicely with other libraries
Pro Dynamic models help with keeping the code simple and clean
Models in Knockout can be watched to keep the page data up to date by using observable objects. The observables notify Knockout when data is changed and automatically updates the page when this happens. By having Knockout maintain this relation, it keeps the front end code cleaner and simpler, and by enforcing a consistent pattern with observables the methodology can be more robust.
Pro Very flexible
One can do a lot of things and it keeps self references and other types of loops under control.
Pro It's only a library
Knockout does one thing, and does it well. It doesn't try to take on more than one area. It does MVVM data binding and that is it.
Pro Simple manageable modules
Using components is a great way of breaking up large modules into simpler ones.
Pro Small, easy to learn API
Most other frameworks either offer a huge API to deal with model and view synchronization, or defer to other libraries & plugins to cater for relatively simple use cases. Mithril's API is tiny but complete. The natural reaction is to assume something is missing, but as you build you realise you incredibly fast, powerful and rich applications can be built using nothing but Mithril.
Pro Fast rendering
Mithril's loading times are very fast. This is because it's templates are compiled first and then served to the browser and because it uses a virtual DOM. The virtual DOM is a virtual tree containing all the nodes of the real DOM, every time anything changes in the virtual DOM, Mithril does not re-render the entire (real) DOM, instead it just searches and applies the differences.
Pro Small size
Weights just 8Kb gzipped and has no dependencies. A reactive stream module can be added for one extra Kb.
Pro Can be used without build systems
Pro No need to learn another syntax to write views
Most MVC frameworks use HTML templates to render their views. They are good and useful because they are easy to read and understand. But they add more complication to an app because it's practically a new language and syntax that needs to be learned.
Pro Familiar to people used to MVC
Doesn't lock you into any complicated conventions or structures, only one function is required to create either a Controller or a View. You're free to implement your architecture exactly as you want, so you can focus on the purpose of MVC, making connections between computer data and stuff in the end user's head.
Pro Great documentation
Mithril has a large and expansive documentation despite it's relatively small API. Mithril's GitHub repo has more documentation than actual source code. None of that documentation is auto-generated
Pro Allows a smooth transition from other UI frameworks
One thing you need to start using Mithril is just a DOM node. With Mithril a developer is able to introduce the library step by step.
Pro Does not force you into a predefined structure
Con Slower than others when amount of objects grows
Knockout has a bad performance when the dealing with large amount of objects. You can see more here.
Con Can become complex once the application grows large
Knockout leaves the application structure to the developer and it can become quite complex and unmanageable in the hands of a beginner once the application grows large and complex.
Con Two way binding requires a little extra work
When allowing users to edit existing data, the two-way binding of observables means you'll need to have to save original values before they're edited, to make comparisons or revert if the user cancels the action.
Con Small API can make it unsuitable for larger more complex projects
Mithril's small API and small number of functions while helpful for small projects and applications where speed is needed, can add another layer of complexity in larger more complex applications where a more extensive API is needed out of the box.