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
Copy file name to clipboardExpand all lines: docs/index.html
+19-12Lines changed: 19 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -149,22 +149,22 @@ <h2 id="installation-and-requirements">Installation and requirements</h2>
149
149
<asideclass="warning">IE9 and Opera may work but has not been tested. IE8 won't work.</aside>
150
150
151
151
<h2id="how-the-type-r-compares-with-x-">How the Type-R compares with X?</h2>
152
-
<p>Type-R started to develop in 2014 as the modern substitution for BackboneJS, which would retain the spirit of the BackboneJS simplicity but would be superior to Ember Data in its capabilities and an order of magnitude faster than Backbone.</p>
153
-
<p>The closest things to the Type-R are <ahref="https://guides.emberjs.com/v2.2.0/models/">Ember Data</a>, <ahref="http://backbonejs.org/#Model">BackboneJS models and collections</a>, and <ahref="https://github.com/mobxjs/mobx">mobx</a>.</p>
154
-
<p>There are a lot of similarities:</p>
152
+
<p>Type-R started to develop in 2014 as the modern substitution for BackboneJS, which would retain the spirit of the BackboneJS simplicity but would be an order of magnitude faster and superior to Ember Data in its capabilities to describe complex data.</p>
153
+
<p>The closest things to the Type-R are <ahref="https://guides.emberjs.com/v2.2.0/models/">Ember Data</a>, <ahref="http://backbonejs.org/#Model">BackboneJS models and collections</a>, and <ahref="https://github.com/mobxjs/mobx">mobx</a>.</p>
154
+
<p>There are both similarities and differences:</p>
155
155
<ul>
156
-
<li>All that things can be used to manage an application's state.</li>
157
-
<li>Type-R handles observable transactional changes in the way more or less similar to mobx (however, it's heavily optimized for the case of large aggregated object trees).</li>
158
-
<li>Type-R id-relationships and validation capabilities are comparable to ones in <ahref="https://guides.emberjs.com/v2.2.0/models/relationships/">Ember Data</a>, which was used a source of inspiration.</li>
159
-
<li>Type-R has a lot of common in some API parts with BackboneJS models and collections. For instance, it uses the close API for the <ahref="#update">collection updates</a> and the <ahref="#built-in-events">similar event model</a> for the changes (however, it's generalized for the case of transactions on the nested records and collections).</li>
156
+
<li>In contrast to mobx, Type-R detects <em>deeply nested changes</em>.</li>
157
+
<li>Records and Collections resembles Backbone's Models/Collections, but Record is <em>not an object hash</em> but class and it's updates are ~10 times faster.</li>
158
+
<li>Data validation is comparable to one in Ember Data, but it's lazily evaluated and cached.</li>
159
+
<li>id-relationship resembles one in <ahref="https://guides.emberjs.com/v2.2.0/models/relationships/">Ember Data</a>, which was used a source of inspiration. But Type-R supports the first-class aggregation as well.</li>
160
+
<li>Like Ember Data, Type-R supports abstract data adapters (I/O endpoints).</li>
161
+
<li>Unlike Ember and Backbone, Type-R is unopinionated on the view layer and routing. Like in mobx, there are React bindings.</li>
160
162
</ul>
161
163
<p>Speaking of the distinguishing differences,</p>
162
164
<ul>
163
-
<li>Type-R's records are not key-value pairs but <em>classes</em> with typed attributes. They are protected from improper assignment with run-time type assertions and conversions. Which means that the client-server protocol is protected again errors from both ends.</li>
165
+
<li>Type-R encourages using of the <em>layered application state</em> instead of the global singleton store. In Type-R, the stores are the special kind of records which can participate in dynamically configured lookup chains. There might be as many dynamically created and disposed stores as you need, starting with no stores at all.</li>
166
+
<li>Type-R's records are protected from improper assignment with run-time type assertions and conversions.</li>
164
167
<li>Type-R distinguishes aggregation and the plain association operating with <em>aggregation trees</em> formed by nested records and collections. Aggregation tree is serialized as nested JSON. Operations like <code>clone()</code>, <code>dispose()</code>, <code>isValid()</code> and <code>toJSON()</code> are performed recursively on elements of aggregation tree gracefully handling the references to shared objects.</li>
165
-
<li>Type-R relies on <em>layered application state</em> instead of the global singleton store. In Type-R, the stores are the special kind of records which can participate in dynamically configured lookup chains. There might be as many dynamically created and disposed stores as you need, starting with no stores at all.</li>
166
-
<li>Type-R features automatic lazily evaluated <ahref="#validation">validation</a> with declarative attribute-level rules. Validation checks are the part of the attribute type; they are evaluated in the moment they needed and never performed twice on the unchanged data. </li>
167
-
<li>Type-R is really fast. It's capable of handling collections of 10K elements with real-time response and is about 10 times faster than BackboneJS.</li>
168
168
</ul>
169
169
<table>
170
170
<thead>
@@ -202,7 +202,7 @@ <h2 id="how-the-type-r-compares-with-x-">How the Type-R compares with X?</h2>
202
202
<td>Dynamic Type Safety</td>
203
203
<td>✓</td>
204
204
<td>-</td>
205
-
<td>For serialization only</td>
205
+
<td>for serialization only</td>
206
206
<td>-</td>
207
207
</tr>
208
208
<tr>
@@ -219,6 +219,13 @@ <h2 id="how-the-type-r-compares-with-x-">How the Type-R compares with X?</h2>
Copy file name to clipboardExpand all lines: docs/index.md
+13-12Lines changed: 13 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -95,30 +95,31 @@ Is packed as UMD and ES6 module. No peer dependencies are required.
95
95
96
96
## How the Type-R compares with X?
97
97
98
-
Type-R started to develop in 2014 as the modern substitution for BackboneJS, which would retain the spirit of the BackboneJS simplicity but would be superior to Ember Data in its capabilities and an order of magnitude faster than Backbone.
98
+
Type-R started to develop in 2014 as the modern substitution for BackboneJS, which would retain the spirit of the BackboneJS simplicity but would be an order of magnitude faster and superior to Ember Data in its capabilities to describe complex data.
99
99
100
-
The closest things to the Type-R are [Ember Data](https://guides.emberjs.com/v2.2.0/models/), [BackboneJS models and collections](http://backbonejs.org/#Model), and [mobx](https://github.com/mobxjs/mobx).
100
+
The closest things to the Type-R are [Ember Data](https://guides.emberjs.com/v2.2.0/models/), [BackboneJS models and collections](http://backbonejs.org/#Model), and [mobx](https://github.com/mobxjs/mobx).
101
101
102
-
There are a lot of similarities:
102
+
There are both similarities and differences:
103
103
104
-
- All that things can be used to manage an application's state.
105
-
- Type-R handles observable transactional changes in the way more or less similar to mobx (however, it's heavily optimized for the case of large aggregated object trees).
106
-
- Type-R id-relationships and validation capabilities are comparable to ones in [Ember Data](https://guides.emberjs.com/v2.2.0/models/relationships/), which was used a source of inspiration.
107
-
- Type-R has a lot of common in some API parts with BackboneJS models and collections. For instance, it uses the close API for the [collection updates](#update) and the [similar event model](#built-in-events) for the changes (however, it's generalized for the case of transactions on the nested records and collections).
104
+
- In contrast to mobx, Type-R detects _deeply nested changes_.
105
+
- Records and Collections resembles Backbone's Models/Collections, but Record is _not an object hash_ but class and it's updates are ~10 times faster.
106
+
- Data validation is comparable to one in Ember Data, but it's lazily evaluated and cached.
107
+
- id-relationship resembles one in [Ember Data](https://guides.emberjs.com/v2.2.0/models/relationships/), which was used a source of inspiration. But Type-R supports the first-class aggregation as well.
108
+
- Like Ember Data, Type-R supports abstract data adapters (I/O endpoints).
109
+
- Unlike Ember and Backbone, Type-R is unopinionated on the view layer and routing. Like in mobx, there are React bindings.
108
110
109
111
Speaking of the distinguishing differences,
110
112
111
-
- Type-R's records are not key-value pairs but _classes_ with typed attributes. They are protected from improper assignment with run-time type assertions and conversions. Which means that the client-server protocol is protected again errors from both ends.
113
+
- Type-R encourages using of the _layered application state_ instead of the global singleton store. In Type-R, the stores are the special kind of records which can participate in dynamically configured lookup chains. There might be as many dynamically created and disposed stores as you need, starting with no stores at all.
114
+
- Type-R's records are protected from improper assignment with run-time type assertions and conversions.
112
115
- Type-R distinguishes aggregation and the plain association operating with _aggregation trees_ formed by nested records and collections. Aggregation tree is serialized as nested JSON. Operations like `clone()`, `dispose()`, `isValid()` and `toJSON()` are performed recursively on elements of aggregation tree gracefully handling the references to shared objects.
113
-
- Type-R relies on _layered application state_ instead of the global singleton store. In Type-R, the stores are the special kind of records which can participate in dynamically configured lookup chains. There might be as many dynamically created and disposed stores as you need, starting with no stores at all.
114
-
- Type-R features automatic lazily evaluated [validation](#validation) with declarative attribute-level rules. Validation checks are the part of the attribute type; they are evaluated in the moment they needed and never performed twice on the unchanged data.
115
-
- Type-R is really fast. It's capable of handling collections of 10K elements with real-time response and is about 10 times faster than BackboneJS.
116
116
117
117
Feature | Type-R | Backbone Models | Ember Data | mobx
0 commit comments