Description
A streamlined approach for the search process, possibilities and configurations.
Possibility to pass possible config and filters to the front end for re-usability. Based on the config, the front end can build a UI with filter options and sort options. This will allow to have a common front end component for each search - reducing UI logic and code duplication.
Outcome of such an approach will provide the following benefits:
De-duplication of logic
Base shared logic (one place for common implementation. Changes here will be available everywhere)
Easier integration for current implementations
Easier integration for additional implementations
Modular and re-usable components
Single source of truth for configuration
Convey configuration to front end and build UI based on this configuration
Proposed solution
Possible Architecture
In essence, a first possible architecture approach is to set it up as follows.
Layers
Resource Layer
Actions:
Receive request
Perform basic validation based on the specified attributes (query, path and body parameters - already done by quarkus)
Pass everything to the service
Get result from the service layer
Return results and requests
Service Layer
Actions:
Receive parameters and id (only for read) (i.e. search(parameters), read(id, parameters))
Description A streamlined approach for the search process, possibilities and configurations. Possibility to pass possible config and filters to the front end for re-usability. Based on the config, the front end can build a UI with filter options and sort options. This will allow to have a common front end component for each search - reducing UI logic and code duplication.
Outcome of such an approach will provide the following benefits:
Proposed solution
Possible Architecture
In essence, a first possible architecture approach is to set it up as follows.
Layers
Resource Layer
Actions:
Service Layer
Actions:
search(parameters), read(id, parameters)
)Data Layer
Actions:
AND
logic (language = "en" AND active = True
)OR
logic (language = "en" OR language = "de"
)Configurations
For this, additional configs have to be in place.
Service
Relevant issues/PRs
First implementation #246
Alternative solution Hard code possible search methods and options per service (duplication of code and logic)