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

Long-term architecture for supporting different providers #71

Open
Arithmomaniac opened this issue May 2, 2018 · 1 comment
Open

Long-term architecture for supporting different providers #71

Arithmomaniac opened this issue May 2, 2018 · 1 comment

Comments

@Arithmomaniac
Copy link
Collaborator

As mentioned in #70 , it may be time to start thinking about how we want to support multiple providers in the long run. I was thinking something as follows:

  1. There would be a base Gravity.Base project/package that would contain BaseDto, relevant helper methods, and an IGravity(Async)Repository interface containing a basic CRUD contract for all implementations. This would correspond to, e.g. RsapiDao now.
  2. Each implementation would get its own Nuget project/package, to prevent needing tons of dependencies (e.g. Gravity.RSAPI).
    • Each package would have the IGravity(Async)Repository implementation, which in turn would in turn take a thin provider to abstract away calls to and from the server (e.g. RsapiDao would be renamed RsapiRepository would have an RsapiProvider similar to the one in #3 create RsapiProvider #70).
    • The repository itself would handle issues like field mapping, recursive calls, etc.
  3. To implement IGravityRepository.Query, each provider would need to include a LINQ Provider, as per LINQ Provider #12. We could have missing implementations throw NotSupportedException, create a separate IQueryableGravityRepository implementation, or just leave Query out of the base interface.

If this sounds right, we can decide how we'd like to create a project around it.

@Arithmomaniac Arithmomaniac added the area/provider Relates to DAO/Provider implementations label Jun 8, 2018
@mrobustelli mrobustelli moved this from To do to Prioritized in Issue Prioritization Sep 24, 2018
@Arithmomaniac
Copy link
Collaborator Author

Related to #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issue Prioritization
  
Prioritized
Development

No branches or pull requests

1 participant