WhoBuilt

The component anatomy, 90° to the left

Sep 28, 2022· 35 min· 863 views·Watch on YouTube

Speaker

Allah Ngangoue-Nyangwile, a software engineer at BAM, presents his Component Anatomy approach at React Native EU 2022, hosted by Callstack.

Why he looked for a new design tool

BAM’s technical strategy sessions aimed to estimate feature complexity and plan work, but collaboration and estimates were not always effective. After seeing cross-screen bugs and spaghetti code, Ngangoue-Nyangwile began looking for a way to make component structure and data flow easier to reason about, especially for junior developers.

A building plan for component structure

He drew inspiration from biology’s study of internal structures and construction plans that show how parts fit together. In his analogy, rooms and structures correspond to functions and components, while the movement of people and goods resembles data flow. He distinguishes visible flows, such as function parameters, from implicit ones triggered by hooks, state setters, mutations, or dispatch.

Three steps to design a component

Component Anatomy has three steps: layering, data-flow analysis, and a fabrication plan. Ngangoue-Nyangwile separates UI, data, and business responsibilities, then maps component layers and four flow types: display data, user events, requests, and responses. He says each event should form a closed circuit; an open circuit can flag unfinished work or a potential bug.

Use flow analysis to plan work

In the email-change example, an input event updates email state, validation affects the submit button, and a mutation handles the change before navigation on success. Mapping these effects can expose unnecessary state and help divide work by data flow, which he says can reduce Git conflicts and dependencies. The fabrication plan arranges tasks into a dependency graph; one project used it to coordinate five developers across three applications.

Experiments and early feedback

Ngangoue-Nyangwile suggests using the method for technical discussions and component-based frameworks such as React, Angular, and Vue.js. He also proposes an experimental architectural-response measure based on the structures in a component’s data flow, potentially enforced through a VS Code plugin. Feedback he reports includes one developer reducing a task from an hour to 10 minutes after mapping its complexity, and a teammate feeling more confident designing a complex form.

Takeaways

  • Map component structure and data flow before implementation to reveal complexity earlier.
  • Treat an unclosed event flow as a prompt to check for missing work or possible bugs.
  • Separate UI, data access, and business rules to clarify component responsibilities.
  • Use data-flow boundaries to plan parallel work and reduce developer dependencies.
  • Keep proposed performance measures experimental until they are validated.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • role at
    A. Ngangoue-Nyangwile is software engineer at BAM
    “I work as a software engineer at BAM.”
    YouTube
    Unverified1 source· Talk
  • uses
    “It's highly inspired by layered architecture, Clean Architecture, and Atomic Design”
    YouTube
    Unverified1 source· Talk
  • uses
    “It's highly inspired by layered architecture, Clean Architecture, and Atomic Design”
    YouTube
    Unverified1 source· Talk
  • feature
    Component Anatomy: Design process with three steps: layering, data-flow analysis, and a fabrication plan.
    “Component anatomy is a design process with three steps: layering, data flow analysis, and a fabrication plan.”
    YouTube
    Unverified1 source· Talk
  • feature
    Component Anatomy: Helps teams analyze component data flows to distribute work, reduce Git conflicts and dependencies, and support parallel development.
    “Relying on data flow helps minimize the number of Git conflicts, reduce dependencies between both parts, and maximize parallelization between developers.”
    YouTube
    Unverified1 source· Talk
  • feature
    Component Anatomy: Experimental proposal to measure a component's internal performance as its architectural response.
    “It would measure the component’s internal performance.”
    YouTube
    Unverified1 source· Talk
  • metric
    Component Anatomy: An Anta developer at BAM reported reducing coding time from one hour to 10 minutes after drawing component complexity.
    “they were able to reduce their coding time from one hour to 10 minutes”
    YouTube
    Unverified1 source· Talk
  • built
    “it led me to build an approach”
    YouTube
    Unverified1 source· Talk

Related talks