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

Architectures for huge Angular based enterprise applications @ngPoland 2018 in Warsaw

Architectures for huge Angular based enterprise applications @ngPoland 2018 in Warsaw

Contains:
- Monorepo
- Micro Apps w/ Hyperlinks
- Micro Apps w/ Shell

# Monorepo Example
https://github.com/manfredsteyer/monorepo-demo

# Micro Apps Example
https://github.com/manfredsteyer/Angular_MicroApps_Different_Technologies

# More Blog-Articles & Angular Trainings
https://www.softwarearchitekt.at

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer
PRO

November 15, 2018
Tweet

Transcript

  1. @ManfredSteyer Architectures for huge Angular based enterprise applications Manfred Steyer

    SOFTWAREarchitekt.at ManfredSteyer
  2. @ManfredSteyer About me… • Manfred Steyer • SOFTWAREarchitect.io • Angular

    Trainings and Consultancy (Public and In-House) • Google Developer Expert (GDE) Page ▪ 2 Manfred Steyer Get in touch, if you have any question! Public: Vienna, München, Zürich In-House: everywhere http://softwarearchitekt.at/workshops
  3. @ManfredSteyer Ever started a project from the scratch? Kick-off After

    some weeks After some years
  4. @ManfredSteyer Contents 1) npm Packages 2) Monorepo 3) Micro Apps

    4) How to choose?
  5. @ManfredSteyer 1) npm Packages

  6. @ManfredSteyer Why Packages? Sub Project Sub Project Sub Project Sub

    Project Sub Project Sub Project Sub Project Sub Project
  7. @ManfredSteyer Create npm-Packages with CLI >= 6 ng new lib-project

    cd lib-project ng generate library flight-booking-lib ng generate application playground-app ng serve --project playground-app ng build --project flight-booking-lib cd dist/flight-booking-lib npm publish --registry http://...
  8. @ManfredSteyer Advantages • Distribution • Versioning

  9. @ManfredSteyer Disadvantages • Distribution • Versioning ;-)

  10. @ManfredSteyer Disadvantages Distribution • Annoying within project Versioning • Old

    versions • Conflicts • How to force devs to use latest version?
  11. @ManfredSteyer 2) Monorepos

  12. @ManfredSteyer Workspace

  13. @ManfredSteyer Advantages No version conflicts No burden with distributing libs

    Creating new libs: Adding folder Experience: Successfully used at Google, Facebook, …
  14. @ManfredSteyer Moving back and forth Npm Registry

  15. @ManfredSteyer Advantages Sub Project Sub Project Sub Project Sub Project

    Sub Project Sub Project Sub Project Sub Project
  16. @ManfredSteyer Disadvantages Sub Project Sub Project Sub Project Sub Project

    Sub Project Sub Project Sub Project Sub Project
  17. @ManfredSteyer Disadvantages Sub Project Sub Project Sub Project Sub Project

    Sub Project Sub Project Sub Project Sub Project Team A Team B Contract Maintainability? One Architecture/ One Framework
  18. @ManfredSteyer 3) Micro Apps

  19. @ManfredSteyer Idea System

  20. @ManfredSteyer Idea µService µService µService

  21. @ManfredSteyer Idea µApp µApp µApp

  22. @ManfredSteyer

  23. @ManfredSteyer µService Providing a (SPA based) Shell µApp µApp µApp

    Shell ▪ iframes ▪ Bootstrapping several SPAs ▪ Consider Lazy Loading!
  24. @ManfredSteyer DEMO

  25. @ManfredSteyer 4) Choosing a Solution

  26. @ManfredSteyer Some General Advice Shared state, navigation b/w apps Hyperlinks

    Legacy Apps or *very very* strong isolation? iframes Separate Deployment/ mix Technologies? Bootstrap several SPAs Monorepo little much yes no yes no Not a good fit for public web sites
  27. @ManfredSteyer Blog > SOFTWAREarchitekt.at • A Software Architect's Approach Towards

    Using Angular (And SPAs In General) For Microservices Aka Microfrontends • A Lightweight And Solid Approach Towards Micro Frontends (Micro Service Clients) With Angular And/Or Other Frameworks • Micro Apps With Web Components Using Angular Elements
  28. @ManfredSteyer Conclusion Packages: Reuse Monorepo: Structure Micro Apps: Decoupling

  29. @ManfredSteyer Beware the Frankenstein- Monster!!

  30. @ManfredSteyer Contact and Downloads [mail] manfred.steyer@SOFTWAREarchitekt.at [web] SOFTWAREarchitekt.at [twitter] ManfredSteyer

    d Slides & Examples & Requests