Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Standardize constructors in Serenity #141

Open
skonefal opened this issue Feb 1, 2016 · 0 comments
Open

Standardize constructors in Serenity #141

skonefal opened this issue Feb 1, 2016 · 0 comments

Comments

@skonefal
Copy link
Contributor

skonefal commented Feb 1, 2016

Our current filter's constructors and pipelines are messy. They accept a lot of parameters, have a lot of parameters defaulted and it's hard to what do they mean. It is also hard to recognize how our pipelines are created.
I would like to propose a standardization:

Each component would expose an API:

  • Zero-parameter constructor to initialize default component (it should have best parameters that we know)
  • Constructor that accept SerenityConfig. Parameter default values would be overwritten by those in SerenityConfig. It should be used to expose configuration to operators in the future.
  • Set of "setters" to expose what parameters can be changed "in code"
  • If filter is designed to use dependency injection (like QoS Controller or Smoothing filter), it should accept DI object in both constructors (but no configuration for it)

For pipeline, we should move from 'constructor initialization list' to constructor body and create a pipeline in logical "phases" to make it easier to read and understand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant