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

Replacing Cupboard with Room #29

Merged
merged 3 commits into from
Feb 21, 2019
Merged

Replacing Cupboard with Room #29

merged 3 commits into from
Feb 21, 2019

Conversation

cortinico
Copy link
Member

Took some time but I managed to remove Cupboard completely :)
Unfortunately the Pull Request is pretty big :( Let me know if I should split it somehow to make it easier to review.

Summary of changes:

  • Removed all the usage
  • Removed the Content Provider
  • Removed the DbOpenHelper
  • Updated entities to be Kotlin Data classes
  • Introduced the Repository pattern (this will allow other devs to swap Room with something else, e.g. Realm, InMemoryRepository, etc.).
  • Removed several static refences to Context 🤣
  • Removed all the nested CursorAdapters

@cortinico cortinico self-assigned this Jan 14, 2019
Copy link
Member

@olivierperez olivierperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've finished :-)
Don't hesitate to ask or to say no if I said something wrong or weird.

}

val requestDateString: String?
get() = requestDate?.toString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is an entity, it shouldn't be in charge of formatting values. Same for responseDateString, durationString, etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this can easily be removed. The problem is unfortunately wider.
So far I tried to make sure HttpTransaction.kt had a similar api with HttpTransaction.java.

I'll say we can probably refactor all this stuff outside of the data class and have it inside say FormatUtils?
I'll anyway keep those refactorings outside of this PR.

@olivierperez olivierperez added the infra Issue or pull request relate to the library infrastructure (CI, Release mgmt, etc.) label Jan 31, 2019
@cortinico
Copy link
Member Author

Hey @olivierperez so I've addressed all your comments + left a couple of questions.
The PR should be good to go IMHO

@cortinico cortinico merged commit a97e19e into develop Feb 21, 2019
@cortinico cortinico deleted the room branch February 21, 2019 10:25
@cortinico cortinico added this to the 3.0.0 milestone Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Issue or pull request relate to the library infrastructure (CI, Release mgmt, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants