Skip to main content
added 156 characters in body
Source Link
Christophe
  • 80.6k
  • 11
  • 132
  • 199

It depends on your design intention:

  • If ApplicationStateApplicationState and DimensionDimension address different concernsdifferent concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationStateApplicationState is just there for using a DimensionDimension with another interface/protocol, then it is an adapteradapter and is also fine.

  • If ApplicationStateApplicationState is nothing else than a specialized DimensionDimension, then this might be overkill.

To make up your design decision, you should also be a areaware that a lotlots of appState.dim.dimOperation()appState.dim.dimOperation() creates a de facto coupling that works well in practice but makes the code difficult to maintain (see also principle of least knowledge).

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make up your design decision, you should also be a are that a lot of appState.dim.dimOperation() creates a de facto coupling that works well in practice but makes the code difficult to maintain (see also principle of least knowledge).

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make up your design decision, you should also be aware that lots of appState.dim.dimOperation() creates a de facto coupling that works well in practice but makes the code difficult to maintain (see also principle of least knowledge).

added 152 characters in body
Source Link
Christophe
  • 80.6k
  • 11
  • 132
  • 199

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make up your design decision, clarify your intent and define good and bad in viewyou should also be a are that a lot of this goalappState. There’s no such thing asdim.dimOperation() creates a silver bullet herede facto coupling that works well in practice but makes the code difficult to maintain (see also principle of least knowledge).

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make your decision, clarify your intent and define good and bad in view of this goal. There’s no such thing as a silver bullet here.

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make up your design decision, you should also be a are that a lot of appState.dim.dimOperation() creates a de facto coupling that works well in practice but makes the code difficult to maintain (see also principle of least knowledge).

Source Link
Christophe
  • 80.6k
  • 11
  • 132
  • 199

It depends on your design intention:

  • If ApplicationState and Dimension address different concerns and may evolve due to different reasons, then it is fine.

  • Likewise, if ApplicationState is just there for using a Dimension with another interface/protocol, then it is an adapter and is also fine.

  • If ApplicationState is nothing else than a specialized Dimension, then this might be overkill.

To make your decision, clarify your intent and define good and bad in view of this goal. There’s no such thing as a silver bullet here.