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 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
                          • P Pete OHanlon

                            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 Offline
                            H Offline
                            Henry Minute
                            wrote on last edited by
                            #21

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

                            1 Reply Last reply
                            0
                            • G Glosse

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

                              M Offline
                              M Offline
                              Mycroft Holmes
                              wrote on last edited by
                              #22

                              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

                              L 1 Reply Last reply
                              0
                              • E Ennis Ray Lynch Jr

                                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 Offline
                                M Offline
                                Mycroft Holmes
                                wrote on last edited by
                                #23

                                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

                                1 Reply Last reply
                                0
                                • E Ennis Ray Lynch Jr

                                  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

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

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

                                  1 Reply Last reply
                                  0
                                  • M Mycroft Holmes

                                    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

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

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

                                    M 1 Reply Last reply
                                    0
                                    • L Lost User

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

                                      M Offline
                                      M Offline
                                      Mycroft Holmes
                                      wrote on last edited by
                                      #26

                                      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

                                      1 Reply Last reply
                                      0
                                      • G Glosse

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

                                        J Offline
                                        J Offline
                                        Judah Gabriel Himango
                                        wrote on last edited by
                                        #27

                                        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

                                        1 Reply Last reply
                                        0
                                        • E Ennis Ray Lynch Jr

                                          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

                                          N Offline
                                          N Offline
                                          NormDroid
                                          wrote on last edited by
                                          #28

                                          100% agreed!

                                          Two heads are better than one.

                                          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