{"action":"created","comment":{"url":"https://api.github.com/repos/fluentio/Fluent/pulls/comments/181344761","pull_request_review_id":111955646,"id":181344761,"diff_hunk":"@@ -1,2 +1,199 @@\n-# Fluent\n-A brand new framework to build amazing android applications\n+\n+# Fluent \n+\n+Fluent is a lightweight framework thats helps you to create an entirely Android Application following SOLID pattern with an unidirectional flow reactive or not.\n+\n+The main concepts in this architecture are : `State`, `View`, `Store`, `Job` and `Hub` \n+\n+---\n+>![fluent diagram](https://image.ibb.co/cAXPhH/Screen_Shot_2018_04_11_at_12_09_41.png)\n+---\n+\n+## State\n+\n+We recommend to define one `State` for each one of your screens.\n+\n+It holds just `type() : StateType` and should be inherit to fit your needs. As the example above:\n+\n+```kotlin\n+data class LoginState(val type: StateType = StateType.Initial) : State {\n+  override fun type() = type\n+  fun setType(newType: StateType) = copy(type = newType)\n+}\n+```\n+\n+### StateType\n+\n+We already have some default kind of states, you can create your own type inheriting this class.\n+The default states are: `Initial`, `Loading`, `Success` and `Error`\n+\n+---\n+\n+>For now ahed we can have two kind of approaches with this framework: A non reactive and a total reactive way.\n+\n+## Non reactive way\n+\n+### View\n+\n+### Store\n+\n+### Job\n+\n+### Hub\n+\n+\n+## Reactive way\n+\n+We work with Reactive Extension to follow the Reactive Manifesto\n+\n+### View\n+\n+That's the reference to your screen itself, you should create your kind of `View` that has specific `State` attached. \n+\n+```kotlin\n+interface LoginView : View<LoginState> {\n+  fun doLoginClicks(): Observable<Unit>\n+  fun activityResults(): Observable<Pair<Int, Intent>>\n+}\n+```\n+\n+> Stay aware to think in a way to declare all the user's actions and screen's actions related as `Observable`.\n+\n+Your `Activity` or `Fragment` needs to implement `View`\n+\n+```kotlin\n+class LoginActivity : AppCompatActivity(), LoginView {\n+    override fun bind(newState: LoginState) { ... }\n+}\n+```\n+\n+### RxStore\n+\n+It receives and manages all the possible states of a `View` so you don't need to worry, because we take care about statefulness and performance.\n+\n+To create one you just need to pass an `State` class as parameter and define the related initial state:\n+\n+```kotlin\n+RxStore(LoginState(StateType.Initial))\n+```\n+\n+> `RxStore` is an implementation of `Store` that works with Reactive Extensions\n+\n+The stream created by it can be handled inside the `View` implementation.\n+\n+```kotlin\n+override fun onCreate(savedInstanceState: Bundle?) {\n+    super.onCreate(savedInstanceState)\n+    setContentView(R.layout.activity_login)\n+\n+    store.stateChanges()\n+         .observeOn(AndroidSchedulers.mainThread())\n+         .subscribe { bind(it) }\n+}\n+\n+override fun bind(newState: LoginState) {\n+   when (newState.type) {\n+     StateType.Success -> success()\n+     StateType.Error -> error()\n+     StateType.Loading -> loading()\n+   }\n+}\n+```\n+\n+\n+### RxJob\n+\n+Small units of work separated from the other layers and that warns the `RxStore` layer when the job is finished successfully or not.","path":"README.md","position":108,"original_position":108,"commit_id":"467a015ee9d7a7ed5c432fffa3a2b06abe9ef965","original_commit_id":"467a015ee9d7a7ed5c432fffa3a2b06abe9ef965","user":{"login":"rodrigohenriques","id":6612013,"avatar_url":"https://avatars0.githubusercontent.com/u/6612013?v=4","gravatar_id":"","url":"https://api.github.com/users/rodrigohenriques","html_url":"https://github.com/rodrigohenriques","followers_url":"https://api.github.com/users/rodrigohenriques/followers","following_url":"https://api.github.com/users/rodrigohenriques/following{/other_user}","gists_url":"https://api.github.com/users/rodrigohenriques/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigohenriques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigohenriques/subscriptions","organizations_url":"https://api.github.com/users/rodrigohenriques/orgs","repos_url":"https://api.github.com/users/rodrigohenriques/repos","events_url":"https://api.github.com/users/rodrigohenriques/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigohenriques/received_events","type":"User","site_admin":false},"body":"This first paragraph should also be moved to the first section. We can also improve it. A job is a little piece of work which might look like an atomic operation. It's the only place where you can generate new states and push them to the store. ","created_at":"2018-04-13T10:13:18Z","updated_at":"2018-04-13T10:13:18Z","html_url":"https://github.com/fluentio/Fluent/pull/6#discussion_r181344761","pull_request_url":"https://api.github.com/repos/fluentio/Fluent/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/comments/181344761"},"html":{"href":"https://github.com/fluentio/Fluent/pull/6#discussion_r181344761"},"pull_request":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/fluentio/Fluent/pulls/6","id":181421473,"html_url":"https://github.com/fluentio/Fluent/pull/6","diff_url":"https://github.com/fluentio/Fluent/pull/6.diff","patch_url":"https://github.com/fluentio/Fluent/pull/6.patch","issue_url":"https://api.github.com/repos/fluentio/Fluent/issues/6","number":6,"state":"open","locked":false,"title":"documentation of the reactive way","user":{"login":"haroldolivieri","id":6575718,"avatar_url":"https://avatars3.githubusercontent.com/u/6575718?v=4","gravatar_id":"","url":"https://api.github.com/users/haroldolivieri","html_url":"https://github.com/haroldolivieri","followers_url":"https://api.github.com/users/haroldolivieri/followers","following_url":"https://api.github.com/users/haroldolivieri/following{/other_user}","gists_url":"https://api.github.com/users/haroldolivieri/gists{/gist_id}","starred_url":"https://api.github.com/users/haroldolivieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haroldolivieri/subscriptions","organizations_url":"https://api.github.com/users/haroldolivieri/orgs","repos_url":"https://api.github.com/users/haroldolivieri/repos","events_url":"https://api.github.com/users/haroldolivieri/events{/privacy}","received_events_url":"https://api.github.com/users/haroldolivieri/received_events","type":"User","site_admin":false},"body":"a better documentation of the reactive way with examples.","created_at":"2018-04-13T08:40:41Z","updated_at":"2018-04-13T10:13:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7c46b5c7b6bbfd8fecbc2fb958ba34bad43d511","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ftgoncalves","id":79689,"avatar_url":"https://avatars2.githubusercontent.com/u/79689?v=4","gravatar_id":"","url":"https://api.github.com/users/ftgoncalves","html_url":"https://github.com/ftgoncalves","followers_url":"https://api.github.com/users/ftgoncalves/followers","following_url":"https://api.github.com/users/ftgoncalves/following{/other_user}","gists_url":"https://api.github.com/users/ftgoncalves/gists{/gist_id}","starred_url":"https://api.github.com/users/ftgoncalves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftgoncalves/subscriptions","organizations_url":"https://api.github.com/users/ftgoncalves/orgs","repos_url":"https://api.github.com/users/ftgoncalves/repos","events_url":"https://api.github.com/users/ftgoncalves/events{/privacy}","received_events_url":"https://api.github.com/users/ftgoncalves/received_events","type":"User","site_admin":false},{"login":"rsicarelli","id":3150335,"avatar_url":"https://avatars0.githubusercontent.com/u/3150335?v=4","gravatar_id":"","url":"https://api.github.com/users/rsicarelli","html_url":"https://github.com/rsicarelli","followers_url":"https://api.github.com/users/rsicarelli/followers","following_url":"https://api.github.com/users/rsicarelli/following{/other_user}","gists_url":"https://api.github.com/users/rsicarelli/gists{/gist_id}","starred_url":"https://api.github.com/users/rsicarelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsicarelli/subscriptions","organizations_url":"https://api.github.com/users/rsicarelli/orgs","repos_url":"https://api.github.com/users/rsicarelli/repos","events_url":"https://api.github.com/users/rsicarelli/events{/privacy}","received_events_url":"https://api.github.com/users/rsicarelli/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fluentio/Fluent/pulls/6/commits","review_comments_url":"https://api.github.com/repos/fluentio/Fluent/pulls/6/comments","review_comment_url":"https://api.github.com/repos/fluentio/Fluent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fluentio/Fluent/issues/6/comments","statuses_url":"https://api.github.com/repos/fluentio/Fluent/statuses/467a015ee9d7a7ed5c432fffa3a2b06abe9ef965","head":{"label":"haroldolivieri:patch-1","ref":"patch-1","sha":"467a015ee9d7a7ed5c432fffa3a2b06abe9ef965","user":{"login":"haroldolivieri","id":6575718,"avatar_url":"https://avatars3.githubusercontent.com/u/6575718?v=4","gravatar_id":"","url":"https://api.github.com/users/haroldolivieri","html_url":"https://github.com/haroldolivieri","followers_url":"https://api.github.com/users/haroldolivieri/followers","following_url":"https://api.github.com/users/haroldolivieri/following{/other_user}","gists_url":"https://api.github.com/users/haroldolivieri/gists{/gist_id}","starred_url":"https://api.github.com/users/haroldolivieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haroldolivieri/subscriptions","organizations_url":"https://api.github.com/users/haroldolivieri/orgs","repos_url":"https://api.github.com/users/haroldolivieri/repos","events_url":"https://api.github.com/users/haroldolivieri/events{/privacy}","received_events_url":"https://api.github.com/users/haroldolivieri/received_events","type":"User","site_admin":false},"repo":{"id":129070911,"name":"Fluent","full_name":"haroldolivieri/Fluent","owner":{"login":"haroldolivieri","id":6575718,"avatar_url":"https://avatars3.githubusercontent.com/u/6575718?v=4","gravatar_id":"","url":"https://api.github.com/users/haroldolivieri","html_url":"https://github.com/haroldolivieri","followers_url":"https://api.github.com/users/haroldolivieri/followers","following_url":"https://api.github.com/users/haroldolivieri/following{/other_user}","gists_url":"https://api.github.com/users/haroldolivieri/gists{/gist_id}","starred_url":"https://api.github.com/users/haroldolivieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haroldolivieri/subscriptions","organizations_url":"https://api.github.com/users/haroldolivieri/orgs","repos_url":"https://api.github.com/users/haroldolivieri/repos","events_url":"https://api.github.com/users/haroldolivieri/events{/privacy}","received_events_url":"https://api.github.com/users/haroldolivieri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haroldolivieri/Fluent","description":"Remove inconsistency of your view. Go Fluent","fork":true,"url":"https://api.github.com/repos/haroldolivieri/Fluent","forks_url":"https://api.github.com/repos/haroldolivieri/Fluent/forks","keys_url":"https://api.github.com/repos/haroldolivieri/Fluent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haroldolivieri/Fluent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haroldolivieri/Fluent/teams","hooks_url":"https://api.github.com/repos/haroldolivieri/Fluent/hooks","issue_events_url":"https://api.github.com/repos/haroldolivieri/Fluent/issues/events{/number}","events_url":"https://api.github.com/repos/haroldolivieri/Fluent/events","assignees_url":"https://api.github.com/repos/haroldolivieri/Fluent/assignees{/user}","branches_url":"https://api.github.com/repos/haroldolivieri/Fluent/branches{/branch}","tags_url":"https://api.github.com/repos/haroldolivieri/Fluent/tags","blobs_url":"https://api.github.com/repos/haroldolivieri/Fluent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haroldolivieri/Fluent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haroldolivieri/Fluent/git/refs{/sha}","trees_url":"https://api.github.com/repos/haroldolivieri/Fluent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haroldolivieri/Fluent/statuses/{sha}","languages_url":"https://api.github.com/repos/haroldolivieri/Fluent/languages","stargazers_url":"https://api.github.com/repos/haroldolivieri/Fluent/stargazers","contributors_url":"https://api.github.com/repos/haroldolivieri/Fluent/contributors","subscribers_url":"https://api.github.com/repos/haroldolivieri/Fluent/subscribers","subscription_url":"https://api.github.com/repos/haroldolivieri/Fluent/subscription","commits_url":"https://api.github.com/repos/haroldolivieri/Fluent/commits{/sha}","git_commits_url":"https://api.github.com/repos/haroldolivieri/Fluent/git/commits{/sha}","comments_url":"https://api.github.com/repos/haroldolivieri/Fluent/comments{/number}","issue_comment_url":"https://api.github.com/repos/haroldolivieri/Fluent/issues/comments{/number}","contents_url":"https://api.github.com/repos/haroldolivieri/Fluent/contents/{+path}","compare_url":"https://api.github.com/repos/haroldolivieri/Fluent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haroldolivieri/Fluent/merges","archive_url":"https://api.github.com/repos/haroldolivieri/Fluent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haroldolivieri/Fluent/downloads","issues_url":"https://api.github.com/repos/haroldolivieri/Fluent/issues{/number}","pulls_url":"https://api.github.com/repos/haroldolivieri/Fluent/pulls{/number}","milestones_url":"https://api.github.com/repos/haroldolivieri/Fluent/milestones{/number}","notifications_url":"https://api.github.com/repos/haroldolivieri/Fluent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haroldolivieri/Fluent/labels{/name}","releases_url":"https://api.github.com/repos/haroldolivieri/Fluent/releases{/id}","deployments_url":"https://api.github.com/repos/haroldolivieri/Fluent/deployments","created_at":"2018-04-11T09:42:36Z","updated_at":"2018-04-11T09:42:38Z","pushed_at":"2018-04-13T08:40:11Z","git_url":"git://github.com/haroldolivieri/Fluent.git","ssh_url":"git@github.com:haroldolivieri/Fluent.git","clone_url":"https://github.com/haroldolivieri/Fluent.git","svn_url":"https://github.com/haroldolivieri/Fluent","homepage":"","size":161,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fluentio:master","ref":"master","sha":"c6dc735c8736dacd4cdab14dffd1c6e84930b5a5","user":{"login":"fluentio","id":37229393,"avatar_url":"https://avatars2.githubusercontent.com/u/37229393?v=4","gravatar_id":"","url":"https://api.github.com/users/fluentio","html_url":"https://github.com/fluentio","followers_url":"https://api.github.com/users/fluentio/followers","following_url":"https://api.github.com/users/fluentio/following{/other_user}","gists_url":"https://api.github.com/users/fluentio/gists{/gist_id}","starred_url":"https://api.github.com/users/fluentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluentio/subscriptions","organizations_url":"https://api.github.com/users/fluentio/orgs","repos_url":"https://api.github.com/users/fluentio/repos","events_url":"https://api.github.com/users/fluentio/events{/privacy}","received_events_url":"https://api.github.com/users/fluentio/received_events","type":"Organization","site_admin":false},"repo":{"id":124605010,"name":"Fluent","full_name":"fluentio/Fluent","owner":{"login":"fluentio","id":37229393,"avatar_url":"https://avatars2.githubusercontent.com/u/37229393?v=4","gravatar_id":"","url":"https://api.github.com/users/fluentio","html_url":"https://github.com/fluentio","followers_url":"https://api.github.com/users/fluentio/followers","following_url":"https://api.github.com/users/fluentio/following{/other_user}","gists_url":"https://api.github.com/users/fluentio/gists{/gist_id}","starred_url":"https://api.github.com/users/fluentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluentio/subscriptions","organizations_url":"https://api.github.com/users/fluentio/orgs","repos_url":"https://api.github.com/users/fluentio/repos","events_url":"https://api.github.com/users/fluentio/events{/privacy}","received_events_url":"https://api.github.com/users/fluentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fluentio/Fluent","description":"Remove inconsistency of your view. Go Fluent","fork":false,"url":"https://api.github.com/repos/fluentio/Fluent","forks_url":"https://api.github.com/repos/fluentio/Fluent/forks","keys_url":"https://api.github.com/repos/fluentio/Fluent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fluentio/Fluent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fluentio/Fluent/teams","hooks_url":"https://api.github.com/repos/fluentio/Fluent/hooks","issue_events_url":"https://api.github.com/repos/fluentio/Fluent/issues/events{/number}","events_url":"https://api.github.com/repos/fluentio/Fluent/events","assignees_url":"https://api.github.com/repos/fluentio/Fluent/assignees{/user}","branches_url":"https://api.github.com/repos/fluentio/Fluent/branches{/branch}","tags_url":"https://api.github.com/repos/fluentio/Fluent/tags","blobs_url":"https://api.github.com/repos/fluentio/Fluent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fluentio/Fluent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fluentio/Fluent/git/refs{/sha}","trees_url":"https://api.github.com/repos/fluentio/Fluent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fluentio/Fluent/statuses/{sha}","languages_url":"https://api.github.com/repos/fluentio/Fluent/languages","stargazers_url":"https://api.github.com/repos/fluentio/Fluent/stargazers","contributors_url":"https://api.github.com/repos/fluentio/Fluent/contributors","subscribers_url":"https://api.github.com/repos/fluentio/Fluent/subscribers","subscription_url":"https://api.github.com/repos/fluentio/Fluent/subscription","commits_url":"https://api.github.com/repos/fluentio/Fluent/commits{/sha}","git_commits_url":"https://api.github.com/repos/fluentio/Fluent/git/commits{/sha}","comments_url":"https://api.github.com/repos/fluentio/Fluent/comments{/number}","issue_comment_url":"https://api.github.com/repos/fluentio/Fluent/issues/comments{/number}","contents_url":"https://api.github.com/repos/fluentio/Fluent/contents/{+path}","compare_url":"https://api.github.com/repos/fluentio/Fluent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fluentio/Fluent/merges","archive_url":"https://api.github.com/repos/fluentio/Fluent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fluentio/Fluent/downloads","issues_url":"https://api.github.com/repos/fluentio/Fluent/issues{/number}","pulls_url":"https://api.github.com/repos/fluentio/Fluent/pulls{/number}","milestones_url":"https://api.github.com/repos/fluentio/Fluent/milestones{/number}","notifications_url":"https://api.github.com/repos/fluentio/Fluent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fluentio/Fluent/labels{/name}","releases_url":"https://api.github.com/repos/fluentio/Fluent/releases{/id}","deployments_url":"https://api.github.com/repos/fluentio/Fluent/deployments","created_at":"2018-03-09T23:43:36Z","updated_at":"2018-04-09T11:17:31Z","pushed_at":"2018-04-13T08:40:43Z","git_url":"git://github.com/fluentio/Fluent.git","ssh_url":"git@github.com:fluentio/Fluent.git","clone_url":"https://github.com/fluentio/Fluent.git","svn_url":"https://github.com/fluentio/Fluent","homepage":"","size":157,"stargazers_count":6,"watchers_count":6,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/6"},"html":{"href":"https://github.com/fluentio/Fluent/pull/6"},"issue":{"href":"https://api.github.com/repos/fluentio/Fluent/issues/6"},"comments":{"href":"https://api.github.com/repos/fluentio/Fluent/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fluentio/Fluent/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/fluentio/Fluent/statuses/467a015ee9d7a7ed5c432fffa3a2b06abe9ef965"}},"author_association":"NONE"}}
{"actor":{"display_login":"rodrigohenriques"}}