Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Angular Architecture Revisited Modernizing Angu...

Angular Architecture Revisited Modernizing Angular Architectural Patterns

When I started using Angular in 2018, most architectural "rules" were already set in stone: Smart vs. Dumb components, isolated domains, and shared modules.
For years, these patterns have stood the test of time. But do they fit the simplicity of Modern Angular?
In this talk, we will put these patterns on trial. We will analyze where the classic approaches hold us back and where they still add value.
Then, we will look forward. We will discuss how Modern Angular enables new, simplified patterns, draw comparisons with how other frameworks handle state and composition, and review the tools that support this shift. Join me for a refreshing take on how to structure your next application

Avatar for Rainer Hahnekamp

Rainer Hahnekamp

April 25, 2026

More Decks by Rainer Hahnekamp

Other Decks in Technology

Transcript

  1. About Me... https://www.youtube.com/ @RainerHahnekamp https://www.ng-news.com • Rainer Hahnekamp • ANGULARarchitects.io

    • NgRx Core Team • Developer / Trainer / Speaker @RainerHahnekamp Open Source Projects NgRx Toolkit Testronaut NgRx Sheriff
  2. Shared Forms Grid Error Handling Widgets Backend Middleware ... App

    Shell Domain (Holidays ) Domain (Customers) Domain (Bookings) Domain (Diary) Layer 1 - Domain modules
  3. RainerHahnekamp Layer 1 • Shell ◦ Minimum to start application

    ◦ Header, footer, main area ◦ Core services • Domains ◦ Isolated ◦ Minimum of communication • Shared ◦ Different types ◦ Forms, UI, Services, Grids, etc. ◦ Domains use them
  4. RainerHahnekamp Layer 2 • Features ◦ Drives the Use case

    ◦ Is on top of the domain ◦ UI components are always reusable/generic • Domain ◦ Domain Models ◦ Services for backend ◦ Logic
  5. RainerHahnekamp *Container Components • Least Possible Template • Reading from

    Store • Dispatching to Store • Least Possible Typescript • No Dependency Injection, only @Input and @Output • No Observables! customers- container add-container input() output() *Presentational Components customers customer edit-container *Also known as • Smart & Dumb Components • Feature & UI components
  6. RainerHahnekamp Container & Presentational Components • Advantages ◦ Works always

    ◦ Clear separation of concerns • Disadvantages ◦ Overhead / Dogmatic Overuse ◦ Proxy Container Components
  7. RainerHahnekamp Domain with multiple features Quiz Data UI Model Shop

    Data UI Model Holidays Core Data UI Model This is lightweight???
  8. RainerHahnekamp • Ideas from hexagonal architecture • UI is an

    adapter of the state • Store the center Younes Jaaidi The state is the domain
  9. RainerHahnekamp Switching the perspective Feature Container UI Component Presentational Data

    Store Store does ALL the logic Feature Container UI Component Presentational Data Store Container as mapper between Store & UI
  10. RainerHahnekamp Switching the perspective Feature Container UI Component Presentational Data

    Store Feature Container UI Component Presentational Data Store Store does ALL the logic Feature Container UI Component Presentational Data Store Container as mapper between Store & UI
  11. RainerHahnekamp Switching the perspective Feature Container UI Component Presentational Data

    Store Role of Container??? Feature Container UI Component Presentational Data Store Store does ALL the logic Feature Container UI Component Presentational Data Store Container as mapper between Store & UI
  12. RainerHahnekamp A modern/lightweight approach (Store as Hooks?) Feature Container UI

    Component Presentational Data Store Component Component Component Store
  13. RainerHahnekamp Container & Presentational ✅ Works always ✅ Clear separation

    of concerns ⛔ Overhead / Dogmatic Overuse ⛔ Proxy Container Components Store & Components ✅ Works always ✅ Clear separation of concerns ✅ No Overhead / Simple ✅ No Proxy Containers
  14. RainerHahnekamp Old wine in a new bottle? • New Implications

    • Architecture based on heavyweight stores ◦ Container Component as mediator • Component hierarchies still exist ◦ All with same role • Feature Component as Route-assigned component