Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

intelliware-coe-web/sample-angular-stream-io

Repository files navigation

SampleAngularStreamIo

Sample Angular Application using Stream I/O patterns. This is a good pattern to adopt, but not subscribe.

Notes:

  1. HTML > JS
  2. Use a component library!
  3. Containers are components that compose components. They should be responsible for passing data between effects and components.
  4. Services should contain functions that take in an input observable called a Source and return output observables called a Sink.
  5. Most components should be readonly and presentational. Components should take in values.
  6. Separate infrastructure from domain. Domain services that request "side effects" are known as effects.
  7. Effects should be the only things interacting with infrastructure.
  8. Testing is painful. Less JS, less testing.
  9. Don't use tap or subscribe. Async provides performance improvements too!
  10. Angular Upgrade should only affect Infrastructure components
    1. Presentational components mostly immune due to simplicity.
    2. Effects mostly immune due as they are purely functional, but interactions with infrastructure may require changes.
    3. Containers immune due to interaction with domain effects and domain models.
  11. Try to keep things as single responsible as possible. See hideSpinner$ coupling.
  12. Avoid passing around Subjects, convert them to observables with asObservables.

Data Flow

stream i/o sequence

Upon inspection, the arrows are pointing the wrong way. Gotta fix this!

Questions

  1. Can we avoid Subjects completely by interacting with the EventEmitters directly and avoiding the callbacks?

About

Sample Angular.io application using Stream I/O patterns

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published