Sometimes it is acceptable to destroy the objects explicitly using method destroy.
Data binding
Objects and DOM-elements should never be recreated without a strong reason. Instead, they must be updated using
data binding.
Data binding of single values is performed with Property class and its bindings.
Data binding in collections
Data and components are structured based on three collection types: List, Map and Set. Read common theory of
algorithms and data structures to learn pros and cons of each collection type.
Each collection triggers events about its modification.
You don't need to listen all collection events manually. Instead, you should use standard collection bindings.
The bindings provide a simple way to connect collections to each other.
Collections are closed inside binding methods. In other words, any modification of one collection triggers
at most one modification of another collection, which is connected to the first one using standard binding.
Almost any user action can be handled by a single manual collection modification in model. All other collections
(including component collections in the view) must be synchronized automatically via bindings.
For proper and fast application running, it is enough to configure all bindings only once, similarly to
indexes and foreign keys configuration in data bases.