Imeleni i-API? Namanye ama-Acronyms: REST, SOAP, XML, JSON, WSDL

Ngabe i-API imeleni

Uma usebenzisa isiphequluli, isiphequluli sakho senza isicelo kusuka kuseva yamakhasimende futhi iseva ithumela amafayela emuva lapho isiphequluli sakho sihlangana futhi sibonise ikhasi lewebhu. Kepha kuthiwani uma ufuna i-server yakho noma ikhasi lewebhu likhulume nenye iseva? Lokhu kuzodinga ukuthi uhlele ikhodi ku-API.

Yini eyenza API imele?

I-API isichazamazwi se- UHlelo Lobhalomfihlo. an API iqoqo lemizila, izivumelwano, namathuluzi wokwakha izinhlelo zokusebenza ezinikwe amandla iwebhu nezisuselwa kuselula. I- API icacisa ukuthi ungayigunyaza kanjani (ngokuzithandela), ucele futhi wamukele idatha kusuka ku- API iseva.

Iyini i-API?

Lapho isetshenziswa kumongo wokuthuthukiswa kwewebhu, i API imvamisa isethi echaziwe yemiyalezo yesicelo se-Hypertext Transfer Protocol (HTTP), kanye nencazelo yesakhiwo semilayezo yokuphendula. Ama-API wewebhu avumela ukuhlanganiswa kwezinsizakalo eziningi kuzinhlelo zokusebenza ezintsha ezaziwa ngokuthi ama-mashups.Wikipedia

Incazelo yevidiyo yalokho okwenziwa ngama-API

Kukhona izivumelwano ezimbili eziyinhloko lapho kwenziwa i-API. Izilimi ezihlelekile ezihlelekile njengeMicrosoft .NET nabathuthukisi beJava bavame ukukhetha i-SOAP kepha umthetho olandelwayo owaziwa kakhulu yi-REST. Ngokufana nokuthayipha ikheli kusiphequluli ukuze uthole impendulo, ikhodi yakho idlulisa isicelo ku- API - ngokoqobo indlela eseva eqinisekisa futhi iphendule ngokufanele nedatha oyicelile. Izimpendulo ze-SOAP ziphendula nge-XML, ebukeka ifana ne-HTML - ikhodi esetshenziswa yisiphequluli sakho.

Uma ungathanda ukuhlola ama-API ngaphandle kokubhala umugqa wekhodi, I-DHC ine okuhle Isicelo se-Chrome ngokusebenzisana nama-API nokubona izimpendulo zawo.

Yini emele i-Acronym SDK?

I-SDK isichazamazwi se- Ikhithi Yonjiniyela weSoftware.

Lapho inkampani ishicilela i-API yayo, kunemibhalo evame ukuhambisana ekhombisa ukuthi indlela ye- API iyaqinisekisa, ingabuzwa kanjani, nokuthi yiziphi izimpendulo ezifanele. Ukusiza onjiniyela ukuthi baqale kahle, izinkampani zivame ukushicilela ifayela le- Ikhithi Yonjiniyela weSoftware ukufaka isigaba noma imisebenzi edingekayo kalula kumaphrojekthi abhalwa wonjiniyela.

Imeleni i-Acronym XML?

I-XML isichazamazwi se- Ulimi lwe-eXtensible Markup. I-XML ulimi lwemakhaphu olusetshenziselwa ukufaka idatha ngefomethi efundeka kalula futhi ifundwe ngomshini.

Nasi isibonelo sendlela i-XML evela ngayo:

<?xml inguqulo ="1.0"?>
<product id ="1">
Umkhiqizo A
Umkhiqizo wokuqala

5.00
ngamunye

Yini emele i-Acronym JSON?

I-JSON isichazamazwi se- I-JavaScript Object Notation. I-JSON yifomethi yokuhlela idatha ethunyelwa emuva naphambili nge-API. I-JSON ingenye i-XML. Ama-REST APIs ajwayele ukuphendula nge-JSON - ifomethi ejwayelekile evulekile esebenzisa umbhalo ongafundwa ngabantu ukudlulisa izinto zedatha ezinamabhangqa enani lemfanelo.

Nasi isibonelo sedatha engenhla usebenzisa i-JSON:

{
"id": 1,
"isihloko": "Umkhiqizo A",
"incazelo": "Umkhiqizo wokuqala",
"intengo": {
"inani": "5.00",
"ngakunye": "ngamunye"
}
}

Ngabe i-Acronym REST imeleni?

REST yisichasiso segama le- Ukudluliswa Kwezwe Elimele isitayela sokwakhiwa kwezinhlelo ze-hypermedia ezisatshalalisiwe. Uqanjwe nguRoy Thomas Fielding

Hawu… umoya ojulile! Ungafunda yonke iziqu lapha, ebizwa nge-Izitayela Zokwakha kanye ne-Design of Network-based Software Architectures ethunyelwe ngokweneliseka okulingene kwezidingo zezinga lika-DOKOTELA WEFILOSOPHI ku-Information and Computer Science ngo URoy Thomas Fielding.

Siyabonga uDkt. Fielding! Funda kabanzi mayelana I-REST eWikipedia.

Imelelani i-Acronym SOAP?

I-SOAP isichazamazwi se- Iphrothokholi Yokufinyelela Into elula

Angiyena umqambi wohlelo, kepha ngokombono wami abathuthukisi abathanda i-SOAP bakwenza lokho ngoba bangathuthukisa kalula ikhodi kusixhumi esibonakalayo sohlelo olufunda ifayili leWeb Service Definition Language (WSDL). Akudingeki badlulise impendulo, sekuvele kufezekile kusetshenziswa i-WSDL. I-SOAP idinga imvilophu yohlelo, echaza ukwakheka kwemiyalezo nokuthi ingacutshungulwa kanjani, isethi yemithetho yokufaka ikhodi yokuveza izimo zamadatha wedatha achazwe ngohlelo kanye nomhlangano wokumelela izingcingo zezinqubo nezimpendulo.

5 Amazwana

  1. 1
  2. 2
  3. 3
  4. 4

    Ekugcineni (ekugcineni!) Isifinyezo esifushane sokuthi zonke lezi ziqubulo ezizwakalayo ezethusayo zisho ukuthini. Siyabonga ngokusebenzisa ulimi olucacile noluqondile, umphumela = ikusasa elibukeka likhanya kancane kulo mthuthukisi wezitshudeni.

    • 5

      Sawubona Vic, yebo… ngiyavuma. Amagama ayethusa. Ngiyakhumbula okokuqala lapho ngenza isicelo ku-API futhi konke kwachofoza futhi angikholwanga ukuthi kwakulula kangakanani empeleni. Ngiyabonga!

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.