7 ms·
I love functional concepts such as stateless systems, but young folks should acknowledge that two way event binding is something graphical desktop toolkits are
by ktpsns 6y ago
I love functional concepts such as stateless systems, but young folks should acknowledge that two way event binding is something graphical desktop toolkits are doing since decades. For instance, Qt signal-slot mechanism https://doc.qt.io/qt-5/signalsandslots.html https://doc.qt.io/qt-5/signalsandslots.html or https://libsigcplusplus.github.io/libsigcplusplus https://libsigcplusplus.github.io/libsigcplusplus
Furthermore, MVC is, when done correctly, a sane two way data-GUI binding. However, I have never seen a sane implementation ;-)
- m463 6y agoI wish I could figure out the openwrt MVC gui stuff
- keyle 6y agoYes and yes. And I think that as a whole the industry moved towards MVVM which is a lot more achievable than MVC for the better.
- seanalltogether 6y agoAdditionally, html documents inside browser windows are naturally stateless content systems, but applications have never had this constraint. The design patterns that are successful on a browser are usually overkill in application development. Android has baked a few of these stateless design patterns into their core frameworks and then spent years coming up with various support libraries to overcome them.
- uryga 6y ago> html documents inside browser windows are naturally stateless content systems what about inputs? or do you consider them stateless because their entire¹ "state" is reflected in the DOM, i.e. <input type="checkbox"/> // *click* <input type="checkbox" checked=""/> --- ¹ - well, except focus, open/closed for <select>, and probably a bunch of other things
- seanalltogether 6y agoIn this context stateless usually refers to access to the wider system. When an html page loads, it has no state it can access right away, it has only raw data in the url and cookies. You are constantly having to recreate the state of the system as a user moves from one page to another. Design patterns like react are a natural fit for this system, its turtles all the way down. Applications on the other hand start their lifecycle as a singleton and because you can guarantee a parent child relationship from top to bottom it tends to facilitate design patterns with sharing of state more easily between pages.
- uryga 6y agoah gotcha! for some reason i thought you were talking at the component level, not app level.
- u678u 6y agoHopefully one day we can get to where Visual Basic was in the 90's.
- sago 6y agoI keep vainly hoping for undo/redo, configurable keyboard shortcuts, cross-app files, app help, you know... the wins of the Windows 3.x 90s. I'm honestly amazed some (especially undo!) were shrugged away so easily.
- qwantim1 6y agoThe BFF pattern[1] may be more useful today to many, due to various types and sizes of devices and different sorts of integrations. MVC can be used in its place, but it would often introduce unnecessary complexity, e.g. additional controllers. MVC works for contextually equivalent interaction, which is still very useful, too. Mostly just do what makes sense. The challenge is, as it has been, how to be flexible, smart, and forward-looking, but developing quickly for what’s needed now. But whether you’re coding a quick prototype or designing a large project (which is risky because a feedback loop from all users may be longer), focusing too much on the how and specifics instead of the overall experience may get you into trouble later. For example, you could have what sounds ideal: microservices, individual teams each working on them focused on their own goals, powering a site with the latest, well-used JS framework, able to deploy quickly and developing quickly with a lot of fun-but-professional-looking communication, and end up with a slow, broken application. [1]- https://samnewman.io/patterns/architectural/bff/ https://samnewman.io/patterns/architectural/bff/
- j45 6y agoThere's a big difference between something being new vs being new to a developer that I try to see if a developer understands.
- LeoNatan25 6y agoThe sanest MVC implementation is AppKit and classic UIKit.
- 0df8dkdf 6y agoYup thank you. Web is only now coming to terms with desktop application development world of doing things. While I support the movement, however there are too many legacy stuff in the web and how front end developer use JS like jquery type of thing to manage a document base page. Maybe there should be a mode like 'stric mode' to support two way data binding.
- kall 6y agoThe problem, if there is one, with the web stuff discussed here is not that it is not strict enough to facilitate two way data binding but the opposite. Modern web frameworks use stricter one way data binding because they posit two way data binding is too dangerous / hard to reason about. It could easily be added and vue does in fact have some of it.
- ampdepolymerase 6y agoYou might not like Svelte.
- snarfy 6y agoThe problem with two way data binding is it assumes a function call is free. Two way data binding breaks when a function call is many orders of magnitude slower, like over the web. You end up with classic ASP.NET.
- deleted 6y ago[deleted]