What are two-way data binding and one-way data flow, and how are they different? - Deepstash

What are two-way data binding and one-way data flow, and how are they different?

Good to hear:  

  • React is the new Canonical example of one-way data flow. Cycle.js is another popular implementation of uni-directional data flow.
  • Angular is a popular framework which uses two-way binding. 

14 STASHED

MORE IDEAS FROM THEARTICLE

JavaScript is a multi-paradigm language, supporting imperative/procedural programming along with OOP (Object-Oriented Programming) and functional programming. JavaScript supports OOP with prototypal inheritance.

  • Good to hear: Prototypal inheritance (also: prototypes, OLOO); Functional programming (also: closures, first class functions, lambdas).
  • Red flags: No clue what a paradigm is, no mention of prototypal oo or functional programming.

16 STASHED

2 LIKES

Marcus Lemonis

“People, Process, Product”

16 STASHED

  • Good to hear: Mentions of trouble with shared state, different things competing for the same resources, etc.; Awareness of FP’s capability to radically simplify many applications; Awareness of the differences in learning curves; Articulation of side-effects and how they impact program maintainability; Awareness that a highly functional codebase can have a steep learning curve; Awareness that a highly OOP codebase can be extremely resistant to change and very brittle compared to an equivalent FP codebase.
  • Red flags: Unable to list disadvantages of one style or another.

16 STASHED

1 LIKE

Good to hear:

  • In situations where modules or functional programming don’t provide an obvious solution.
  • When you need to compose objects from multiple sources.
  • Any time you need inheritance.

Red flags:

  • No knowledge of when to use prototypes.
  • No awareness of mixins or `Object.assign()`.

14 STASHED

It produces programs by composing mathematical functions and avoids shared state & mutable data.

  • Good to hear: Pure functions/function purity; Avoid side-effects; Simple function composition; Examples of functional languages: Lisp, ML, Haskell, Erlang, Clojure, Elm, F Sharp, OCaml, et.; Mention of features that support FP: first-class functions, higher-order functions, functions as arguments/values.
  • Red flags: No mention of pure functions / avoiding side-effects; Unable to provide examples of functional programming languages; Unable to identify the features of JavaScript that enable FP.

16 STASHED

1 LIKE

The answer is never, or almost never. Certainly never more than one level.

Good to hear:

  • Rarely, almost never, or never.
  • A single level is sometimes OK, from a framework base-class such as React.Component.
  • “Favor object composition over class inheritance.”

14 STASHED

1 LIKE

Good to hear:  

  • Avoid class hierarchies. 
  • Avoid brittle base class problem. 
  • Avoid tight coupling. 
  • Avoid rigid taxonomy. 
  • Avoid the gorilla banana problem. 
  • Make code more flexible. 

14 STASHED

1 LIKE

In JavaScript, prototypal inheritance is simpler & more flexible than class inheritance.

  • Good to hear: Classes: create tight coupling or hierarchies/taxonomies; Prototypes: mentions of concatenative inheritance, prototype delegation, functional inheritance, object composition.
  • Red Flags: No preference for prototypal inheritance & composition over class inheritance.

15 STASHED

Good to hear:  

  • An understanding of what blocking means, and the performance implications. 
  • An understanding of event handling, and why its important for UI code. 

15 STASHED

Good to hear:  

  • Positive attitudes toward Microservices, despite higher initial cost vs Monolthic Apps. Despite higher initial cost, Microservices tend to perform and scale better.
  • Structure the App so that services are independent from each other. But easy to bundle together as a monolithic App in the beginning.

14 STASHED

Deepstash helps you become inspired, wiser and productive, through bite-sized ideas from the best articles, books and videos out there.

GET THE APP:

RELATED IDEAS

High Paying Computer Languages.

Software developers choose the highest-paying programming languages to set an extraordinary career.

17 STASHED

5 LIKES

Testing in React Native

As your codebase expands, small errors and edge cases you don’t expect can cascade into larger failures. Bugs lead to bad user experience and ultimately, business losses. One way to prevent fragile programming is to test your code before releasing it into the wild.

There is more value in testing than you might realize. One of the best ways to fix a bug in your code is to write a failing test that exposes it. Then when you fix the bug and re-run the test, if it passes it means the bug is fixed, never reintroduced into the code base.

7 STASHED

4 LIKES