Has anyone used MVVM?
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
Nobody uses the MVVM acronym any more, it is soooo last year. To be considered really 'with it' in computing circles you should refer to it as 'The Tommy Cooper Design Pattern'!
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
-
Nobody uses the MVVM acronym any more, it is soooo last year. To be considered really 'with it' in computing circles you should refer to it as 'The Tommy Cooper Design Pattern'!
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
How does your code work? Just like that.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
How does your code work? Just like that.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Pete O'Hanlon wrote:
How does your code work? Just like that.
:) :) Sometimes. Although sometimes it's just like that. Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Chau-Chou. But I think it's Colin.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
-
Pete O'Hanlon wrote:
How does your code work? Just like that.
:) :) Sometimes. Although sometimes it's just like that. Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Chau-Chou. But I think it's Colin.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
Two fat blokes in a pub, one says to the other "Your round." The other one says "So are you, you fat slob"
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Two fat blokes in a pub, one says to the other "Your round." The other one says "So are you, you fat slob"
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
A guy walks into a pub with a lump of asphalt on his shoulder. He says to the barman give us a pint and one for the road.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
-
Paul Conrad wrote:
trying to re-line up all the ducks in life
Sounds promising. Everything OK with you?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Pete O'Hanlon wrote:
Sounds promising.
Yes, more promising that the past few months have been business-wise.
Pete O'Hanlon wrote:
Everything OK with you?
Depends on what aspects of life :laugh:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
A guy walks into a pub with a lump of asphalt on his shoulder. He says to the barman give us a pint and one for the road.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
I fancied a game of darts with my mate. He said, 'Nearest the bull goes first' He went 'Baah' and I went 'Moo' He said 'You're closest'
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
I fancied a game of darts with my mate. He said, 'Nearest the bull goes first' He went 'Baah' and I went 'Moo' He said 'You're closest'
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Cos it's strange, isn't it. You stand in the middle of a library and go 'aaaaagghhhh' and everyone just stares at you. But you do the same thing on an aeroplane, and everyone joins in.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
We are just getting into it as we want to use Silverlight as our presentation layer. Having spent some time looking at various frameworks we settled on the GalaSoft MVVMLite for it's minimalist approach. So far we are just seeing the pain as we are not experienced enough to get the real benefits. Once we have our code generator set up we expect to productivity to improve and we can start exploring past the CRUD requirements.
Never underestimate the power of human stupidity RAH
-
In all but the simplest of designs it creates more trouble than it is worth. Which is odd considering your question. Most places that require it's use are not using it for what it is designed for. MVVM works great with WPF primarily because it lets you abstract the programmer from the designer. However, every place that uses it relies on the programmer to do the UI as well as the rest, negating it as a valid tool. Data binding, as the auto magic amalgamation that it is, causing more problems than it is worth. Btw, before you argue: Write a WPF app using MVVM that displays the data in a tree, allows drag and drop between trees and allows each tree to contain multiple sources and types of data. The point is not that it can be done but why bother when other tools are better suited to the job. Furthermore, and this is the really important thing to consider when using MVC (different I know), almost anything can be MVC and just like with MVVM you will spend half of your time arguing with people who think what you have done isn't MVC or MVVM because it doesn't match the sample from Microsoft that is so naively simple as to be worthless.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
Ennis Ray Lynch, Jr. wrote:
In all but the simplest of designs it creates more trouble than it is worth.
Oh shit, we are just getting into it and this is not something I really needed to hear. However you point about the missing designer is perfectly valid. I have happily designated one of our junior devs to become the designer bacause the company REALLY does like shiny.
Ennis Ray Lynch, Jr. wrote:
The point is not that it can be done but why bother when other tools are better suited to the job
What other tools?
Never underestimate the power of human stupidity RAH
-
In all but the simplest of designs it creates more trouble than it is worth. Which is odd considering your question. Most places that require it's use are not using it for what it is designed for. MVVM works great with WPF primarily because it lets you abstract the programmer from the designer. However, every place that uses it relies on the programmer to do the UI as well as the rest, negating it as a valid tool. Data binding, as the auto magic amalgamation that it is, causing more problems than it is worth. Btw, before you argue: Write a WPF app using MVVM that displays the data in a tree, allows drag and drop between trees and allows each tree to contain multiple sources and types of data. The point is not that it can be done but why bother when other tools are better suited to the job. Furthermore, and this is the really important thing to consider when using MVC (different I know), almost anything can be MVC and just like with MVVM you will spend half of your time arguing with people who think what you have done isn't MVC or MVVM because it doesn't match the sample from Microsoft that is so naively simple as to be worthless.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
Ennis Ray Lynch, Jr. wrote:
However, every place that uses it relies on the programmer to do the UI as well as the rest, negating it as a valid tool.
While true, there are advantages in making the GUI separate from the Gui Logic a la MVVM even when the same person is coding both. As soon as you release your first iteration, the customer will decide they don't quite like the way the screen works - can't we have that as a drop-down not a checkbox, and that could be a load of radio buttons instead of a drop-down etc. etc. In your example with the trees - if you design it well using MVVM then I don't see a problem - implementing a GUI with tree views which handle moving objects from one tree to the other doesn't sound like too much of a challenge to me (I'm a novice WPF developer and only tinkering with MVVM so there may be something I'm missing!) - but what happens when the users tell you that it's too complex - they don't like drag and drop, and the tree view isn't what they really wanted after all? You're now into significant redevelopment. With MVVm (if properly implemented) you change your GUI to use something else (a list box or two with a combo to select the parent node, and a couple of 'arrow buttons' to move selected nodes from one to the other) and everything works. Ok not quite that simple - but you get the idea? With MVVM you are more likely to be able to just go change the gui without having to change back-end code - safe in the knowledge that the GUI just needs to implement the functionality provided by the VM. personally I think you need something like MVVM-C - i.e. you need a controller in addition to the model view and viewmodel in order to provide client-side functionality to the ViewModels
___________________________________________ .\\axxx (That's an 'M')
-
We are just getting into it as we want to use Silverlight as our presentation layer. Having spent some time looking at various frameworks we settled on the GalaSoft MVVMLite for it's minimalist approach. So far we are just seeing the pain as we are not experienced enough to get the real benefits. Once we have our code generator set up we expect to productivity to improve and we can start exploring past the CRUD requirements.
Never underestimate the power of human stupidity RAH
-
Out of interest, why use a framework? It seems to me that MVVM is reasonably simple to just implement with a couple of base classes?
___________________________________________ .\\axxx (That's an 'M')
I could not make up my mind on the design standards I wanted to implement and most of the articles I read seemed overly complex and MVVM Lite is pretty minimalist so I figured it will have the least constraints/refactor costs if it all goes pear shaped.
Never underestimate the power of human stupidity RAH
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
MVVM + Ninject is pure bliss for WPF and SL projects. :) MVVM is overkill if you're writing a test project. Otherwise, it's a good pattern to maintain separation of concerns, helping you reason about about your program.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango -
In all but the simplest of designs it creates more trouble than it is worth. Which is odd considering your question. Most places that require it's use are not using it for what it is designed for. MVVM works great with WPF primarily because it lets you abstract the programmer from the designer. However, every place that uses it relies on the programmer to do the UI as well as the rest, negating it as a valid tool. Data binding, as the auto magic amalgamation that it is, causing more problems than it is worth. Btw, before you argue: Write a WPF app using MVVM that displays the data in a tree, allows drag and drop between trees and allows each tree to contain multiple sources and types of data. The point is not that it can be done but why bother when other tools are better suited to the job. Furthermore, and this is the really important thing to consider when using MVC (different I know), almost anything can be MVC and just like with MVVM you will spend half of your time arguing with people who think what you have done isn't MVC or MVVM because it doesn't match the sample from Microsoft that is so naively simple as to be worthless.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
-
Nobody uses the MVVM acronym any more, it is soooo last year. To be considered really 'with it' in computing circles you should refer to it as 'The Tommy Cooper Design Pattern'!
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'
I've used MMIX, but that was last year too!
-
Glosse wrote:
Or does it grossly complicate what otherwise would be a simple program?
Almost every design pattern does that. :-\ But then.....MVVM does have its advantages and is useful when you want to decouple your data placeholders from the view.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick - Silverlight *.XCP files
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
Have been using MVVM for production for a few months now and I love it! There are some little quirks that you run up against when you start out though that would normally be handled in code behind, like double-clicks and dragging, but there are some creative solutions to those if you search online. We do actually have a designer though (not a coder doing design, but an actual designer), so I think we see more benefit than those without. All said and done, the WPF binding system is a magical beast that is fun to abuse. As for adding complexity, the answer is yes and no. In my mind, it is only initially adding complexity as we go through a learning curve. We are starting to just roll past those initial issues though and it is deffinately making life easier.
"It's like the sixties, but with less hope."
-
Glosse wrote:
Do you find it useful?
I used this with WPF when writin a customer relationship management system for bank, it was a very good fit.
Glosse wrote:
Or does it grossly complicate what otherwise would be a simple program?
It worked out well in my experience, but it does need a proper object model (and a lot of systems are really just glorified database front-ends - though I avoid writing systems this way) and you do need to separate the concerns out properly . The MVVM sent testability through the roof , as the view is isolated, and you can run unit tests against the viewmodel and model (at least in WPF you can). I don't know how well it would apply to winforms or webforms though I've seen articles around and it looked pretty clean, so YMMV. Pete o'Hanlon (a regular here) has a framework he was working on, he might have a better insight than me. [edit:- he replied while I typed this!]
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.YMVVMMV?
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
I just stumble upon this blog post about MVVM, you may find it useful: http://davybrion.com/blog/2010/07/the-mvvm-pattern-is-highly-overrated/[^]