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. Binding is the new Spaghetti

Binding is the new Spaghetti

Scheduled Pinned Locked Moved The Lounge
csharpwpfwinformswcf
26 Posts 22 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.
  • M michaelbarb

    Long ago before there were flow control and subroutine structures all we had only GoTo's. As a result it was really hard to follow the flow of the program. We had spaghetti code. I am currently working with a middle age programmer that has only worked with C# and WPF. Very little Windows forms. He has 15 years of WPF and is a better at it than I. But everything is binding. He hardly ever updates a control directly. Everything is binding. Working with his code you never know were things are going. It is like the new spaghetti.

    So many years of programming I have forgotten more languages than I know.

    S Offline
    S Offline
    Sharp Ninja
    wrote on last edited by
    #21

    Are you reading the code in Notepad? Simply right-click the path of the binding and select "Go To Declaration". Also, the value in the `DataContext` property is a dead giveaway, too.

    M 1 Reply Last reply
    0
    • M MadGerbil

      It isn't just binding, it is true with everything. For some reason you're not allowed to just call a function and get a result. The function has to be through an interface which is backed up by a library or three and then there are templates for the view, for the model, for the database - and entity framework because doing a SQL call is evil for some reason and then the validation library, a number formatting widget and a dozen other random files, most of which are in Nuget package that are obsolete or no longer supported.... 7 years to go... my dream job is bagging groceries.

      S Offline
      S Offline
      Sharp Ninja
      wrote on last edited by
      #22

      Binding in UWP and WinUI not only gives you binding on functions, but allows you to specify a callback for two-way binding.

      1 Reply Last reply
      0
      • S Sharp Ninja

        Are you reading the code in Notepad? Simply right-click the path of the binding and select "Go To Declaration". Also, the value in the `DataContext` property is a dead giveaway, too.

        M Offline
        M Offline
        michaelbarb
        wrote on last edited by
        #23

        I am reading code in VS but my mouse's right click does not always work. Or maybe it is me that the right click interrupts my thoughts.

        So many years of programming I have forgotten more languages than I know.

        1 Reply Last reply
        0
        • M michaelbarb

          Long ago before there were flow control and subroutine structures all we had only GoTo's. As a result it was really hard to follow the flow of the program. We had spaghetti code. I am currently working with a middle age programmer that has only worked with C# and WPF. Very little Windows forms. He has 15 years of WPF and is a better at it than I. But everything is binding. He hardly ever updates a control directly. Everything is binding. Working with his code you never know were things are going. It is like the new spaghetti.

          So many years of programming I have forgotten more languages than I know.

          P Offline
          P Offline
          patbob
          wrote on last edited by
          #24

          This is the case in general with event code -- spooky action at a distance. Easy to write, easy to understand if you don't think too hard, but a PITA if it breaks and you have to debug it. That's the very definition of spaghetti code that I've come to over the years, so yeah, binding code is spaghetti.

          5G -- more lies faster.

          1 Reply Last reply
          0
          • M michaelbarb

            Long ago before there were flow control and subroutine structures all we had only GoTo's. As a result it was really hard to follow the flow of the program. We had spaghetti code. I am currently working with a middle age programmer that has only worked with C# and WPF. Very little Windows forms. He has 15 years of WPF and is a better at it than I. But everything is binding. He hardly ever updates a control directly. Everything is binding. Working with his code you never know were things are going. It is like the new spaghetti.

            So many years of programming I have forgotten more languages than I know.

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

            In a sense, the "middle age programmer" is practicing MVVM / MVP, but doesn't get credit for that. He understands what a "data context" is and codes to that (using x:Bind for type checking where available).

            It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

            1 Reply Last reply
            0
            • M michaelbarb

              Long ago before there were flow control and subroutine structures all we had only GoTo's. As a result it was really hard to follow the flow of the program. We had spaghetti code. I am currently working with a middle age programmer that has only worked with C# and WPF. Very little Windows forms. He has 15 years of WPF and is a better at it than I. But everything is binding. He hardly ever updates a control directly. Everything is binding. Working with his code you never know were things are going. It is like the new spaghetti.

              So many years of programming I have forgotten more languages than I know.

              U Offline
              U Offline
              User 14060113
              wrote on last edited by
              #26

              How old are you? 100??

              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