{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/5876","labels_url":"https://api.github.com/repos/angular/angular/issues/5876/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/5876/comments","events_url":"https://api.github.com/repos/angular/angular/issues/5876/events","html_url":"https://github.com/angular/angular/issues/5876","id":122041789,"number":5876,"title":"Do Observables make sense for http?","user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":38,"created_at":"2015-12-14T13:26:00Z","updated_at":"2015-12-30T04:34:49Z","closed_at":"2015-12-16T03:13:21Z","body":"I don't want this to sound too critical :-). \r\n\r\nI just have a few questions/concerns about Observables in the context of Angular 2.0 http.\r\n\r\nSince I started using http in Angular 2.0 I have always wondered why a decision was made to go with Observables over promises. \r\n\r\nDon't get me wrong, I think observables (with or without RxJs) is cool and I've enjoyed learning about it, but when it comes to plain http calls, I am struggling to see a clear advantage over regular promises.\r\n\r\nOne of the arguments I've seen is that promises are only good for one time calls, but a stream can be left open indefinitely. My view though is that \"one time\" http calls probably make up the 90% use case for http. I can definitely see an application of the open ended streams, but in my experience I see it more as a one off case in most business applications. Basically now, I find myself using Observables in a way that just mimics promises.\r\n\r\nI see other applications of Observables though. Some examples I've seen include streams of events (e.g. click event patterns etc). I think it definitely has merit, but it seems to me that we are trying to \"shoehorn\" the 90% use case into the 10% use case with this.\r\n\r\nI am not against incorporating alternative technologies, but I question if this pivot to Observables is worth the reeducation of developers when it comes to the http calls. I wonder if it would make sense to offer a lean promise based http implementation to the masses and encourage people with real streaming needs to use RxJs directly instead?  I think that will allow us to benefit from the best of both worlds and better enable us to pick the best tool for the job. \r\n\r\nJust to be clear: My questions/concerns about this predates the new approach of having to bring in RxJS dependencies piecemeal :-). \r\n\r\n-Tor"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/167934325","html_url":"https://github.com/angular/angular/issues/5876#issuecomment-167934325","issue_url":"https://api.github.com/repos/angular/angular/issues/5876","id":167934325,"user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T04:34:49Z","updated_at":"2015-12-30T04:34:49Z","body":"That's awesome. Thanks for taking the time to explain this!\r\nI will definitely play around with this a bit more to better understand all the details. The Subject idea seems pretty powerful in combination with the switchMap though. "}}