DJCordhose / frontend-monorepo

showcase and playground for web frontend architecture
MIT License
2 stars 0 forks source link

Showcase: React for business applications

lerna

Given the typical technical and structural requirements of a business application what are the recommended technology choices and architectural nuggets?

Architecture / Tech

This is my recommended tech stack for a typical enterprise application. Underlying assumptions of most important requirements

http://blog.embarc.de/spicker/#9

Is architecture just clueless talking and useless Visios? (Well, it can be...)

Architecture is the sum of the important Processes, Structures, Patterns, Architectural Nuggets and Frameworks. Important can mean

Architecture

Idea of Architectural Nuggets taken from: https://pkruchten.files.wordpress.com/2020/06/kruchten-2020-northrop-award.pdf

Also from Kruchten: The life of a software architect is a long and sometimes painful succession of suboptimal decisions taken partly in the dark.

Definition of architecture inspired by: https://martinfowler.com/architecture/

Most important Architectural decisions

Framework

Macro-Structure of modules and dependencies

Development in a monorepo (multi-package repositories)

Build your own lib

Micro Frontends

Micro-Structure within a module / Modular Monolith

Structure module into features

Separate components into smart and dumb

Component Size and structure

Code Splitting

Routing

State Management

this is all about flow of control and data

Context

Redux

Redux Toolkit (RTK)

MobX

What's next?

MobX vs. Redux (inspired by Nils Hartmann)

Testing

Dedicated document

Styling

Options for writing styles

Tooling

Typing

Less important technical recommendations

Component Style (classes vs functional components w/ hooks)

i18n, l10n

Build / Deployment

Component Libraries

Performance

Create React App

Creation

Tooling and Integration

When CRA starts to become limiting

Options

  1. eject and ajust config by hand
    • this will feel worse and worse over time
  2. build your own react-template or scripts
  3. https://www.npmjs.com/package/react-app-rewired
  4. write a post-install-script for npm that adjusts the webpack config in node_modules/react-scripts
    • this is only a temporary solution, at the same time open issue and hope for fix