Leanpub Header

Skip to main content

Enterprise Angular: Micro Frontends and Moduliths with Angular

Module Federation - Nx - DDD

Important: Book moved!

This book moved to our website at ANGULARarchitects.io. Please also register here to get notified about news versions:

Download book or register to get notified after updates!

---

Learn how to subdivide a huge application into smaller and hence maintainable parts with Domain Driven Design, Nx Monorepos and Micro Frontends.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
About

About

About the Book

Important: Book moved!

This book moved to our website at ANGULARarchitects.io. Please also register here to get notified about news versions:

Download book or register to get notified after updates!

---

In the last years, I've helped numerous companies with implementing Angular based large scale enterprise applications. To handle the complexity of such applications, it's vital to decompose the whole system into smaller libraries. 

However, if you end up with lots of libraries which are too much intermingled with each other, you don't win much. If everything depends on everything else, you cannot easily change or extend your system without introducing breaking changes.

Domain-driven Design, esp. it's discipline strategic design helps with this and it also can be the foundation for building micro frontends.

In this book, which bases upon several blog articles I've written about Angular, DDD, and Micro Frontends, I show how to use these ideas. 

Workshops and Consultancy

If you are interested into on-site workshops or consultancy for your Angular projects, feel free to reach out to us. You find further information here.

Price

Pick Your Price...

Minimum price

$20.00

$20.00

You pay

$20.00

Author earns

$16.00
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 2)

2
The author will earn $24.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Manfred Steyer

Trainer, consultant and programming architect with focus on Angular. Google Developer Expert (GDE) and Trusted Collaborator in the Angular team who writes for O'Reilly, the German Java Magazine, and windows.developer. Regularly speaks at conferences.

Provides Angular workshops and consultancy.

Contents

Table of Contents

Introduction

  1. Structure of This Book
  2. Trainings and Consultancy
  3. Help to Improve this Book!
  4. Thanks

Strategic Domain-Driven Design

  1. What is Domain-Driven Design?
  2. Finding Domains with Strategic Design
  3. Domains are Modelled Separately
  4. Context-Mapping
  5. Sub Domains vs. Bounded Contexts
  6. Team Topologies and Strategic Design
  7. Conclusion

Architectures with Sheriff and Standalone Components

  1. The Architecture Matrix
  2. Project Structure for the Architecture Matrix
  3. Enforcing your Architecture with Sheriff
  4. Lightweight Path Mappings
  5. Conclusion

Build Performance with Nx

  1. Incremental Builds – Getting Started
  2. More comfortable and more powerful: Nx
  3. Incremental Builds with Nx
  4. Side Note: Micro Frontends
  5. Distributed Cache with Nx Cloud
  6. Even Faster: Parallelization with Nx Cloud
  7. Conclusion

Nx & Sheriff - Friends for Life

  1. Module Boundaries in Nx
  2. Recap: Different Types of Boundaries
  3. Options with Sheriff
  4. Conclusion

From Domains to Micro Frontends

  1. Deployment Monoliths
  2. Micro Frontends
  3. UI Composition with Hyperlinks
  4. UI Composition with a Shell
  5. The Hero: Module Federation
  6. Finding a Solution
  7. Consequences of Micro Frontends
  8. Conclusion

The Micro Frontend Revolution: Using Module Federation with Angular

  1. Example
  2. Activating Module Federation for Angular Projects
  3. The Shell (aka Host)
  4. The Micro Frontend (aka Remote)
  5. Trying it out
  6. A Further Detail
  7. More Details: Sharing Dependencies
  8. More on This
  9. Conclusion and Evaluation

Dynamic Module Federation

  1. A Simple Dynamic Solution
  2. Going “Dynamic Dynamic”
  3. Some More Details
  4. Conclusion

Plugin Systems with Module Federation: Building An Extensible Workflow Designer

  1. Building the Plugins
  2. Loading the Plugins into the Workflow Designer
  3. Providing Metadata on the Plugins
  4. Dynamically Creating the Plugin Component
  5. Wiring Up Everything
  6. Conclusion

Using Module Federation with Nx Monorepos and Angular

  1. Multiple Repos vs. Monorepos
  2. Multiple Repositories: Micro Frontends by the Book
  3. Micro Frontends with Monorepos
  4. Monorepo Example
  5. The Shared Lib
  6. The Module Federation Configuration
  7. Trying it out
  8. Isolating Micro Frontends
  9. Incremental Builds
  10. Deploying
  11. Conclusion

Dealing with Version Mismatches in Module Federation

  1. Example Used Here
  2. Semantic Versioning by Default
  3. Fallback Modules for Incompatible Versions
  4. Differences With Dynamic Module Federation
  5. Singletons
  6. Accepting a Version Range
  7. Conclusion

Multi-Framework and -Version Micro Frontends with Module Federation

  1. Pattern or Anti-Pattern?
  2. Micro Frontends as Web Components?
  3. Do we also need Module Federation?
  4. Implementation in 4 steps

Pitfalls with Module Federation and Angular

  1. “No required version specified” and Secondary Entry Points
  2. Unobvious Version Mismatches: Issues with Peer Dependencies
  3. Issues with Sharing Code and Data
  4. NullInjectorError: Service expected in Parent Scope (Root Scope)
  5. Several Root Scopes
  6. Different Versions of Angular
  7. Bonus: Multiple Bundles
  8. Conclusion

Module Federation with Angular’s Standalone Components

  1. Router Configs vs. Standalone Components
  2. Initial Situation: Our Micro Frontend
  3. Activating Module Federation
  4. Static Shell
  5. Alternative: Dynamic Shell
  6. Bonus: Programmatic Loading

From Module Federation to esbuild and Native Federation

  1. Native Federation with esbuild
  2. Native Federation: Setting up a Micro Frontend
  3. Native Federation: Setting up a Shell
  4. Exposing a Router Config
  5. Communication between Micro Frontends
  6. Conclusion

The new NGRX Signal Store for Angular: 3 + n Flavors

  1. Getting the Package
  2. Flavor 1: Lightweight with signalState
  3. Side Effects
  4. Flavor 2: Powerful with signalStore
  5. Custom Features - n Further Flavors
  6. Flavor 3: Built-in Features like Entity Management
  7. Conclusion

Smarter, Not Harder: Simplifying your Application With NGRX Signal Store and Custom Features

  1. Goal
  2. DataService Custom Feature
  3. Implementing A Generic Custom Feature
  4. Providing a Fitting Data Service
  5. Undo/Redo-Feature
  6. Using the Store in a Component
  7. Conclusion and Outlook

NGRX Signal Store Deep Dive: Flexible and Type-Safe Custom Extensions

  1. A Simple First Extension
  2. Now it Really Starts: Typing
  3. Typing and Dynamic Properties – How do They Work Together?
  4. More Examples: CRUD and Undo/Redo
  5. Out of the Box Extensions
  6. Conclusion

The NGRX Signal Store and Your Architecture

  1. Where to Put it?
  2. Combining the Signal Store With the Traditional NGRX Store
  3. The Best of Both Worlds via Custom Features
  4. How Large Should a Signal Store be?
  5. May a Signal Store Access Other Signal Stores?
  6. Preventing Cycles, Redundancies, and Inconsistencies
  7. Conclusion

Bonus: Automate your Architecture with Nx Workspace Plugins

  1. Creating a Workspace Plugin With a Generator
  2. Templates for Generators
  3. Implementing a Generator
  4. True Treasures: Helper Methods for Generators in Nx
  5. Trying out Generators
  6. Testing Generators
  7. Exporting Plugins via NPM
  8. Conclusion

Bonus: The Core of Domain-Driven Design

  1. DDD in a Nutshell
  2. How to Define DDD?
  3. When Can we Call it DDD?
  4. What’s the Core of DDD and Why did People get a Wrong Impression About that?
  5. Is Tacticial Design Object-Oriented? Is There a Place for FP?
  6. Further Adaptions of Tactical Design
  7. Conclusion

Literature

About the Author

Trainings and Consulting

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub