You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,37 +17,36 @@ putting everything in a single LOC. :) It's something more interesting.
17
17
18
18
### JSX is twice smaller than usual
19
19
20
-
So, why?
20
+
So, how could that be? Because, we're doing something significantly different from commonly known React technique:
21
21
22
22
1. We're using [smart React Links](https://github.com/Volicon/NestedReact#two-way-data-binding) for [two-way data binding](/docs/databinding.md).
23
-
2. Due to (1), we can describe the most of UI with [components defined as stateless functions](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions)
23
+
2. Due to (1), we are able to describe the most of UI with fast and lightweight [components defined as stateless functions](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions), introduced in React 0.14.
24
24
25
-
These two techniques in combination will save you half of the work in JSX, and make it much cleaner.
26
-
Remember - the best code is the code you avoided to write. :) You might wonder how it looks like.
25
+
These two techniques in combination will save you half of the work in JSX, and make it look much cleaner.
26
+
Remember - the best code is the code you avoided to write. :)
27
+
28
+
Since our links are framework-neutral and available as [separate dependency-free package](https://github.com/Volicon/valuelink),
29
+
any React system can benefit from this style. You might wonder how it looks like.
27
30
Typically, like this:
28
31
29
32

30
33
31
-
Since our links are framework neutral and available as [separate dependency-free package](https://github.com/Volicon/valuelink),
32
-
any React system can benefit from this style.
33
-
34
34
### JS (data layer) is 2-3 times smaller
35
35
36
-
Our data layer size is several times smaller than
37
-
in other React examples following facebook's suggestions for "good architecture".
38
-
Still, we have same "unidirectional data flow", and ["pure render"](https://github.com/Volicon/NestedReact#props-specs-and-pure-render-optimization)
39
-
optimization. For free.
36
+
The reason it's shorter is that it's _not_ flux, _not_ something strange and immutable, but [_classical mutable models_](https://github.com/Volicon/NestedTypes). Thus, it takes the same size as in Backbone, Angular, Ember, etc.
40
37
41
-
And the more complex application will become, the more noticeable this difference in size will be.
38
+
But it's not _that_ naive and simple mutable models you dealt with before. They kinda smart enough to _give you features you could expect from flux_:
42
39
43
-
Reason is that our data layer is mostly defined with declarative spec.
44
-
All you have to do, is to describe the structure of your data,
45
-
and use our smart Links to [bind it to UI](/docs/databinding.md).
46
-
It will work most of the time, [no matter, how complex your data are](https://github.com/Volicon/NestedTypes/blob/master/docs/RelationsGuide.md).
In TodoMVC, however, data layer is rather rudimentary to see the full power of approach, so
49
-
we're on par with other conventional OO data layers, such in react-backbone,
50
-
Angular, or Ember.
43
+
Not to mention, that they are [very fast](http://slides.com/vladbalin/performance#/). NestedReact uses [NestedTypes]([https://github.com/Volicon/NestedTypes]) model framework, which is designed to handle collections of 10-50K elements smoothly and in general is order of magnitude (10x) faster than backbone.
44
+
45
+
The more complex application will become, the more noticeable this difference in size will be.
46
+
Reason is that in NestedTypes case the data layer is mostly defined with declarative spec.
47
+
All you have to do, is to describe the structure of your data,
48
+
and use our smart Links to [bind it to UI](/docs/databinding.md).
49
+
And it will work this way 90% of the time, [no matter, how complex your data are](https://github.com/Volicon/NestedTypes/blob/master/docs/RelationsGuide.md).
0 commit comments