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

Object Mapping Strategy #3

Merged
merged 40 commits into from
Jan 30, 2023
Merged

Object Mapping Strategy #3

merged 40 commits into from
Jan 30, 2023

Conversation

symorton
Copy link
Contributor

@symorton symorton commented Dec 15, 2022

Problem:

  • There needs to be a way to map VCSDK data models to the new Wallet Libraries.
  • The Services layer in the VCSDK needs to be able to use the built in async functionality instead of PromiseKit.

Solution:

  • This PR introduces a Mapping strategy. The new Mapper class maps any object that conforms to the Mappable protocol into a new object.
  • By extending VCSDK/VCEntities data models to conform to Mappable, we can use the mapper class to easily map these VCSDK data models to the new ones.
  • The Presentation Service was also extended to conform to Presentation Serviceable protocol that uses Swift async functionality to get requests and send responses. A utility class called AsyncWrapper was created to wrap and PromiseKit function in an async function.

Validation:

  • Units tests created and all tests pass.

Type of change:

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk:

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Work Item links:
Please include here links for this work item, or deferred work, or related work. E.g. if the refactoring is too big to fit in this PR, or the localized strings need to be updated later, please link the TODO work items here.

Documentation Links:
Please include here links to any related background documentation for this PR.

@symorton symorton merged commit 9fa4327 into dev Jan 30, 2023
@symorton symorton deleted the symorton/objectMappingStrategy branch January 30, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants