Skip to content

Conversation

@Uuttssaavv
Copy link
Owner

@Uuttssaavv Uuttssaavv commented Mar 7, 2023

Clean architecture provides a clear separation of concerns, encourages the use of interfaces and abstractions, and facilitates changes in the dependencies without affecting the core logic of the application.
This makes it easier to maintain, test, and extend the system over time.

With clean architecture, you can replace the SharedPreferences with Hive without affecting the core logic of the application. You would simply need to modify the data access layer, which is responsible for interacting with the data storage system. By swapping out the SharedPreferences implementation with the Hive implementation, you can change the data storage system without affecting the rest of the application.

In this PR, we simply changed the implementation and test files to change the data storage system without affecting the core logic of the application.

@WojuadeAA
Copy link

i think this should be on a separate branch?

@tariq235
Copy link

tariq235 commented May 6, 2023

Regarding the security aspect, would storing the user token in the keychain be a better option? I believe the user token should be stored in the keychain for enhanced security, while the remaining data could be stored in Hive. What are your thoughts on this approach?

@Uuttssaavv
Copy link
Owner Author

Regarding the security aspect, would storing the user token in the keychain be a better option? I believe the user token should be stored in the keychain for enhanced security, while the remaining data could be stored in Hive. What are your thoughts on this approach?

Yes, for the sensitive information.
But, the thing I am trying to demonstrate here is how we can switch between the dependencies :)

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.

4 participants