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. General Programming
  3. Design and Architecture
  4. Why I don't do MVVM.

Why I don't do MVVM.

Scheduled Pinned Locked Moved Design and Architecture
wpfcomdebuggingregexarchitecture
11 Posts 4 Posters 28 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.
  • L Lost User

    But MS says it better.

    Quote:

    ... The issue with the MVVM pattern is that it can inadvertently lead to apps that have too many layers and too many allocations. ... But strict adherence to any variation of the pattern can lead to apps with a lot more overhead than can be justified. ... consider putting event handlers in your code-behind ....

    [MVVM and language performance tips - UWP applications | Microsoft Learn](https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/mvvm-performance-tips)

    "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

    Greg UtasG Offline
    Greg UtasG Offline
    Greg Utas
    wrote on last edited by
    #2

    I'm shocked--shocked, I tell you--that MSFT would give a tinker's cuss for performance. For as long as I can remember, it doesn't matter what the hardware folks do to speed up CPUs or increase memory and disk space, because most of the software folks frivolously piss it away. I get the sense, admittedly somewhat superficially, that web-based applications in particular are absolute pigs in excrement when it comes to performance. Does performance still even matter?! If it does, and I wasn't retired, I'd be sorely tempted to find and work with folks who were aiming to blow all of this crapola out of the water.

    Robust Services Core | Software Techniques for Lemmings | Articles
    The fox knows many things, but the hedgehog knows one big thing.

    <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
    <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

    J 1 Reply Last reply
    0
    • L Lost User

      But MS says it better.

      Quote:

      ... The issue with the MVVM pattern is that it can inadvertently lead to apps that have too many layers and too many allocations. ... But strict adherence to any variation of the pattern can lead to apps with a lot more overhead than can be justified. ... consider putting event handlers in your code-behind ....

      [MVVM and language performance tips - UWP applications | Microsoft Learn](https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/mvvm-performance-tips)

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #3

      So, their "best practice" isn't exactly best practice for performance reasons? Color me "shocked."

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak

      L 1 Reply Last reply
      0
      • D Dave Kreskowiak

        So, their "best practice" isn't exactly best practice for performance reasons? Color me "shocked."

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak

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

        Using a pattern, on purpose, that obscures the power and potential of the platform is beyond not making sense.

        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

        1 Reply Last reply
        0
        • Greg UtasG Greg Utas

          I'm shocked--shocked, I tell you--that MSFT would give a tinker's cuss for performance. For as long as I can remember, it doesn't matter what the hardware folks do to speed up CPUs or increase memory and disk space, because most of the software folks frivolously piss it away. I get the sense, admittedly somewhat superficially, that web-based applications in particular are absolute pigs in excrement when it comes to performance. Does performance still even matter?! If it does, and I wasn't retired, I'd be sorely tempted to find and work with folks who were aiming to blow all of this crapola out of the water.

          Robust Services Core | Software Techniques for Lemmings | Articles
          The fox knows many things, but the hedgehog knows one big thing.

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #5

          Greg Utas wrote:

          Does performance still even matter?...If it does, and I wasn't retired

          It really mattered in the 50/60s whether you used a bubble sort or a binary sort. For the single application that one would write then. Now companies do enterprise systems which can contain thousands or even tens of thousands of running instances which have far more serious issues with performance. None of which can be solved with tuning individual lines of code. Complexity of course drives that. There are many, many other factors that also impact it. As an example I once increased performance by about 60000% (10 hours to less than 1 minute) by changing requirements. Doubt increasing the CPU by 3% would have had that much impact. On the other hand I have seen developers spending more than a week 'optimizing' code which would have no impact at all on the user experience. Not to mention of course business practices that allowed customers to abuse the enterprise to such an extent (by not forcing them to pay for what they were using) that they then started complaining that the system was too slow. Customers like to complain about performance but often can't even cite what that actually means. And it is very seldom that they are willing to switch product/services because of that. It is the other features that they need/want which drive their decision. Not to mention the cost.

          Greg UtasG 1 Reply Last reply
          0
          • L Lost User

            But MS says it better.

            Quote:

            ... The issue with the MVVM pattern is that it can inadvertently lead to apps that have too many layers and too many allocations. ... But strict adherence to any variation of the pattern can lead to apps with a lot more overhead than can be justified. ... consider putting event handlers in your code-behind ....

            [MVVM and language performance tips - UWP applications | Microsoft Learn](https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/mvvm-performance-tips)

            "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #6

            Gerry Schmitz wrote:

            MVVM pattern is that it can inadvertently lead to apps that have too many layers and too many allocations.

            Remind me again which pattern is it exactly that guarantees that can't happen?

            L 1 Reply Last reply
            0
            • J jschell

              Greg Utas wrote:

              Does performance still even matter?...If it does, and I wasn't retired

              It really mattered in the 50/60s whether you used a bubble sort or a binary sort. For the single application that one would write then. Now companies do enterprise systems which can contain thousands or even tens of thousands of running instances which have far more serious issues with performance. None of which can be solved with tuning individual lines of code. Complexity of course drives that. There are many, many other factors that also impact it. As an example I once increased performance by about 60000% (10 hours to less than 1 minute) by changing requirements. Doubt increasing the CPU by 3% would have had that much impact. On the other hand I have seen developers spending more than a week 'optimizing' code which would have no impact at all on the user experience. Not to mention of course business practices that allowed customers to abuse the enterprise to such an extent (by not forcing them to pay for what they were using) that they then started complaining that the system was too slow. Customers like to complain about performance but often can't even cite what that actually means. And it is very seldom that they are willing to switch product/services because of that. It is the other features that they need/want which drive their decision. Not to mention the cost.

              Greg UtasG Offline
              Greg UtasG Offline
              Greg Utas
              wrote on last edited by
              #7

              I agree that optimizing the code is unlikely to help here. The problem is the high-level design, like how the many thousands of instances are supported. The mania for stateless servers that must continually recreate context is another problem. Poor performance in these types of soft real-time systems usually means one of two things: 1. The response time annoys users. 2. A lot more must be spent on computing equipment than in a system that is better designed.

              Robust Services Core | Software Techniques for Lemmings | Articles
              The fox knows many things, but the hedgehog knows one big thing.

              <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
              <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

              1 Reply Last reply
              0
              • J jschell

                Gerry Schmitz wrote:

                MVVM pattern is that it can inadvertently lead to apps that have too many layers and too many allocations.

                Remind me again which pattern is it exactly that guarantees that can't happen?

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

                You're talking wrappers, frameworks and methodologies (MVVM). A "pattern" can be a simple plug-in that "adds" functionality instead of masking or contorting it. MVVM is a "bunch" of patterns; all directed to "indirection". A simple statement like: NO code behind ... is a pattern (of behaviour).

                "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                J 1 Reply Last reply
                0
                • L Lost User

                  You're talking wrappers, frameworks and methodologies (MVVM). A "pattern" can be a simple plug-in that "adds" functionality instead of masking or contorting it. MVVM is a "bunch" of patterns; all directed to "indirection". A simple statement like: NO code behind ... is a pattern (of behaviour).

                  "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                  J Offline
                  J Offline
                  jschell
                  wrote on last edited by
                  #9

                  Ok. But I don't see how that answers my question?

                  L 1 Reply Last reply
                  0
                  • J jschell

                    Ok. But I don't see how that answers my question?

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

                    Quote:

                    Ok. But I don't see how that answers my question?

                    I gave you an example: a plug-in. Where are the "layers" and "allocations"? One function reference. Are you saying a plug-in is not a pattern? What is a "door"? Your "argument" is all patterns are "faulty". Back it up.

                    "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                    J 1 Reply Last reply
                    0
                    • L Lost User

                      Quote:

                      Ok. But I don't see how that answers my question?

                      I gave you an example: a plug-in. Where are the "layers" and "allocations"? One function reference. Are you saying a plug-in is not a pattern? What is a "door"? Your "argument" is all patterns are "faulty". Back it up.

                      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #11

                      And that guarantees that it will not have "too many layers"?

                      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