tag:blogger.com,1999:blog-34454975.post2326473261448307531..comments2023-06-28T16:58:41.189+02:00Comments on Web Reflection: Ain't that fetch!Andrea Giammarchihttp://www.blogger.com/profile/16277820774810688474noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-34454975.post-68753920523592086102015-03-25T02:26:22.377+01:002015-03-25T02:26:22.377+01:00Also, just to clarify, this blog comments don'...Also, just to clarify, this blog comments don't go until I confirm the source is safe so, in case you answer, please wait for me to publish.<br /><br />I really hoped you would have taken this post as "just fair", because everything you read is simply what I've thought and me being simply honest.<br /><br />You put funny GIFs and what you think people think or say or complain about as well in you posts, and we hopefully still have sarcasm and satire post ability online.<br /><br />And about this: I haven't made names, beside yours about your post, without putting you in any satiric situation, and I haven't insulted directly anyone.<br /><br />I hope we can keep it that way.Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-61125068786621415952015-03-25T02:12:27.624+01:002015-03-25T02:12:27.624+01:00humanistic => humoristhumanistic => humorist Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-77114330585444699282015-03-25T02:11:39.213+01:002015-03-25T02:11:39.213+01:001. you can easily wrap XHR via ES6 Promise, proble...1. you can easily wrap XHR via ES6 Promise, problem solved for the 3 requests<br /><br />2. defaults are easy to make since about ever in JS<br /><br />3. the check for the content length can be done in onprogress too or eventually a HEAD call<br /><br />4. the dialog key is: which entry point is not cancelable? "Promises" ... yeah, let's choose it. If that's not what happened, please explain me what happened. Anyway, it's a humanistic personal vision of what happened, same as the image I've revisited. And since that's not what truly happened (right?) nobody should get offended, I guess, for real ... why? Or better: Where is the explanation of WHY a non cancelable API as wrapper was chose in the first place? That one, I miss it.<br /><br />5. things not specd' yet but will are 50% of the reason I wrote this post. What does that even mean when you plan to push out a new API?<br /><br />6. I'm sorry you stopped at the question and didn't kept reading the part I've said it was my fault missing it and why.<br /><br />7. with all problems and lacks behind Native we have, I am pretty sure a half backed API is not the answer. We still need so much lower level API access to devices I've no idea why somebody decided XHR was the real problem.<br /><br />8. I've read your post, haven't seen an example and couldn't test them on Canary. I will try again<br /><br />9. no, XHR dates 2006, what Microsoft did dated before and it didn't have to become a standard in that way. However, it was already good enough, that's why it got adopted. Why blaming XHR and 16 years of honorable work? I don't understand that, it felt a bit forced to meAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-1279394774365116092015-03-25T01:39:27.168+01:002015-03-25T01:39:27.168+01:00With such a simple example, yes, XHR can get close...With such a simple example, yes, XHR can get close to fetch in terms of compactness. But say you wanted to wait until 3 XHR's complete, or add 3 XHR results to the page as soon as possible, but maintaining order, then the XHR example is going to look worse and worse compared to fetch.<br /><br />Holding up an explicit "GET" as a benefit is weird unless you're also going to complain about all the stuff XHR doesn't make explicit. These include async, responseType, withCredentials - if it makes sense to have defaults here, why must method be explicit.<br /><br />In fact, XHR doesn't even have consistent defaults. withCredentials is true for same-origin, false otherwise. Fetch on the other hand uses sensible and consistent defaults.<br /><br />onprogress is a high level feature. With fetch you can use streams to track progress, which encourages you to look at the response, check if it has a content-length, and be prepared for that to be absent, or a lie.<br /><br />I don't get the point of the made-up dialog between WHATWG and her colleague. Is this suggesting how fetch was designed? If so it's kinda offensive and trolly.<br /><br />"Having the ability to stop a download, a streamed content, or an upload for the wrong image, should have been the very first thing to think about for a new Network based API, riight?" - and it was. Fetch has been designed around streaming from the start, which you'll know if you read my post. You'll also see the example of terminating a stream, which aborts the download.<br /><br />Aborting an upload hasn't been spec'd yet, but it will be. Iterative design, as I say.<br /><br />"Were was the announcement that a new Network API based on Promise was coming?" - yes, this was developed in the open, discussed in mailing lists, on the Chrome site there were intents to implement and to ship, I've written articles on it, given talks, as have others. Where should this announcement have been so you wouldn't have missed out?<br /><br />"this is me wondering what's the rush" - have you seen how native is kicking our arse at the moment? We owe developers a better platform. ServiceWorker brings use network control, and the foundation for push messaging and background sync. We need an uncoupled Request/Response model for this, we need proper streaming, not something hacked on top of a rusty old API.<br /><br />"I honestly wish Streams where usable directly as low level API" - they are. If you read my post, you'd see the link to http://streams.spec.whatwg.org.<br /><br />"I am not sure why Jake said that in his blogpost since first working drafts seem to be dated 2006" - as you well know, the design of XHR dates much earlier than that.Jake Archibaldhttps://www.blogger.com/profile/04599856665408765772noreply@blogger.com