Puas yog AJAX yog API?
Puas yog AJAX yog API?

Video: Puas yog AJAX yog API?

Video: Puas yog AJAX yog API?
Video: Tsis Tau Txaus Koj | Kong Chue (Official Music Video) 2024, Kaum ib hlis
Anonim

AJAX yog ib txheej ntawm (feem ntau) cov txheej txheem kev txhim kho lub vev xaib tus neeg siv khoom, thaum REST yog tus qauv tsim qauv rau kev xa thiab tuav HTTP thov. REST API feem ntau tsis siv los siv AJAX , tab sis tuaj yeem nkag tau los ntawm ib qho AJAX tus neeg siv khoom. Muaj ntau cov ntaub ntawv ntawm ob qho tib si AJAX thiab REST ( API ) hauv Internet.

Yog li ntawd, qhov txawv ntawm Ajax thiab REST API yog dab tsi?

Ajax tshem tawm kev sib cuam tshuam nruab nrab tus neeg siv khoom thiab server asynchronously; REST xav tau kev sib tham nruab nrab tus neeg siv khoom thiab server. Ajax yog ib txheej txheej technology; REST yog hom software architecture thiab ib txoj hauv kev rau cov neeg siv thov cov ntaub ntawv lossis cov ntaub ntawv los ntawm servers.

Tsis tas li ntawd, puas yog Ajax lub tsev qiv ntawv JavaScript? AJAX yog ib txheej txheej txheem kev txhim kho lub vev xaib siv los ntawm cov neeg siv khoom sab nrauv thiab tsev qiv ntawv los ua asynchronous HTTP hu rau lub server. AJAX sawv cev rau Asynchronous JavaScript thiab XML. AJAX siv los ua ib lub npe nrov hauv lub vev xaib kev loj hlob thiab ntau qhov nrov JavaScript widgets tau tsim siv AJAX.

Kuj paub, puas yog Ajax tseem siv xyoo 2019?

Yog lawm, tab sis nws tau hloov pauv sai sai los ntawm kev nqa API uas zoo dua AJAX : Hom kev ua haujlwm no tau ua tiav dhau los siv XMLHttpRequest. Fetch muab ib qho kev xaiv zoo dua uas tuaj yeem yooj yim siv los ntawm lwm yam technologies xws li Service Workers.

Puas yog Ajax ruaj ntseg?

Muaj cov misconception hais tias nyob rau hauv AJAX kev siv ntau dua ruaj ntseg vim nws xav tias tus neeg siv tsis tuaj yeem nkag mus rau cov ntawv server-sab yam tsis muaj tus neeg siv interface (tus AJAX raws lub vev xaib). Cov Ajax cav siv JS los ntes cov neeg siv cov lus txib thiab hloov lawv mus rau hauv kev hu xov tooj.

Pom zoo: