diff --git a/doc/comparison.md b/doc/comparison.md index 1cee3115..7235bc07 100644 --- a/doc/comparison.md +++ b/doc/comparison.md @@ -3,7 +3,7 @@ OWL, React and Vue have the same main feature: they allow developers to build declarative user interfaces. To do that, all these frameworks uses a virtual dom. However, there are still obviously many differences. -In this page, we try to highlight some of these differences. Obviously, some +In this page, we try to highlight some of these differences. Obviously, a lot of effort was done to be fair. However, if you disagree with some of the points discussed, feel free to open an issue/submit a PR to correct this text. @@ -16,6 +16,7 @@ discussed, feel free to open an issue/submit a PR to correct this text. - [Asynchronous rendering](#asynchronous-rendering) - [Reactiveness](#reactiveness) - [State Management](#state-management) +- [Hooks](#hooks) ## Size @@ -26,9 +27,14 @@ than React and Vue. Also, jQuery is not the same kind of framework, but it is in | ------------------------ | ------------------------ | | OWL | 16kb | | Vue + VueX | 30kb | +| Vue + VueX + Vue Router | 39kb | | React + ReactDOM + Redux | 40kb | | jQuery | 30kb | +Note that those comparisons are not entirely fair, because we do not compare +the same exact set of features. For example, VueX and Vue Router support more +advanced use cases. + ## Class Based Both React and Vue moved away from defining components with classes. They prefer @@ -40,6 +46,17 @@ contrast, Owl has only one mechanism: class-based components. We believe that Ow components are fast enough for all our usecases, and making it as simple as possible for developers is more valuable (for us). +Also, functions or class based components are more than just syntax. Functions +comes with a mindset of composition and class are about inheritance. Clearly, +both of these are important mechanisms for reusing code. Also, one does not +exclude the other. + +It certainly looks like the world of UI frameworks is moving toward composition, +for many very good reasons. Owl is still good at composition (for example, +Owl supports slots, which is the primary mechanism to make generic reusable +components). But it can also use inheritance (and this is very important since +templates can also be inherited with `xpaths` transformations). + ## Tooling/Build step OWL is designed to be easy to use in a standalone way. For various reasons, @@ -50,13 +67,23 @@ be used by simply adding a script tag to a page.