View on GitHub

reading-notes

Daily Reading 1

Component-Based Architecture

What is a “component”?

A individual segment of a program that is designed to be modular and reusable, with self contained strict and clear functionality associated with it.

What are the characteristics of a component?

Reusable - Can take in different information, and be used for different tasks that fall under the specifications of what the component does.

Replaceable - Can be swapped out with different versions that achieve the same thing without breaking other systems.

Not Context Specific - Designed to work well under different contexts and development/deployment environments.

Extensible - Can be added to as needed to provide new functionality.

Encapsulated - is a “black box” where an input is provided, and an output is provided without exposing the inner workings behind it’s function.

Independent - Components should have as little interdependency with other systems or components as possible, which is what allows for the Reusable, and Replaceable aspects above.

What are the advantages of using component-based architecture?

Updating systems is much easier if the previous one can be fully removed and replaced without causing failures elsewhere. This in turn increases reliability, and reduces cost, and streamlines maintenance work of the system.

What is Props and How to Use it in React

What is “props” short for?

Properties, and is the data that is passed from parent to child.

How are props used in React?

Props are chunks of data that are handed from one component to the next, but can only be passed “downward” from parent to child, and never from child to parent.

What is the flow of props?

One-directional, from parent component to child component. Child components that are themselves parent components to additional can continue to pass props downward, but again, the flow of props must always go downward, from parent to child.

Back To Main Page.