Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple, prioritized Selectors #74

Closed
stohn777 opened this issue Mar 9, 2023 · 1 comment
Closed

Multiple, prioritized Selectors #74

stohn777 opened this issue Mar 9, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@stohn777
Copy link
Collaborator

stohn777 commented Mar 9, 2023

Background

FFLIB and AT4DX offer many features that enable the development of applications using SOLID principles and facilitate very precises unit testing. However in non-productions environments, sometimes the application doesn't have data that would be available in Production and that data cannot be added to the SObject because of valid platform limitations. Therefore having the ability to override canonical logic with non-production substitutes is needed, providing development, testing, demonstrations, and other non-production activities a better representation of the intended business experience.

Reference

Solution Concept

Currently the binding logic prohibits multiple bindings for the same SObject.

  1. Remove the logic prohibiting bindings for the same SObject.
  2. Like the Domain-process-injection and Unit-of-Work bindings, provide a prioritization field. Null would correspond to the lowest priority.

In a non-production environment, engineers may deploy substitute selectors, having a higher priority, effectively overriding the canonical selector.

Illustration

Consider this use case where the application's canonical LoginHistory selector would not have any data supporting the business logic. With this enhancement in non-production environments, engineers could deploy a higher-priority Selector that acquires representative data from a different source, enable developers and non-production users the intended application experience.

image

@stohn777
Copy link
Collaborator Author

Pull Request #77

ImJohnMDaniel added a commit that referenced this issue May 22, 2023
…zed-selectors

Multiple, Prioritized Selectors (Issue #74)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants