{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/60156740","id":60156740,"diff_hunk":"@@ -1,90 +1,90 @@\n >* 原文链接 : [RxJava – the production line](http://www.thedroidsonroids.com/blog/android/rxjava-production-line/)\n * 原文作者 : [Mateusz Budzar]()\n * 译文出自 : [掘金翻译计划](https://github.com/xitu/gold-miner)\n-* 译者 : \n+* 译者 : [Sausure](https://github.com/Sausure)\n * 校对者:\n \n \n \n-## Why another RxJava example?\n+##  为什么另写一篇 RxJava 的文章?\n \n-There are a lot of [RxJava](https://github.com/ReactiveX/RxJava) articles with examples which explains what it is and how to use it. But mostly there is just a code. Even if there is also an explanation through the analogy, the most popular word is a ‘stream’. Usually the code example is just perfect (we are programmers, right?), but RxJava is very different from what we do daily during Android development. The code is not enough in the beginning to understand it. Stream is not enough. Even [marbles](http://rxmarbles.com/) examples are not enough. I can speak for my own, but guys, to be honest, didn’t you need more examples by analogy i.e. to some kind of reality? Didn’t you create one in your head to understand the RxJava way better? I did and I want to share it with you.\n+已经有很多[ RxJava ](https://github.com/ReactiveX/RxJava)的文章通过例子阐述了什么是 RxJava 以及怎么去用，但它们大多数只有代码。虽然也会通过类比来解释，例如最出名的就是“流”。通常情况下代码能完美地让人理解（我们都是程序员，不是么？），但是 RxJava 十分不同于以往的 Android 开发。在最开始时通过代码是很难让人理解的，“流”的类比还不足够，即使是[ marbles ](http://rxmarbles.com/)的例子也还远远不够。我可以向自己解释，但对于别人，老实说，难道你不需要更多结合实际的例子？难道你不希望通过在自己脑海里举一个例子更好地理解 RxJava 么？我做到了，并且我想和你们分享。\n \n-## The production line\n+## 工厂流水线\n \n-I lied. I created more than one example in my head to understand RxJava. I tried with ZOO and I observed animals in cages. I tried with river and I observed fishes. I also tried with Batman and I observed crimes (yeah… it’s not a reality, but it’s still a good one). But I guess that production line is the best analogy.\n+好吧，我说谎了。为了理解 RxJava，我在脑海里举了不仅仅一个例子。例如我尝试观察动物园笼子的动物，尝试观察河流里的鱼，也尝试去观察蝙蝠侠里的犯罪（对，这不是真实的，但确是个很好的例子）。但我还是认为工厂流水线是最好的例子。\n \n ![](http://ww1.sinaimg.cn/large/a490147fjw1f2ty3u29rzj20sg0fx0t6.jpg)\n \n-### App functionalities\n+### 需求\n \n-Let’s imagine that we write an app which displays information about animals and we’ve got request to implement new screen with following functionalities:\n+我们先想象下，我们需要写一款应用来展示动物们的信息，并且现在我需要在新的界面实现以下功能：","path":"TODO/rxjava-production-line.md","position":28,"original_position":28,"commit_id":"034e5c40e7281b0d8850b9fb6b4fab3aa0bb0c78","original_commit_id":"034e5c40e7281b0d8850b9fb6b4fab3aa0bb0c78","user":{"login":"Sausure","id":9532423,"avatar_url":"https://avatars.githubusercontent.com/u/9532423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sausure","html_url":"https://github.com/Sausure","followers_url":"https://api.github.com/users/Sausure/followers","following_url":"https://api.github.com/users/Sausure/following{/other_user}","gists_url":"https://api.github.com/users/Sausure/gists{/gist_id}","starred_url":"https://api.github.com/users/Sausure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sausure/subscriptions","organizations_url":"https://api.github.com/users/Sausure/orgs","repos_url":"https://api.github.com/users/Sausure/repos","events_url":"https://api.github.com/users/Sausure/events{/privacy}","received_events_url":"https://api.github.com/users/Sausure/received_events","type":"User","site_admin":false},"body":"我觉得作者这里的意思是指有一款软件是用来显示动物信息的，现在他需要在其中一个界面实现以下功能。也就是说那款软件是可以显示很多动物的信息，他现在只是实现显示猫的信息的功能","created_at":"2016-04-19T00:20:49Z","updated_at":"2016-04-19T00:20:49Z","html_url":"https://github.com/xitu/gold-miner/pull/265#discussion_r60156740","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/60156740"},"html":{"href":"https://github.com/xitu/gold-miner/pull/265#discussion_r60156740"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/265","id":66722767,"html_url":"https://github.com/xitu/gold-miner/pull/265","diff_url":"https://github.com/xitu/gold-miner/pull/265.diff","patch_url":"https://github.com/xitu/gold-miner/pull/265.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/265","number":265,"state":"open","locked":false,"title":"rxjava-production-line翻译完成","user":{"login":"Sausure","id":9532423,"avatar_url":"https://avatars.githubusercontent.com/u/9532423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sausure","html_url":"https://github.com/Sausure","followers_url":"https://api.github.com/users/Sausure/followers","following_url":"https://api.github.com/users/Sausure/following{/other_user}","gists_url":"https://api.github.com/users/Sausure/gists{/gist_id}","starred_url":"https://api.github.com/users/Sausure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sausure/subscriptions","organizations_url":"https://api.github.com/users/Sausure/orgs","repos_url":"https://api.github.com/users/Sausure/repos","events_url":"https://api.github.com/users/Sausure/events{/privacy}","received_events_url":"https://api.github.com/users/Sausure/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-16T01:01:38Z","updated_at":"2016-04-19T00:20:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d07de78310ddd8c69c0292f1c4365fa9222e0d98","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/265/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/265/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/265/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/034e5c40e7281b0d8850b9fb6b4fab3aa0bb0c78","head":{"label":"Sausure:master","ref":"master","sha":"034e5c40e7281b0d8850b9fb6b4fab3aa0bb0c78","user":{"login":"Sausure","id":9532423,"avatar_url":"https://avatars.githubusercontent.com/u/9532423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sausure","html_url":"https://github.com/Sausure","followers_url":"https://api.github.com/users/Sausure/followers","following_url":"https://api.github.com/users/Sausure/following{/other_user}","gists_url":"https://api.github.com/users/Sausure/gists{/gist_id}","starred_url":"https://api.github.com/users/Sausure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sausure/subscriptions","organizations_url":"https://api.github.com/users/Sausure/orgs","repos_url":"https://api.github.com/users/Sausure/repos","events_url":"https://api.github.com/users/Sausure/events{/privacy}","received_events_url":"https://api.github.com/users/Sausure/received_events","type":"User","site_admin":false},"repo":{"id":52789151,"name":"gold-miner","full_name":"Sausure/gold-miner","owner":{"login":"Sausure","id":9532423,"avatar_url":"https://avatars.githubusercontent.com/u/9532423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sausure","html_url":"https://github.com/Sausure","followers_url":"https://api.github.com/users/Sausure/followers","following_url":"https://api.github.com/users/Sausure/following{/other_user}","gists_url":"https://api.github.com/users/Sausure/gists{/gist_id}","starred_url":"https://api.github.com/users/Sausure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sausure/subscriptions","organizations_url":"https://api.github.com/users/Sausure/orgs","repos_url":"https://api.github.com/users/Sausure/repos","events_url":"https://api.github.com/users/Sausure/events{/privacy}","received_events_url":"https://api.github.com/users/Sausure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sausure/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":true,"url":"https://api.github.com/repos/Sausure/gold-miner","forks_url":"https://api.github.com/repos/Sausure/gold-miner/forks","keys_url":"https://api.github.com/repos/Sausure/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sausure/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sausure/gold-miner/teams","hooks_url":"https://api.github.com/repos/Sausure/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/Sausure/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/Sausure/gold-miner/events","assignees_url":"https://api.github.com/repos/Sausure/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/Sausure/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/Sausure/gold-miner/tags","blobs_url":"https://api.github.com/repos/Sausure/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sausure/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sausure/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sausure/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sausure/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/Sausure/gold-miner/languages","stargazers_url":"https://api.github.com/repos/Sausure/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/Sausure/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/Sausure/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/Sausure/gold-miner/subscription","commits_url":"https://api.github.com/repos/Sausure/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sausure/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sausure/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sausure/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sausure/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/Sausure/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sausure/gold-miner/merges","archive_url":"https://api.github.com/repos/Sausure/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sausure/gold-miner/downloads","issues_url":"https://api.github.com/repos/Sausure/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/Sausure/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/Sausure/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/Sausure/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sausure/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/Sausure/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/Sausure/gold-miner/deployments","created_at":"2016-02-29T12:24:31Z","updated_at":"2016-02-29T12:16:16Z","pushed_at":"2016-04-16T00:58:47Z","git_url":"git://github.com/Sausure/gold-miner.git","ssh_url":"git@github.com:Sausure/gold-miner.git","clone_url":"https://github.com/Sausure/gold-miner.git","svn_url":"https://github.com/Sausure/gold-miner","homepage":"http://gold.xitu.io","size":9125,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xitu:master","ref":"master","sha":"818562d02740fe26cc7fe8264918b56e7caaa169","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2016-04-18T16:19:14Z","pushed_at":"2016-04-18T15:50:06Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"http://gold.xitu.io","size":9392,"stargazers_count":1165,"watchers_count":1165,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":48,"forks":234,"open_issues":48,"watchers":1165,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/265"},"html":{"href":"https://github.com/xitu/gold-miner/pull/265"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/265"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/034e5c40e7281b0d8850b9fb6b4fab3aa0bb0c78"}}}}