What is AJAX and Why Should I Care

  Рет қаралды 26,358

Steve Griffith - Prof3ssorSt3v3

7 жыл бұрын

The video describes the basic ideas behind AJAX, why it is important, how it evolved, and what the JavaScript code looks like.
Code GIST: gist.github.com/prof3ssorSt3v3/84fa936813ea16b09689d196bf4e1476
More about Fetch: kzbin.info/www/bejne/lWbcmaChebakf7M

Пікірлер: 26
@robinkartik6356
@robinkartik6356 4 жыл бұрын
I was always confuse with this topic, but now I understand the whole thing. Many thanks for this tutorial.
@thabesttheris
@thabesttheris 4 жыл бұрын
you make the best JS tutorials on youtube bro thank you.
@littlepudding853
@littlepudding853 5 жыл бұрын
I was confused about why in some places use that and some places use another. This makes it pretty clear. Thanks.
@devkushwaha6682
@devkushwaha6682 4 жыл бұрын
You make things always easy thanks bro, can you please make some videos for Apollo client and Apollo server
@rotrose7531
@rotrose7531 4 жыл бұрын
As always thank you very much.
@chesterxp508
@chesterxp508 2 жыл бұрын
Brilliant tutorials :)
@divyanshu8874
@divyanshu8874 3 жыл бұрын
JUST SUPERB...❤️❤️❤️❤️❤️❤️❤️❤️
@CesarJuarezVargas
@CesarJuarezVargas 6 жыл бұрын
Is URI (lines 1 and 31) a variable name that you chose or the anagram for Uniform Resource Identifier? If the latter, what's the difference in using it v. URL?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 жыл бұрын
Cesar Juarez-Vargas it is just a variable name that I picked. It was picked because it is an acronym
@CesarJuarezVargas
@CesarJuarezVargas 6 жыл бұрын
Correction: I meant acronym, not anagram.
@rockycafe313
@rockycafe313 4 жыл бұрын
not sure if raining in the background, or its static-y mic. LOL anyways thanks!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
Back in 2017 it was a crappy mic. :( After I got the good mic there were a few videos with rain and thunder in the background. :)
@hacker2ish
@hacker2ish 6 жыл бұрын
Could you make more videos on the old way, a.k.a XMLHttpRequest, because fetch is still unsupported for IE11 and Opera Mini, which according to caniuse.com is 5% of Internet users?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 жыл бұрын
Well Opera mini doesn't run Javascript - it uses server-side rendering so it will never support fetch. IE 11 is ~2.5% iOS Safari 9 and 10.2 together account for ~2%. Android 4.x ~1% Android 5.x if they have not done the system updates to update the webview. That makes about 13% of the Android devices which could possibly not support it. However, many of those devices have FF or Chrome installed which would support it. I will eventually make more videos on XMLHttpRequest but I have a lot of new things to cover first. The basic example shown in this video really shows most of what you need to know about it.
@CesarJuarezVargas
@CesarJuarezVargas 6 жыл бұрын
Can developers still use any of the three methods? What is the approach with regard to use "old" v. "new" methodologies with AJAX?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 жыл бұрын
Cesar Juarez-Vargas there are just two approaches. The old one that uses XMLHttpRequest and the new way with fetch. Fetch is a better approach but it is not supported by older browsers. Check caniuse.com for support data.
@ahsath
@ahsath 7 жыл бұрын
Hi! could you made a video about history API?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 7 жыл бұрын
Klein Venedig yep. It's on my list.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 6 жыл бұрын
I have two videos for the History API now online.
@rajasekhar5135
@rajasekhar5135 3 жыл бұрын
Is ur series are enough for ajax or should I want to move so wat steeve😍 tell me
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Not sure I understand your question.
@rajasekhar5135
@rajasekhar5135 3 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 am asking that is ur ajax series is enough for entire ajax......
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
@@rajasekhar5135 It's more than enough to learn how to use AJAX. If you watch all the videos you will have a very deep understanding of AJAX and related technologies.
@miklosnemeth8566
@miklosnemeth8566 4 жыл бұрын
For professional business applications timeout handling is very important an fetch simply doesnt have it. The good old XMLHttpRequest has timeout handling. Axios is built upon XHR and has timeout support. JQuery ajax has, too. I dont use fetch. The Promise timeout workarounds are not ok, an API has timeout inherently built in.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
I still find fetch to be far superior to the old XMLHttpRequest APIs. A timeout is a simple thing to add to any Promise and IMO should not be a reason to stick with XMLHttpRequest. David Walsh has a simple timeout script here - davidwalsh.name/fetch-timeout - which adds a timeout in a few lines without having to add jQuery to a website. I would not bloat any website that I built with jQuery in favour of using the native fetch method. Promises do have an abort mechanism - developer.mozilla.org/en-US/docs/Web/API/AbortController/abort - that can be used to cancel a fetch call.
@miklosnemeth8566
@miklosnemeth8566 4 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Thank you very much for the feedback. This AbortController together with the Promise timeout sounds like a solution. What David Walsh wrote is totally useless -- I had been experimenting with the same trick on my own a couple of years ago, too -- but it doesn't prevent fetch to stop its long running job behind the scene. This AbortController, though sounds promising. I'll give it a try. Thank you so much.
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 75 МЛН
Зачем он туда залез?
00:25
Vlad Samokatchik
Рет қаралды 2,6 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН