Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Has anyone used MVVM?

Has anyone used MVVM?

Scheduled Pinned Locked Moved The Lounge
wpfarchitecturequestion
37 Posts 19 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Glosse
    wrote on last edited by
    #1

    Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

    P A A K L 13 Replies Last reply
    0
    • G Glosse

      Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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.

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • G Glosse

        Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        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.

        [Forum Guidelines]

        1 Reply Last reply
        0
        • G Glosse

          Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #4

          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

          T 1 Reply Last reply
          0
          • G Glosse

            Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

            K Offline
            K Offline
            Keith Barrow
            wrote on last edited by
            #5

            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.

            P D 2 Replies Last reply
            0
            • G Glosse

              Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              It is when the program would not be simple otherwise, that things like that are truly useful.

              1 Reply Last reply
              0
              • K Keith Barrow

                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.

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                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.

                My blog | My articles | MoXAML PowerToys | Onyx

                P 1 Reply Last reply
                0
                • G Glosse

                  Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

                  E Offline
                  E Offline
                  Ennis Ray Lynch Jr
                  wrote on last edited by
                  #8

                  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

                  M L N 3 Replies Last reply
                  0
                  • G Glosse

                    Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

                    D Offline
                    D Offline
                    Dan Mos
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      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.

                      My blog | My articles | MoXAML PowerToys | Onyx

                      P Offline
                      P Offline
                      Paul Conrad
                      wrote on last edited by
                      #10

                      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

                      P L 2 Replies Last reply
                      0
                      • P Paul Conrad

                        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

                        P Offline
                        P Offline
                        Pete OHanlon
                        wrote on last edited by
                        #11

                        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.

                        My blog | My articles | MoXAML PowerToys | Onyx

                        P 1 Reply Last reply
                        0
                        • P Pete OHanlon

                          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.

                          My blog | My articles | MoXAML PowerToys | Onyx

                          P Offline
                          P Offline
                          Paul Conrad
                          wrote on last edited by
                          #12

                          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

                          P 1 Reply Last reply
                          0
                          • P Paul Conrad

                            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

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #13

                            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.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            P 1 Reply Last reply
                            0
                            • G Glosse

                              Do you find it useful? Or does it grossly complicate what otherwise would be a simple program?

                              H Offline
                              H Offline
                              Henry Minute
                              wrote on last edited by
                              #14

                              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.'

                              P U 2 Replies Last reply
                              0
                              • H Henry Minute

                                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.'

                                P Offline
                                P Offline
                                Pete OHanlon
                                wrote on last edited by
                                #15

                                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.

                                My blog | My articles | MoXAML PowerToys | Onyx

                                H 1 Reply Last reply
                                0
                                • P Pete OHanlon

                                  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.

                                  My blog | My articles | MoXAML PowerToys | Onyx

                                  H Offline
                                  H Offline
                                  Henry Minute
                                  wrote on last edited by
                                  #16

                                  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.'

                                  P 1 Reply Last reply
                                  0
                                  • H Henry Minute

                                    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.'

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #17

                                    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.

                                    My blog | My articles | MoXAML PowerToys | Onyx

                                    H 1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      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.

                                      My blog | My articles | MoXAML PowerToys | Onyx

                                      H Offline
                                      H Offline
                                      Henry Minute
                                      wrote on last edited by
                                      #18

                                      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.'

                                      P 1 Reply Last reply
                                      0
                                      • P Pete OHanlon

                                        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.

                                        My blog | My articles | MoXAML PowerToys | Onyx

                                        P Offline
                                        P Offline
                                        Paul Conrad
                                        wrote on last edited by
                                        #19

                                        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

                                        1 Reply Last reply
                                        0
                                        • H Henry Minute

                                          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.'

                                          P Offline
                                          P Offline
                                          Pete OHanlon
                                          wrote on last edited by
                                          #20

                                          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.

                                          My blog | My articles | MoXAML PowerToys | Onyx

                                          H 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups