View Facades + RxJS!

Thomas Burleson
Angular In Depth
Published in
9 min readFeb 5, 2019

--

AngularInDepth is moving away from Medium. More recent articles are hosted on the new platform inDepth.dev. Thanks for being part of indepth movement!

You may not need to use NgRx or NgXs in your application. But you should use Facades + RxJS in your application! Let’s explore why, where, and how…

As part of my professional focus, I invest 10% of time training Angular developers around the world. And in every workshop, I tell the attending developers the following three (3) axioms:

  • RxJS is the most important ‘thing’ to master in your career
  • NgRx is the most difficult ‘thing’ to apply properly in applications
  • NgRx is the most fulfilling ‘thing’ to use in real-world applications

Before you learn about NgRx, first make sure you have a solid RxJS foundation. And before you actually use NgRx, make sure to understand the impact and benefits to your code.

Now — with that said — you also may have heard from Aaron Frost, Mike Ryan, Brandon, or even Thomas Burleson (me) that “You may not need NgRx!

RxJS Magic Powers

The Facade pattern is used to hide behind-the-scenes complexity. One might implement a Facade to manage multiple services… But reduced to its essence a Facade is itself a Service.

Traditionally developers will build custom Services with methods/API for data lookups. View components will inject these services and show business data…

--

--

Thomas Burleson
Angular In Depth

Solutions architect expert in NextJS, React and Angular solutions. Formerly a Principal Architect @ Nrwl.io, Team Lead for Angular, Google.