Skip to content

Commit 0be546b

Browse files
author
Vlad Balin
committed
Updated docs
1 parent 5b6ec65 commit 0be546b

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

docs/index.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,22 +149,22 @@ <h2 id="installation-and-requirements">Installation and requirements</h2>
149149
<aside class="warning">IE9 and Opera may work but has not been tested. IE8 won't work.</aside>
150150

151151
<h2 id="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 <a href="https://guides.emberjs.com/v2.2.0/models/">Ember Data</a>, <a href="http://backbonejs.org/#Model">BackboneJS models and collections</a>, and <a href="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 <a href="https://guides.emberjs.com/v2.2.0/models/">Ember Data</a>, <a href="http://backbonejs.org/#Model">BackboneJS models and collections</a>, and <a href="https://github.com/mobxjs/mobx">mobx</a>.</p>
154+
<p>There are both similarities and differences:</p>
155155
<ul>
156-
<li>All that things can be used to manage an application&#39;s state.</li>
157-
<li>Type-R handles observable transactional changes in the way more or less similar to mobx (however, it&#39;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 <a href="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 <a href="#update">collection updates</a> and the <a href="#built-in-events">similar event model</a> for the changes (however, it&#39;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&#39;s Models/Collections, but Record is <em>not an object hash</em> but class and it&#39;s updates are ~10 times faster.</li>
158+
<li>Data validation is comparable to one in Ember Data, but it&#39;s lazily evaluated and cached.</li>
159+
<li>id-relationship resembles one in <a href="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>
160162
</ul>
161163
<p>Speaking of the distinguishing differences,</p>
162164
<ul>
163-
<li>Type-R&#39;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&#39;s records are protected from improper assignment with run-time type assertions and conversions.</li>
164167
<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 <a href="#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&#39;s capable of handling collections of 10K elements with real-time response and is about 10 times faster than BackboneJS.</li>
168168
</ul>
169169
<table>
170170
<thead>
@@ -202,7 +202,7 @@ <h2 id="how-the-type-r-compares-with-x-">How the Type-R compares with X?</h2>
202202
<td>Dynamic Type Safety</td>
203203
<td></td>
204204
<td>-</td>
205-
<td>For serialization only</td>
205+
<td>for serialization only</td>
206206
<td>-</td>
207207
</tr>
208208
<tr>
@@ -219,6 +219,13 @@ <h2 id="how-the-type-r-compares-with-x-">How the Type-R compares with X?</h2>
219219
<td></td>
220220
<td>- </td>
221221
</tr>
222+
<tr>
223+
<td>Generalized I/O</td>
224+
<td></td>
225+
<td>sync function</td>
226+
<td></td>
227+
<td>- </td>
228+
</tr>
222229
</tbody>
223230
</table>
224231

docs/index.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,30 +95,31 @@ Is packed as UMD and ES6 module. No peer dependencies are required.
9595

9696
## How the Type-R compares with X?
9797

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.
9999

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).
101101

102-
There are a lot of similarities:
102+
There are both similarities and differences:
103103

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.
108110

109111
Speaking of the distinguishing differences,
110112

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.
112115
- 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.
116116

117117
Feature | Type-R | Backbone Models | Ember Data | mobx
118118
-|-|-|-|-
119119
Observable changes in object graph | ✓ | - | - | ✓
120120
JSON Serialization | ✓ | ✓ | ✓ | -
121121
Validation | ✓ | ✓ | ✓ | -
122-
Dynamic Type Safety | ✓ | - | For serialization only | -
122+
Dynamic Type Safety | ✓ | - | for serialization only | -
123123
Aggregation | ✓ | - | - | -
124124
Relations by id | ✓ | - | ✓ | -
125+
Generalized I/O | ✓ | sync function | ✓ | -

0 commit comments

Comments
 (0)