Skip to the content.

Code 301 Class 01 Reading Notes

Component-Based Architecture

  1. What is a ‘component’?

    A unit of composition with a contractually specified interface and explicit context dependencies only.

  2. What are the characteristics of a component?

    Reusability - Components are usually designed to be reused in different situations in different applications. Replaceable - Components may be freely substitued with other similar components.

    Not context specific - Componenets are designed to operate in different environments and contexts.

    Extensible - A component can be extended from existing components to provide new behavior.

    Encapsulated - A component depicts the interfaces, which allow the caller to use its functionality, and do not expose details of the internal processes or any internal variables or state.

    Independent - Components are designed to have minimal dependencies on other components.

  3. What are the advantages of using component-based archeticture?

    Ease of deployment - As new compatible versions become available, it is easier to replace existing versions with no impact on the other components or the styem as a whole.

    Reduced cost - The use of third-party components allows you to spread the cost of development and maintenance.

    Ease of development - Components implement well-known interfaces to provide defined functionality, allowing development with impacting other parts of the system.

    Reusable - The use of resuable components means that they can be used to spread the development and maintenance cost across several applications or systems.

    Modification of technical complexity - A component modifies the complexity through the use of a component container and its services.

    Reliability - The overall system reliability increases since the reliability of each individual component enhances the reliablity of the whol system via reuse.

    System maintenance and evolution - Easy to change and update the implementation with affecting the rest of the system.

    Independent - Independency and flexible connectivity of components. Independent development of components by different group in parallel. Productivity for the software development and future software development.

What is Props and How to Use it in React

  1. What is ‘props’ short for?

    Properties, and is beign used for passing data from one component to another.

    The data with props are being passed in a uni-directional flow. (one way from parent to child)

    Props data is read-only, which means that data coming from the parent should not be changed by child components.

  2. How are props used in React?

    Props are being passed to components like function arguments

  3. What is the flow of props?

    Props can only be passed to components in one way (parent to child)

Things I want to know more about

While playing the ‘Tic Tac Toe, game in the Tutorial: Intro to React article. I wonder what other extensions I can use. Can I add extra rows? How can this be utilized on a site with articles. Why aren’t these used more often on sites with articles? If they are, I would love to look at some examples.

After having to write DOM manipulation, I LOVE JSX!

<—BACK