Has anyone used MVVM?
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
Yes. Yes. No. Now match the answer to the appropriate question.
"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.
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
It's nice not to have to store data in the view. Back when I was still coding VB6, I had to deal with some pretty funky code from people who really seemed to like storing data in the view. It was not pleasant.
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
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?
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. -
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
-
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.Keith Barrow wrote:
Pete o'Hanlon (a regular here) has a framework he was working on
Currently working on version 2 which is based on work I did with Marlon Grech around MEF, adding a new fluent Validation API and useful Blend behaviours and Dependency Properties.
"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.
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
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
-
Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?
Never ever use design patterns for simple/small programs. Make no sence, just hell on earth. On the other hand on a big enterprise like project you'll find that it will bring many advantages over the course of time. I've learned it the hard way. I was like "... the patterns. Who needs them. They just complictae stuff." 6 month later there I was rewriting/_patternizing_MDL the app. ;)
I bug
-
Keith Barrow wrote:
Pete o'Hanlon (a regular here) has a framework he was working on
Currently working on version 2 which is based on work I did with Marlon Grech around MEF, adding a new fluent Validation API and useful Blend behaviours and Dependency Properties.
"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.
Do you have an article or anything you can share about it? I'm interested in it.
"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
-
Do you have an article or anything you can share about it? I'm interested in it.
"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
At the moment, no. The code is wide open right now - parts of it don't fully work yet, and the validation needs a lot of tidying up. Unlike the initial release of Goldlight, I'm providing lots of small sample applications as part of the release. This makes it easier for me to demonstrate the different parts of the framework and will cut down the questions I got in the initial version.
"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.
-
At the moment, no. The code is wide open right now - parts of it don't fully work yet, and the validation needs a lot of tidying up. Unlike the initial release of Goldlight, I'm providing lots of small sample applications as part of the release. This makes it easier for me to demonstrate the different parts of the framework and will cut down the questions I got in the initial version.
"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.
Cool. I gotta check out your blog more often, haven't been around lately, trying to re-line up all the ducks in 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
-
Cool. I gotta check out your blog more often, haven't been around lately, trying to re-line up all the ducks in 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
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.
-
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.'