|
4 | 4 |
|
5 | 5 | Universal state container for modern JS applications written with TypeScript for both UI and domain state management. |
6 | 6 |
|
| 7 | +API docs are here: https://volicon.github.io/Type-R/ |
| 8 | + |
7 | 9 | Distributed application state is defined as supersposition of the recursively nested `Record` and `Collection` objects. |
8 | | -State trees supports transactional and deeply observable changes, and is JSON-serializable by default. All state elements are _typed_ with run-time type assertions and type conversions on assignment. The declarative state validation is supported out of box as well. |
| 10 | +State trees supports transactional and deeply observable changes, and are JSON-serializable by default. All state elements are _typed_ with run-time type assertions and type conversions on assignment. The declarative state validation is supported out of box as well. |
9 | 11 |
|
10 | 12 | Type-R explicitly supports both _aggregation_ and _associations by id_ with the majority of operations performed recursively on _ownership trees_. |
11 | 13 |
|
12 | | -Mostly compatible by API with backbonejs, but 10 times faster in all browsers. |
| 14 | +10 times faster than BackboneJS in all browsers. |
13 | 15 |
|
14 | 16 | Type-R represents the pinnacle of Volicon/Verizon R&D in the state management technology lasted for 3 previous years. |
15 | 17 |
|
16 | 18 | ## Rationale |
17 | 19 |
|
18 | | -Because we can. |
| 20 | +All existing solutions for SPA state management are weird. We cannot wait when there will be the perfect one. |
19 | 21 |
|
20 | 22 | ## Current state |
21 | 23 |
|
22 | | -Tested and deployed to Volicon/Verizon production systems. Documentation is pending. |
23 | | - |
24 | | -## Compatibility notes |
25 | | - |
26 | | -It highly unlikely that you even aware about the most of these Backbone API features, but still: |
27 | | - |
28 | | -- `object.trigger( 'a b' )` is not supported. Use `object.trigger( 'a' ).trigger( 'b' )`. Performance reasons. Not to mention, that when you doing so, you are most likely doing something wrong. |
29 | | -- `model.initialize( attrs, options, owner )` uses third parameter to set owner, `options.collection` is ignored. |
30 | | -- default model cid prefix is `m`. |
31 | | -- model.set `unset` option is deprecated. In Type-R, model is not a hash, it's a record with pre-defined members. So, you cannot really delete the model attribute. Just assign it with `void 0` instead. |
32 | | -- model `change:attr` events are not bubbled up by collection by default. Manual `itemEvents` spec is required. Performance reasons. |
33 | | -- Collection doesn't have `_addReference` and `_removeReference` callbacks. Impossible to implement efficiently. Use 'add' and 'remove' events instead. |
34 | | -- Collection.set `add` option is not supported. Period. But `remove` option works. |
35 | | -- Collection doesn't set options.at options when firing `add` event. No way, dude. It's even not documented in official backbone API. |
36 | | -- Collection.subsetOf: |
37 | | - - `.justOne( x )` method is deprecated. Use `.set([ x ])` instead. |
38 | | - - `.removeAll()` method is deprecated. Use `.reset()` instead. |
39 | | -- experimental NestedTypes features not supported: |
40 | | - - has.proxy - too complex and was never needed. |
41 | | -- Types of models and collection default valus are now inferred to shared types. |
42 | | -- Symbolic references - `store.x` syntax is deprecated, use `~x` instead. |
43 | | -- `Integer` -> `Number.integer` |
44 | | -- `Date` attribute doesn't parse MS format. Use `Date.microsoft`. |
45 | | -- Object.extend.attach( Something ) => Nested.Messenger.mixTo( Something ). |
| 24 | +Public beta. |
0 commit comments