Binding is the new Spaghetti
-
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.
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.
-
I'm a "non-binder". Possibly a control-freak part of my nature but, when it comes down to it, everything thing is in-your-face. The closest I get to obscurity is using SQL Stored Procedures rather than hard-coding the TSQL.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
Me too, I do everything in code so I know exactly what's going on. And what's not. We have a couple apps here done by other (lazy) programmers and everything is done with binding. I have no idea how some of it works or why you'd elect to do that.
-
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.
binding is the worst. all the hoops to jump through to display data. all the data transforms and special cases have to be put into a special view model that can be bound making a lot of glut. I worked with WPF for about 2 years, I wanted to pull my hair out, got a different job and never touched the stuff again.
-
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.
Binding is one of those things whose only purpose is to produce an "ooh" at product roll-out demos. Microsoft demo wonk: I'll show you how easy it is to get data from the database to the form. Click/drag/tap Crowd of mindless drones: Oooohhhh.
-
Binding is one of those things whose only purpose is to produce an "ooh" at product roll-out demos. Microsoft demo wonk: I'll show you how easy it is to get data from the database to the form. Click/drag/tap Crowd of mindless drones: Oooohhhh.
Of course they did a lot of grunt work before hand to get the application ready. The not so Ooooohhhhh part. Now I have this interstate bridge I can sell you for a discount.
So many years of programming I have forgotten more languages than I know.
-
It's pretty powerful once you get used to it. And it's used pretty much everywhere now - Angular, Vue, etc. I prefer to have the code (logic) and view (semi)decoupled by using bindings. It's allowed me to re-use viewmodels with different views, where I would have had to duplicate logic.
Agreed. For any front-end scenario where multiple clients are involved and at least one server that can propagate information to all clients, you either A) pick a binding framework or B) lose time reinventing the wheel in a non-standardized way that will become obsolete before it's ever finished. I just hope WASM/Blazor can speed up the creation of a C#-based binding framework for the web. I tired of debugging JavaScript. :((
-
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.
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.
-
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.
Binding in UWP and WinUI not only gives you binding on functions, but allows you to specify a callback for two-way binding.
-
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.
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.
-
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.
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.
-
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.
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
-
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.
How old are you? 100??