You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FilterOperation class is an enum with no interface. A lot of code surrounding filtering explicitly depends on this enum. This makes it very difficult to add filter operations. Additionally, ApiRequest is a concrete class that is tightly couple with many higher level classes. Because ApiRequest represents an assumed-to-be constant set of data, it being a concrete class is not that big of an issue. However, it has a constructor for building itself out of the query parameter string of the filter clause of the API request. higher level classes depending on this constructor has become an issue blocking easy extendability. FilterOperation is also tightly coupled to ApiRequest, and both are tightly coupled with druid filter builds and search providers.
The solution is to extract an interface for FilterOperation, and have all classes that currently refer to the implementation instead refer to the interfaces.
For ApiRequest, it should be turned into a data object, and it should be created by a factory that is injected into the the class that would otherwise be handling its construction.
The text was updated successfully, but these errors were encountered:
The
FilterOperation
class is an enum with no interface. A lot of code surrounding filtering explicitly depends on this enum. This makes it very difficult to add filter operations. Additionally,ApiRequest
is a concrete class that is tightly couple with many higher level classes. BecauseApiRequest
represents an assumed-to-be constant set of data, it being a concrete class is not that big of an issue. However, it has a constructor for building itself out of the query parameter string of the filter clause of the API request. higher level classes depending on this constructor has become an issue blocking easy extendability.FilterOperation
is also tightly coupled toApiRequest
, and both are tightly coupled with druid filter builds and search providers.The solution is to extract an interface for
FilterOperation
, and have all classes that currently refer to the implementation instead refer to the interfaces.For
ApiRequest
, it should be turned into a data object, and it should be created by a factory that is injected into the the class that would otherwise be handling its construction.The text was updated successfully, but these errors were encountered: