VoliJS / NestedTypes

BackboneJS compatibility layer for Type-R data framework.
https://volicon.github.io/Type-R/
MIT License
94 stars 17 forks source link

Add ViewModel #74

Closed gaperton closed 9 years ago

gaperton commented 9 years ago

ViewModel is a hybrid between Model and View. Specifically, it's NestedTypes Model, extended with View functionality.

With this approach, subviews become regular attribute types, managing View state becomes much clearer, subview definitions become declarative, and more. So, almost every problem we experiencing with views now will be relaxed. For example, In order to display collections of views, it will be enough to use View.Collection on any View type as common in NestedTypes.

Isn't it nice?

The question what to do to make them compatible with Chaplin Views must be investigated. So far, looks like we need to add 'dispose' method, and that's it.

This is the first step to phase out Chaplin in Volicon projects, which is proven to be the worst framework ever.

gaperton commented 9 years ago

Not needed, since we have chosen alternative path with react views