|
And what would you have named MVVM?
|
|
|
|
|
Perhaps VVVVVV instead[^]
.-.
|o,o|
,| _\=/_ .-""-.
||/_/_\_\ /[] _ _\
|_/|(_)|\\ _|_o_LII|_
\._. |\_/|"` |_| ==== |_|
|_|_| ||" || ||
|-|-| ||LI o ||
|_|_| ||'----'||
/_/ \_\ /__| |__\
|
|
|
|
|
I actually did come up with an alternate name for it, and blogged about it on posterous, but posterous has gone the way of the cuckoo bird, and I don't recall just what I came up with. I liked it way better than MVVM, though, I remember that.
|
|
|
|
|
Good question.
The M for model is fine - although requirements for WPF binding may mean legacy models need an adapter layer for notification events.
The V for view is fine - although the idea that the view could be replaced entirely with text to speech and speech to text (or DTMF) means we could look for something more generic. (Presentation, Manifestation?)
The VM seems convoluted to me. It's reusing the word Model with a different meaning. To my mind, Controller (or Manager) is a good word, but that's already used. It also implies a superior role between the V and VM, and one of the key principles is the disassociation between them.
Thinking it through, perhaps it should be:
DMVVM - Data Model, View, View Model or
MMM - Model, Manifestation, Manager.
|
|
|
|
|
Ah, it looks like you're falling into the common mistake of viewing MVVM as a Presentation Pattern. It's not, it's an Architectural Pattern, so the Model isn't necessarily a data model - it's actually the services (including data models) that is needed to be presented to the View via the ViewModel.
|
|
|
|
|
Fair point.
I've spent some time trying to convince myself that services can simply be perceived as data.
In some cases, it can - a web service that gives the current fx rate for two currencies. Equivalent to a data table containing the same.
The case where I decided services are different is 'Request this Credit Card Payment' . Could still be a web service, but it doesn't make sense to see it as a CRUD data operation.
But couldn't the same point be made against MVC, MVP, MV*? Where would services fit in those 'models'?.
|
|
|
|
|
NeverJustHere wrote: But couldn't the same point be made against MVC, MVP, MV*? Indeed it could.
|
|
|
|
|
MVC. The view model in MVVM is doing exactly the same job as a controller in a traditional MVC scenario, or controllers in ASP.net MVC for that matter.
|
|
|
|
|
Err, no it's not. MVC and MVVM are separate entities - in spirit, MVVM is closest to the MVSC pattern than to MVC. I posed my question to see who was aware of the architectural heritage that led up to MVVM (this was a term independently coined by John Gossman at roughly the same time as the GOF retired MVP and split it into MVPP and MVSC).
|
|
|
|
|
I agree about MVVM; I almost added, "and MVVM is even worse, but don't even get me started on that!"
|
|
|
|
|
Well, considering that MVC (as a concept) predates the "Droidians of 4" by a hell of a long time, I'd tend to go more with the original idea. MVC actually goes back to the 1970s and was introduced to work with prototype GUIs at PARC.
|
|
|
|
|
B. Clay Shannon wrote: Why isn't MVC called MSC instead? Because when MVC was introduced into Smalltalk-76, Larry Page (who co-founded Google, who created Android, that has several non-visual modes of conveying information to the user) was only 3.
/ravi
|
|
|
|
|
Larry's older brother Jimmy should have slapped those smallish talkers.
|
|
|
|
|
Rumor has it he threatened to, but was accused of being "(Sm)all talk, no action".
/ravi
|
|
|
|
|
The "View" represents the presentation, whether it's a display, a speaker, microphone, or some touch interface (which most likely would have an associated display component).
Anyway you perceive it, you're "viewing" it.
And, when the term was first invented, display was all you had.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
"Anyway you perceive it, you're "viewing" it."
I refer you back to Abraham Lincoln and the doglegs.
|
|
|
|
|
view [vyoo]
noun
1. an instance of seeing or beholding; visual inspection.
2. sight; vision.
(And I posted to the wrong response. Oh well. Sorry.)
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
If anyone using or investigating MVC really gets confused over the use of View for the user interface then they probably shouldn't be.
A view includes user input via mouse, keyboard, touchScreen or telepathy - but does anyone not using it really not understand?
People still say they are going to "tape a show on TV" - and are well understood.
or "pull the chain" on the toilet.
or dial a phone number to make it ring
|
|
|
|
|
I'm no spring chicken (and I lived on a rural ranch when I was young, where we used outhouses and a separate cold-water shower building), and I've never heard "pull the chain on the toilet"
|
|
|
|
|
Probs an English thing. From the days when the cistern was high above the pan, and a chain hung from the flushing handle
|
|
|
|
|
_Maxxx_ wrote: Probs an English thing. From the days when the cistern was high above the pan, and a chain hung from the flushing handle
No we had it in the colonies when I was young also.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
B. Clay Shannon wrote: we used outhouses ... and I've never heard "pull the chain on the toilet"
That is because outhouses don't have flush toilets.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
I was saying that I'd been around the block a few times and lived in simpler times and in the rurals, not that outhouses == flush toilets.
|
|
|
|
|
Toilet with elevated cistern and pull chain[^]
Actually, I grew up in New York City and as a boy I remember seeing these toilets in old restaurants in the 1950's so it had nothing to do with rural or urban, these are what toilets were like before the more modern versions we are used to seeing these days.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
It's 'view' because in 99% of cases, the user presentation is visual. I'm not even sure I agree with the definition as quoted, audio would typically not be sent to 'the view' but to a separate presentation layer class.
|
|
|
|