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

[Don't merge] Fetch data / データの取得の実装例 #15

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tomoya0x00
Copy link
Contributor

@tomoya0x00 tomoya0x00 commented Dec 29, 2018

Read the Fetch data article. / データの取得をご参照

  • Stop calling HackerNewsApi directly from the Activity
  • Activity calls Repository instead
    • Only the Repository should call HackerNewsApi directly
  • Strongly recommend implementing a Mapper
    • Both the story and comments are retrieved from the same WebAPI
  • Repository can be a singleton
    • object HackerNewsRepository {}

@@ -0,0 +1,7 @@
package droidkaigi.github.io.challenge2019.data.repository

sealed class Resource<T> {
Copy link
Contributor Author

@tomoya0x00 tomoya0x00 Dec 29, 2018

Choose a reason for hiding this comment

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

@tomoya0x00 tomoya0x00 changed the title [Don't merge][WIP] Repositoryパターンの導入実装例 [Don't merge] Repositoryパターンの導入実装例 Dec 29, 2018
@tomoya0x00
Copy link
Contributor Author

#14 のマージ後に弄らないといけないからWIPだ。

@tomoya0x00 tomoya0x00 changed the title [Don't merge] Repositoryパターンの導入実装例 [Don't merge][WIP] Repositoryパターンの導入実装例 Dec 29, 2018
@tomoya0x00
Copy link
Contributor Author

#14 をmasterにマージしたので、本ブランチはリベースして push -f した。

@tomoya0x00
Copy link
Contributor Author

ArticlePreferencesは #18 で供養を検討するとして、このプルリクでは手を着けない。

@tomoya0x00 tomoya0x00 changed the title [Don't merge][WIP] Repositoryパターンの導入実装例 [Don't merge] Repositoryパターンの導入実装例 Dec 30, 2018
@tomoya0x00 tomoya0x00 changed the title [Don't merge] Repositoryパターンの導入実装例 [Don't merge] Repositoryパターンの導入例 Jan 3, 2019
@tomoya0x00 tomoya0x00 changed the title [Don't merge] Repositoryパターンの導入例 [Don't merge] データの取得の導入例 Jan 14, 2019
@tomoya0x00 tomoya0x00 changed the title [Don't merge] データの取得の導入例 [Don't merge] データの取得の実装例 Feb 1, 2019
@tomoya0x00 tomoya0x00 changed the title [Don't merge] データの取得の実装例 [Don't merge] Fetch data / データの取得の実装例 Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant