Reactive Frameworks. Thoughts?
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
Chris Maunder wrote:
The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient.
In them good ol' days we use to call things like that 'scope' and had pet names like "global" and "local". Wow - what will they think up next?
"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
-
Chris Maunder wrote:
The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient.
In them good ol' days we use to call things like that 'scope' and had pet names like "global" and "local". Wow - what will they think up next?
"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
Not quite the same things. It's the observable that does the magic and allows other things to happen. Magically. Mystically. Surprisingly. Frustratingly. Horrifyingly sometimes.
cheers Chris Maunder
-
Not quite the same things. It's the observable that does the magic and allows other things to happen. Magically. Mystically. Surprisingly. Frustratingly. Horrifyingly sometimes.
cheers Chris Maunder
Not saying your not using the right tool for whatever it is your doing, but
Chris Maunder wrote:
Magically. Mystically. Surprisingly. Frustratingly. Horrifyingly sometimes.
is why I avoid frameworks like Ebola. Hopefully it won't come to you, but that list of attributes is a prescription for a developer to be left shit-faced and helpless. Or, the one item left off the list when it all goes swirling down: 'cursed'.
"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
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
Kinda like WPF binding, amazing tech. but man can it be a headache to debug!
The less you need, the more you have. JaxCoder.com
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
I work with React, amongst other frameworks and it's my choice for my personal web development although I still feel like an amateur with it. The trickiest part I have found is not so much the clever binding where the DOM updates when you update state, but trying to figure our why the DOM is not being updated when you update state. There are little traps throughout REACT waiting to make your day difficult when all you wanted to do was update some text from an async function. One small thing, React and Typescript go together very nicely. P.S. I forgot to mention that if you are going to use React also look into Redux - it took me and still takes me to do some mental gymnastics to understand Redux but it does make handling state a bit neater than using the React state functions.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
All this magic has to come from somewhere: rules for a rules engine and / or slavish adherence to some implied "language": a spade is a spade is a shovel is not a playing card is ...
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
-
Not saying your not using the right tool for whatever it is your doing, but
Chris Maunder wrote:
Magically. Mystically. Surprisingly. Frustratingly. Horrifyingly sometimes.
is why I avoid frameworks like Ebola. Hopefully it won't come to you, but that list of attributes is a prescription for a developer to be left shit-faced and helpless. Or, the one item left off the list when it all goes swirling down: 'cursed'.
"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
:confused:
-
Not saying your not using the right tool for whatever it is your doing, but
Chris Maunder wrote:
Magically. Mystically. Surprisingly. Frustratingly. Horrifyingly sometimes.
is why I avoid frameworks like Ebola. Hopefully it won't come to you, but that list of attributes is a prescription for a developer to be left shit-faced and helpless. Or, the one item left off the list when it all goes swirling down: 'cursed'.
"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
If I couldn't use anything I didn't understand I'd be working in a whole different field (and that probably goes for 99% of us) :~ It's kind of fun how you allow your source code to magically and mystically run on a computer which translates it to 1's and 0's and does something with current on nano chips made of silicon (or whatever happens in a computer!), but you draw a line at a relatively simple library that updates an input based on a value :laugh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
All this magic has to come from somewhere: rules for a rules engine and / or slavish adherence to some implied "language": a spade is a spade is a shovel is not a playing card is ...
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
Remember DDX (Dialog Data Exchange) in WinForms (MFC)? Dialog Data Exchange | Microsoft Docs[^] It allowed you to bind the control value to your member variable.
void CTestDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Check(pDX, IDC_MY_CHECKBOX, m_bVal);
DDX_Text(pDX, IDC_MY_TEXTBOX, m_strName);
DDV_MaxChars(pDX, m_strName, 20);
}This binding thing been around for a long time, but it didn't have a good name like React. :) Once Something Out of the Ordinary Happens The Angular binding was a lot of fun and quite smooth. Just kind of does everything for you. The problem with all of these is when something out of the ordinary happens. Generally once that happens you spend countless hours trying to fix things that happen by magic.
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
I started using Vue a few years back and I love it. I keep it simple, so I only use the most basic bindings. I've used a component a couple of times, but never wrote one myself. As it happens, I've experimented with list add and (re)move animations just last week, which is sort of half included. Unfortunately, with some canvas element, I still had to do some manual DOM stuff. All in all, 9/10 would recommend. You shouldn't really listen to me though, I'm a back-end developer and I quite dislike the front-end and I'm not very good at it either. CSS gives me nightmares :sigh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
Remember DDX (Dialog Data Exchange) in WinForms (MFC)? Dialog Data Exchange | Microsoft Docs[^] It allowed you to bind the control value to your member variable.
void CTestDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Check(pDX, IDC_MY_CHECKBOX, m_bVal);
DDX_Text(pDX, IDC_MY_TEXTBOX, m_strName);
DDV_MaxChars(pDX, m_strName, 20);
}This binding thing been around for a long time, but it didn't have a good name like React. :) Once Something Out of the Ordinary Happens The Angular binding was a lot of fun and quite smooth. Just kind of does everything for you. The problem with all of these is when something out of the ordinary happens. Generally once that happens you spend countless hours trying to fix things that happen by magic.
-
If I couldn't use anything I didn't understand I'd be working in a whole different field (and that probably goes for 99% of us) :~ It's kind of fun how you allow your source code to magically and mystically run on a computer which translates it to 1's and 0's and does something with current on nano chips made of silicon (or whatever happens in a computer!), but you draw a line at a relatively simple library that updates an input based on a value :laugh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
I guess it depends on your definition of "understand".
Wrong is evil and must be defeated. - Jeff Ello
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
I have been using Flutter, a reactive cross-plattform mobile development framework for some months now. Hot Reloading where you save and run your app in one second is important to me. If I have to wait tre seconds to see the result, it is already too long. One bonus is that you now can run the same code to compile it to run on native Windows, the web, macOS, or Linux desktop. It is still not perfect but worth a try. In React you need some good debugging tools and state management libraries. For small projects MobX is easy to set up and use. For big projects with a lot of programmers I would use Redux but it has a steep learning curve and every time you need to change something you have to edit a lot of files.
jhaga
-
I work with React, amongst other frameworks and it's my choice for my personal web development although I still feel like an amateur with it. The trickiest part I have found is not so much the clever binding where the DOM updates when you update state, but trying to figure our why the DOM is not being updated when you update state. There are little traps throughout REACT waiting to make your day difficult when all you wanted to do was update some text from an async function. One small thing, React and Typescript go together very nicely. P.S. I forgot to mention that if you are going to use React also look into Redux - it took me and still takes me to do some mental gymnastics to understand Redux but it does make handling state a bit neater than using the React state functions.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
I'm using Vue which kinda sort but doesn't really play nice with TypeScript. The new version will fix that but until the components are updated it'll be messy. I do like it a lot, though.
cheers Chris Maunder
-
Remember DDX (Dialog Data Exchange) in WinForms (MFC)? Dialog Data Exchange | Microsoft Docs[^] It allowed you to bind the control value to your member variable.
void CTestDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Check(pDX, IDC_MY_CHECKBOX, m_bVal);
DDX_Text(pDX, IDC_MY_TEXTBOX, m_strName);
DDV_MaxChars(pDX, m_strName, 20);
}This binding thing been around for a long time, but it didn't have a good name like React. :) Once Something Out of the Ordinary Happens The Angular binding was a lot of fun and quite smooth. Just kind of does everything for you. The problem with all of these is when something out of the ordinary happens. Generally once that happens you spend countless hours trying to fix things that happen by magic.
I completely forgot about DDX! Oh, those were the days :)
cheers Chris Maunder
-
I started using Vue a few years back and I love it. I keep it simple, so I only use the most basic bindings. I've used a component a couple of times, but never wrote one myself. As it happens, I've experimented with list add and (re)move animations just last week, which is sort of half included. Unfortunately, with some canvas element, I still had to do some manual DOM stuff. All in all, 9/10 would recommend. You shouldn't really listen to me though, I'm a back-end developer and I quite dislike the front-end and I'm not very good at it either. CSS gives me nightmares :sigh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
I must be twisted but I love CSS.
cheers Chris Maunder
-
I have been using Flutter, a reactive cross-plattform mobile development framework for some months now. Hot Reloading where you save and run your app in one second is important to me. If I have to wait tre seconds to see the result, it is already too long. One bonus is that you now can run the same code to compile it to run on native Windows, the web, macOS, or Linux desktop. It is still not perfect but worth a try. In React you need some good debugging tools and state management libraries. For small projects MobX is easy to set up and use. For big projects with a lot of programmers I would use Redux but it has a steep learning curve and every time you need to change something you have to edit a lot of files.
jhaga
Yeah, I was enjoying hot module reload that was backed into .NET Core. Until they removed it. I know you can work around that by wiring it up using Webpack and npm (or whatever) but it's a little frustrating to have to continually step outside Visual Studio for things that really should be baked into the system at this point.
cheers Chris Maunder
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
Chris Maunder wrote:
The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient.
Isn't that what Windows bindings do?
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
I'm a newcomer to reactive frameworks such as Vue and React. The whole concept of updating a value (or wiring it up to a UI element so it can be updated) and having the changes propagate through the application without explicitly updating anything else is new and weird. But super convenient. It feels like the move from managing my own memory in C++ to moving to the managed memory model of C#. Whereas memory management felt like I had a servant who would go around and pick up my dirty laundry, it now feels like I have a bunch of servants who run around doing stuff that needs to be done without me even needing to tell them to do it. If they were staff they'd get a bonus. Except when they get totally confused and can't break out of a cyclic dependency. Or when they react to every tiny little thing. Or when they put tabs on everything so they don't miss anything, but "everything" includes megabytes of timeseries data that's never going to change. I get how to work around these things but it's an odd, kinda cool, sometimes uncomfortable experience and I was just wondering how others adapted (or didn't)
cheers Chris Maunder
Chris Maunder wrote:
(or didn't)
Bingo. I've looked at these frameworks, listened to my fellow developers rave about them but then never use them, and same devs ask me "hmm, which framework is best to learn?"... and when I look at the dependencies I run away screaming... and when I look at the core underlying technology, which is the Proxy feature of JavaScript, I end up writing my own in about an hour... and when I look at entangling declarative markup with flowy-conditionally-WTFy imperative coding, I run away screaming in a different direction... and when I look at the whole gestalt, it's sort of like Tulip Mania in 1637 and what's the next framework du jour... and then I wonder again, why do I even need this stuff... and I realize I'm wasting a lot of time trying to justify using one of these frameworks when the reality is, I simply cannot come up with a justifiable use case. But that's me.
Latest Articles:
Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions