-
Notifications
You must be signed in to change notification settings - Fork 877
Conversation
Sure, let me read it and I will comment out the little details I see |
:marked | ||
## Heroes and Http | ||
|
||
Let's look back at our `HeroService` implementation in the <a href="/docs/ts/latest/tutorial/toh-pt4.html">services</a> chapter. Specifically let's revisit the point we made about using promises when loading heroes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this "callbacks" to previous content as a recap but about this one... I guess that the user will have this HeroService
open from his work through the tutorial so she/he can see the function you are talking about. Problem I see is that the link sends you to the entire document instead of showing the concrete piece you are talking about.
Personally I would give a better link or simply +makeExample using the toh-4 source and showing it directly.
Thoughts?
So I read it, very nice, I like it. I left you a few comments but let's see what @wardbell has to say about them. The only part I found more problematic is the "Integration with Http" one. I love what we are doing with the tutorial, about going the "the whole nine yards" (explaining everything) and that part is a bit rushed. To be honest, I am not sure what to do here. Perhaps I would add a few snippets in how you import all the needed stuff and how I apply them (including the in memory stuff). Give a little explanation (basically the one you put about not using a real http server but an in memory one) and put a subsection linking to the detailed documentation. The idea is to not force the user to go to another page to complete the tutorial. WDYT? |
fb567f9
to
72681cd
Compare
Thanks for your feedback @Foxandxss . I have made a few tweaks based on your suggestions. I have to think about HTTP_PROVIDERS and maybe provide a snippet for that in isolation . I purposely tried to avoid bringing in too much of the api simulation stuff since I think it might be confusing. My guess is that most users will integrate directly with their own apis so seeing SEED_DATA and XHRBackend in the snippet might confuse them.... |
I think that it is better to reach some middle ground. Not giving all the details like the attached document nor leaving the user do it by himself. A little information + snippets + link to more details is a good middle ground for me. I don't think that people have a Heroes API so they are more likely going to do what yo do in the tutorial, so we need to explain them how to do it "our way" and if they want to implement so real backend, they can see that as an exercise. |
72681cd
to
e1a9e7a
Compare
Yeah, I think that is a fair point. I have added a snippet and tried to make it more clear which imports are needed for http in general, and which ones are there just for the simulator. |
+makeExample('toh-6/ts/index.html', 'http', 'index.html (http)')(format=".") | ||
|
||
:marked | ||
The only other thing we have to do is import `HTTP_PROVIDERS` from `angular2/http` and register it `AppComponents`'s provider array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are missing some words or something in this sentence. That and register it AppComponents' provider array
is weird to read.
On the other hand, I think that AppComponents' doesn't have an extra s after the apostrophe in this case.
In my opinion, you did an awesome job with the new change. Not too much nor too little. |
e1a9e7a
to
38dc1cc
Compare
Thanks! Yeah I fixed the grammar error |
38dc1cc
to
2b98e2f
Compare
:marked | ||
# Http | ||
|
||
Our application has become a huge success and our stakeholders have already expanded the vision to include integration with a hero api. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "already". Otherwise love the intro.
@naomiblack I believe this is pending final review by @wardbell and @johnpapa |
I’ll review it this weekend. I’m speaking at 3 sessions, 2 full day workshop,s and filming 4 videos this week … so I’m a bit beat :) |
That sounds great! |
64d76de
to
86668a0
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
8cf2b1f
to
913f1d3
Compare
913f1d3
to
7cc61cc
Compare
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
7cc61cc
to
b676596
Compare
b676596
to
e4db340
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
Well done, Tor! And thanks also to everyone who reviewed it. I scrubbed and adjusted for our latest thinking about RxJS operators and where to configure the in-memory web api. I added two more commits:
Merging now. |
@wardbell @johnpapa @Foxandxss @filipesilva
I am creating a new PR for my TOH Http chapter due to an issue with my original branch.
Your previous comments can be found here: #1044
I consider this ready for review now, so please let me know if there is anything I should change.
As we discusses I am sticking to promises, but mention that alternatives like Observables exist. I am happy add to this if you think we need more details about Observables since I don't really cover details about them beyond acknowledging their existence :-)
I am using the in memory web api, but link to the appendix in the http developer guide for the configuration details. Let me know if we need to bring more of the details into the TOH guide.
Thanks,
Tor