Re:Former Tesla Firmware Engineer Discusses the System
by ac0kg on Friday August 24, 2018 @09:17PM
(#17839016)
I'd like to know more about this, can you recommend some good places to learn about it?
Re:Former Tesla Firmware Engineer Discusses the System
by noir_lord on Saturday August 25, 2018 @05:04AM
(#17840177)
The actual principal is simple, your classes have private properties which contain the thing, you use get/set on public properties and on the set you raise a property change event (that's declared via an interface).
WPF binds to those objects and when you change the thing via a public property the change notification is fired and the UI updates.
Docs you want are MVVM and particularly INotifyProperyChanged.
https://www.c-sharpcorner.com/article/explain-inotifypropert...
Once you accept that reactive data models are the 'correct' pattern things become so much simpler.
Throw in JSON.net and QuickType (amazing if you haven't seen it, feed it JSON or JSON Schema and it outputs correct code to serialize to from JSON in about 25 languages pretty much idiomatically (for C# it uses JSON.net for TypeScript interfaces and if you want it runtime validation).
It's a remarkably stable way of hoisting an API.