Example Proposal

15 views
Skip to first unread message

David Trallero

unread,
Dec 10, 2011, 7:18:45 AM12/10/11
to mdv-d...@googlegroups.com
I would like to propose an example and see how it would be implemented using the MDV.
At least in my case it would help me to understand how really works. The example is as follows:

- We have a Model M
- A view of Model M has 2 states: empty and populated.
- We have several views of the same model M. If a view changes the state, the rest of the views 
must be updated accordingly.
- A view must be able of changing the model (just to another instance)

In more detail:

The model has a variable that can decide the type of transport: bus, car, walking.
The view shows 3 icons/text/buttons/whatever when it is in empty state (bus, car, walking). 
Clicking on 1 icon, hides the other 2 and show an x (to delete the current option and 
become empty again), and change the state to "populated". The model is updated, and the 
views of the model are updated too.

Lets create 3 models with 2 views each. Lets offer the possibility (a radio button or
whatever) of making a view to change to another model.

It is easy to have a loop of notifications here. That is the interesting part of the exercise.


Let me know what you think about.
  David
Reply all
Reply to author
Forward
0 new messages