5 ms·
Interesting post. I've spent the last few years on an piece of software where the model and controller must be reusable between desktop, phone and tablet. I s
by Spearchucker 14y ago
Interesting post.
I've spent the last few years on an piece of software where the model and controller must be reusable between desktop, phone and tablet.
I started with a layered approach. Then I moved to MVC. After that I discovered MVVM. I finally ended up with an MVVM/Naked Objects hybrid.
The result is views that make changes to the model via command bindings, and respond to changes in the model via event bindings. The application (aka controller) is similarly bound to the model, and contains all business logic. It's clean, easy to maintain, and easy to test against and debug.
The views are different for each platform (desktop, phone and tablet), the model and application are re-used as-is.
I guess my point is that none of these approaches (MVC/MVVM/MVP/etc.) are bad. Each is good within a pretty small scenario window. The trick, probably learnt through experience, is knowning when to use which.