5

What are the differences between the observable, ObservableObject and Model? Thank You.

1 Answer 1

8

Model inherits from ObservableObject which inherits from Observable.

  • Observable provides support for events - the bind, unbind and trigger methods.
  • ObservableObject provides change tracking. Used by the DataSource and the MVVM framework.
  • Model provides identity (via the id field) and field definition. Used by the DataSource when schema.model is set.
5
  • So, Model and ObservableObject are one the same, while Observable is something totally different?
    – Johny Boy
    Commented Nov 27, 2013 at 15:59
  • Model is a superset of ObservableObject. Commented Nov 27, 2013 at 16:00
  • Can I define the custom callback function in Model as I do in the observable object?
    – Johny Boy
    Commented Nov 27, 2013 at 16:10
  • This is worth a new question with clarification and sample code. Commented Nov 27, 2013 at 16:16
  • Ok. Will prepare after some more research. Thank You for answers.
    – Johny Boy
    Commented Nov 27, 2013 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.