Programmeringsgrensesnitt
From Wikipedia, the free encyclopedia
From Wikipedia, the free encyclopedia
Programmeringsgrensesnitt (engelsk application programming interface, API) er eit programvarelag mellom eit operativsystem og brukarprogramma på ei datamaskin. Føremålet med eit programmeringsgrensesnitt er å standardisera kommunikasjonen mellom brukarprogramma og operativsystemet, slik at same brukarprogramkode kan rekompilerast og nyttast på fleire ulike operativsystem. Eit programmeringsgrensesnitt gjer det òg enklare å skriva kode, etter som ein ikkje treng å kjenna til og ta omsyn til alle detaljane av operativsystemet.
Det finst ulike typar programmeringsgrensesnitt. Nokre, som POSIX og Win32 [1], er generelle programmeringsgrensesnitt, som sit mellom operativsystemet og brukarprogramma. Andre, som ALSA, JACK, Core Audio, ASIO [2], DirectSound, LADSPA, etc., er spesialprogrammeringsgrensesnitt for digital lyd [3], medan OpenGL [4] og Open Inventor er spesialprogrammeringsgrensesnitt for grafikk.
Når ein programmerer i høgnivåspråk, som til dømes C++ og Java, er det vanleg å nytta eit programvarebibliotek, som Qt, med ferdige modular. Programkoden kommuniserer då med funksjonar i førehandsdefinerte klassar, i staden for brukargrensesnittet til operativsystemet. Programmeraren kan da konsentrera seg om funksjonaliteten, i staden for detaljar.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.