1 of 29

LWC Architecture for Enterprise Apps: �Patterns That Scale Beyond a Single Component

2 of 29

DemoJam Competitors

Silver

Gold

Platinum

Thank You

Our Sponsors

3 of 29

About Me

Michal Bajdek�Tucario

4 of 29

LWC projects don’t fail because of the framework

5 of 29

They fail because of decisions nobody make

6 of 29

They fail because of decisions nobody make

Locker != LWR

7 of 29

Monolith

8 of 29

Chaos

9 of 29

Pivot

Communication

State

Responsibility

10 of 29

How do components communicate ?

No rules / chaos

  • It just happens

Parent–child �Props ↓ /Events ↑

No relation → Global? → LMS / Rethink architecture

CzechDreamin

CzechDreamin

11 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment

Parent–child �Props ↓ /Events ↑

No relation → Global? → LMS / Rethink architecture

CzechDreamin

CzechDreamin

12 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

No relation → Global? → LMS / Rethink architecture

CzechDreamin

CzechDreamin

13 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

  • are these components in a parent-child relationship?

No relation → Global? → LMS / Rethink architecture

CzechDreamin

CzechDreamin

14 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

  • are these components in a parent-child relationship?
  • Props go down

No relation → Global? → LMS / Rethink architecture

CzechDreamin

CzechDreamin

15 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

  • are these components in a parent-child relationship?
  • Props go down
  • Events go up

No relation → Global? → LMS / Rethink architecture

Parent LWC

Child A

Child B

CzechDreamin

CzechDreamin

16 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

  • are these components in a parent-child relationship?
  • Props go down
  • Events go up

No relation → Global? → LMS / Rethink architecture

  • is this communication global? -> LMS

CzechDreamin

CzechDreamin

17 of 29

How do components communicate ?

No rules / chaos

  • It just happens
  • People use whatever works in the moment
  • Nobody understands what’s going on.

Parent–child �Props ↓ /Events ↑

  • are these components in a parent-child relationship?
  • Props go down
  • Events go up

No relation → Global? → LMS / Rethink architecture

  • is this communication global? -> LMS
  • If not -> rethink architecture

CzechDreamin

CzechDreamin

18 of 29

State

Who owns the data ? Where does it live ?

19 of 29

Who owns it and where does it live?

Duplicate data

  • In many projects, every component fetches data on its own

@Wire vs imperative

AI makes decisions

CzechDreamin

CzechDreamin

20 of 29

Who owns it and where does it live?

Duplicate data

  • In many projects, every component fetches data on its own
  • The same data exists in multiple places

@Wire vs imperative

AI makes decisions

CzechDreamin

CzechDreamin

21 of 29

Who owns it and where does it live?

Duplicate data

  • In many projects, every component fetches data on its own
  • The same data exists in multiple places
  • Suddenly your UI becomes inconsistent

@Wire vs imperative

AI makes decisions

CzechDreamin

CzechDreamin

22 of 29

Who owns it and where does it live?

Duplicate data

  • In many projects, every component fetches data on its own
  • The same data exists in multiple places
  • Suddenly your UI becomes inconsistent

@Wire vs imperative

  • And this is not about @wire versus imperative calls. This is about not having a unified data strategy.

AI makes decisions

CzechDreamin

CzechDreamin

23 of 29

Who owns it and where does it live?

Duplicate data

  • In many projects, every component fetches data on its own
  • The same data exists in multiple places
  • Suddenly your UI becomes inconsistent

@Wire vs imperative

  • And this is not about @wire versus imperative calls. This is about not having a unified data strategy.

AI makes decisions

  • AI is making decisions for us if we don’t make them first.

CzechDreamin

CzechDreamin

24 of 29

Responsibility

Who owns the data ? Where does it live ?

25 of 29

Monolith vs Chaos

Single Component does it all

UI, data fetching, business logic, communication… all in one place.

26 of 29

Monolith vs Chaos

Single Component does it all

UI, data fetching, business logic, communication… all in one place.

Split everything into smaller components

logic is now scattered everywhere.

Some of it in the UI…�Some of it in helpers…�Some of it duplicated across components.

27 of 29

Monolith vs Chaos

Single Component does it all

UI, data fetching, business logic, communication… all in one place.

Split everything into smaller components

logic is now scattered everywhere.

Some of it in the UI…�Some of it in helpers…�Some of it duplicated across components.

Loss Of Control

28 of 29

LWC Toolkit

Thank You !

29 of 29

DemoJam Competitors

Silver

Gold

Platinum

Thank You

Our Sponsors