Rabu, 21 September 2011

dasar dasar web dan html

DASAR -DASAR WEB DAN HTML􀂃Konsep dasar Web􀂃Arsitektur Web􀂃HTTP􀂃Client Side Programming􀂃Server Side Programming􀂃Web Server Software (PHPTriad, XAMPP)􀂃KonsepHTML 1 KonsepDasar PemrogramanWeb DefinisiWeb World Wide Web ("WWW", atausingkatnya"Web") adalahsuaturuanginformasidimanasumber-sumberdayayang bergunadiidentifikasiolehpengenalglobal yang disebutUniform Resource Identifier (URI). WWW seringdianggapsamadenganInternet secarakeseluruhan, walaupunsebenarnyaiahanyalahbagiandaripadanya. Hiperteksdilihatdengansebuahprogram bernamabrowser web yang mengambilinformasi(disebut"dokumen" atau“halamanweb") dariserver web danmenampilkannya, biasanyadisebuahmonitor. Kita laludapatmengikutipranaladisetiaphalamanuntukpindahkedokumenlain ataubahkanmengiriminformasikembalikepadaserver untukberinteraksidengannya. Inidisebut"surfing"atau"berselancar"dalambahasaIndonesia. Halamanweb biasanyadiaturdalamkoleksimaterial yang berkaitanyang disebut“situsweb". 2 ArsitekturWeb Arsitektur 3 HTTP HTTP (HyperTextTransfer Protocol) adalahprotokolyang dipergunakanuntukmentransferdokumendalamWorld Wide Web(WWW). Protokol ini adalah protokol ringan, tidak berstatus dan generik yang dapat dipergunakan berbagai macam tipe dokumen. Pengembangan HTTP dikoordinasi oleh Konsorsium World Wide Web(W3C) dan grup bekerja Internet Engineering Task Force(IETF), bekerja dalam publikasi satu seri RFC, yang paling terkenal RFC 2616, yang menjelaskan HTTP/1,1, versti HTTP yang digunakan umum sekarang ini. HTTP adalah sebuah protokol meminta/menjawab antara clientdan server. Sebuh client HTTP seperti web browser, biasanya memulai permintaan dengan membuat hubungan TCP/IPke porttertentu di tuan rumah yang jauh (biasanya port 80). Sebuah server HTTP yang mendengarkan diport tersebut menunggu client mengirim kode permintaan (request), seperti "GET / HTTP/1.1" (yang akan meminta halaman yang sudah ditentukan), diikuti dengan pesan MIMEyang memiliki beberapa informasi kode kepala yang menjelaskan aspek dari permintaan tersebut, diikut dengan badan dari data tertentu. Beberapa kepala (header) juga bebas ditulis atau tidak, sementara lainnya (seperti tuan rumah) diperlukan oleh protokol HTTP/1,1. Begitu menerima kode permintaan (dan pesan, bila ada), server mengirim kembali kode jawaban, seperti "200 OK", dan sebuah pesan yang diminta, atau sebuah pesan error atau pesan lainnya. 4 HTTP Sejarah ProtokolHTTP pertamakali dipergunakandalamWWW padatahun1990. Padasaattersebutyang dipakaiadalahprotokolHTTP versi0.9. Versi0.9 iniadalahprotokoltransfer dokumensecaramentah, maksudnyaadalahdata dokumendikirimsesuaidenganisidaridokumentersebuttanpamemandangtipedaridokumen. Kemudianpadatahun1996protokolHTTP diperbaikimenjadiHTTP versi1.0. Perubahaniniuntukmengakomodasitipe-tipedokumenyang hendakdikirimbesertaenkodingyang dipergunakandalampengirimandata dokumen. Sesuaidenganperkembanganinfrastrukturinternet makapadatahun1999dikeluarkanHTTP versi1.1 untukmengakomodasiproxy, cachedankoneksiyang persisten. 5 HTTP ContohTransaksi S = Server C = Client C: (Inisialisasikoneksi) C: GET /index.htmHTTP/1.1 C: Host: www.wikipedia.org S: 200 OK S: Mime-type: text/html S: S: --data dokumen-- S: (close connectioin) 6 Client Side Programming Dalamjaringankomputer, kata“client side”mengacukepadaoperasiyang dilakukanolehclient padasatuhubungan“client-server”. Secaraumum, suatuclient adalahsatuaplikasikomputer, sepertiweb browser yang berjalanpadasatukomputerlokaldaripenggunaatauworkstation danterhubungkesatuserver seperlunya. Operasidapatdilakukanclient-side karenaoperasitersebutmembutuhkanakseskeinformasiataufungsiyang tersediapadaclient tetapitidakpadaserver, karenapenggunamembutuhkanobservasiterhadapoperasitersebutataumenyediakaninput, atauserver kekurangankekuatanpememrosesanuntukmelakukanoperasiyang tepatwaktuuntukseluruhclient yang harusdilayaninya. Sebagaitambahan, jikaoperasidapatdilakukanolehclient tanpamengirimdata melaluijaringan, makahalitumemakanwaktulebihsedikit, menggunakanlebihkecilbandwidth danmengurangiresikokeamanaan. 7 Client Side Programming Client-side scripting umumnyamengacukepadakelasdariprogram komputerpadaweb yang dieksekusiclient-side, olehweb browser nyapengguna, daripadaserverside(padaweb server). Client-side scripting generally refers to the class of computer programson the webthat are executedclient-side, by the user's web browser, instead of server-side(on the web server). This type of computer programmingis an important part of the Dynamic HTML(DHTML) concept, enabling web pagesto be scripted; that is, to have different and changing content depending on user input, environmental conditions (such as the time of day), or other variables. Web authors write client-sidescripts in languages such as JavaScript(Client-side JavaScript) or VBScript, which are based on several standards: HTML scripting HTTP Document Object Model 8 Client Side Programming Client-side scripts are often embedded within an HTMLdocument, but they may also be contained in a separate file, which is referenced by the document (or documents) that use it. Upon request, the necessary files are sent to the user's computer by the web server(or servers) on which they reside. The user's web browserexecutesthe script, then displays the document, including any visible output from the script. Client-side scripts may also contain instructions for the browser to follow if the user interacts with the document in a certain way, e.g., clicks a certain button. These instructions can be followed without further communication with the server, though they may require such communication. By viewing the file that contains the script, users may be able to see its source code. Many web authors learn how to write client-side scripts partly by examining the source code for other authors' scripts. 9 Client Side Programming In contrast, server-side scripts, written in languages such as Perland PHP, are executed by the web server when the user requests a document. They produce output in a format understandable by web browsers (usually HTML), which is then sent to the user's computer. The user cannot see the script's source code (unless the author publishes the code separately), and may not even be aware that a script was executed. The documents produced by server-side scripts may, of course, contain client-side scripts. Client-side scripts have greater access to the information and functions available on the user's computer, whereas server-side scripts have greater access to the information and functions available on the server.Server-side scripts require that their language's interpreteris installed on the server, and produce the same output regardless of the client's browser, operating system, or other system details. Client-side scripts do not require additional software on the server (making them popular with authors who lack administrative access to their servers); however, they do require that the user's web browser understands the scripting language in which they are written. It is therefore impractical for an author to write scripts in a language that is not supported by the web browsers used by a majority of his or her audience. 10 Server Side Programming In computer networking,the term server-side refers to operations that are performed by the server in a client-serverrelationship. Typically, a server is a software program, such as a web server, that runs on a remote server, reachable from a user's local computeror workstation. Operations may be performed server-side because they require access to information or functionality that is not available on the client, or require typical behaviourthat is unreliable when it is done client-side. Server-side operations also include processing and storage of data from a client to a server, which can be viewed by a group of clients. 11 Server Side Programming Server-side scripting is a web servertechnology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTMLpages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from client-side scriptingwhere scripts are run by the viewing web browser, usually in JavaScript. The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores. 12 Server Side Programming In the "old" days of the web this was almost exclusively performed using a combination of Cprograms, Perlscripts and Shell scriptsusing the Common Gateway Interface(CGI). Those scripts were executed by the operating system, and the results simply served back by the web server. Nowadays, these and other online scripting languages such as ASPand PHPcan often be executed directly by the web server itself or by extension modules (e.g. mod_perlor mod_php) to the web server. Either form of scripting (i.e. CGI or direct execution) can be used to build up complex multi-page sites, but direct execution usually results in lower overhead due to the lack of calls to external interpreters. Dynamic websites are also sometimes powered by custom web application servers, for example the Python"Base HTTP Server" library, although some may not consider this to be server-side scripting. 13 Server Side Programming List of server-side scripting technologies Any programming language can generate web pages through CGI or an extension module or application server framework. This section lists technologies designed mainly or exclusively for server-side scripting, typically by embedding instructions directly in template web pages. ASP Microsoft designed solution allowing various languages (though generally VBscriptis used) inside a HTML-like outer page, mainly used on Windows but with limited supporton other platforms. ColdFusion Cross platform tag based commercial server side scripting system. JSP A Java-based system for embedding code in HTML pages. Lasso A Datasourceneutral interpreted programming language and cross platform server. SSI A fairly basic system which is part of the common apache web server. Not a full programming environment by far but still handy for simple things like including a common menu. PHP Common opensourcesolution based on including code in its own language into an HTML page. Server-side JavaScript A language generally used on the client side but also occasionally on the server side. SMX Lisplikeopensourcelanguage designed to be embedded into an HTML page. [edit] 14 Web Server Software Server web adalahsebuahperangkatlunakserver yang berfungsimenerimapermintaanHTTPatauHTTPSdariklienyang dikenaldenganbrowser webdanmengirimkankembalihasilnyadalambentukhalaman-halamanweb yang umumnyaberbentukdokumenHTML. Server web yang terkenaldiantaranyaadalahApachedanMicrosoft Internet Information Service(IIS). Apache merupakanserver web antar-platform, sedangkanIIS hanyadapatberoperasidisistemoperasiWindows. Server web jugadapatberartikomputeryang berfungsisepertidefinisidiatas. 15 Web Server Software XAMPP is a free software package containing the Apache HTTP Server, MySQLdatabaseand necessary tools to use the PHPand Perlprogramming languages. The program is released under the GNU General Public Licenseand serves as a free, easy-to-use web server, capable of serving dynamic pages. Currently, XAMPP is available for Windows, Linux, Sun Solarisand Mac OS X(the X in its name could stand for any one of these operating systems). XAMPP is widely named the "lazy man's WAMP/LAMPinstallation," as it only requires one zip, taror exefile to be downloaded and run, and very little configuration of the various components that make up the web server is required. XAMPP is regularly updated to incorporate the latest releases of Apache/MySQL/PHP and Perl. It also comes with a number of other modules, including OpenSSLand phpMyAdmin. Officially, XAMPP is only intended for use as a development tool, to allow website designers and programmers to test their work on their own computers without any access to the Internet. In practice, however, XAMPP is sometimes used to actually serve web pages on the World Wide Web, and with some modifications it is generally secure enough to do so. 16 HTML HyperTextMarkup Language (HTML) adalahsebuahbahasamarkupyang digunakanuntukmembuatsebuahhalamanweb danmenampilkanberbagaiinformasididalamsebuahbrowser Internet. Bermuladarisebuahbahasayang sebelumnyabanyakdigunakandiduniapenerbitandanpercetakanyang disebutdenganSGML, HTML adalahsebuahstandaryang digunakansecaraluasuntukmenampilkanhalamanweb danHTML kinimerupakanstandarInternetyang saatinidikendalikanolehWorld Wide Web Consortium (W3C). VersiterakhirdariHTML adalahHTML 4.01, meskipunsaatinitelahberkembangXHTMLyang merupakanpengembangandariHTML. 17 HTML HTML berupakode-kodetag yang menginstruksikanbrowser untukmenghasilkantampilansesuaidenganyang diinginkan. Sebuahfile yang merupakanfile HTML dapatdibukadenganmenggunakanbrowser websepertiMozillaFirefoxatauMicrosoftInternet Explorer. HTML jugadapatdikenaliolehaplikasipembukaemail ataupundariPDA danprogram lain yang memilikikemampuanbrowser. 18 HTML Markup/Tanda Secaragarisbesar, terdapat4 jeniselemendariHTML: structural. tandayang menentukanlevel atautingkatandarisebuahteks(contoh,

Golf

akanmemerintahkanbrowser untukmenampilkan"Golf" sebagaitekstebalbesaryang menunjukkansebagaiHeading 1 presentational. tandayang menentukantampilandarisebuahtekstidakpedulidenganlevel daritekstersebut(contoh, boldface akanmenampilkanbold. Tandapresentational saatinisudahmulaidigantikanolehCSSdantidakdirekomendasikanuntukmengaturtampilanteks, hypertext. tandayang menunjukkanpranalakebagiandaridokumentersebutataupranalakedokumenlain (contoh, Wikipedia akanmenampilkanWikipediasebagaisebuahhyperlinkkeURLtertentu), Elemenwidgetyang membuatobjek-objeklain sepertitombol(

Tidak ada komentar:

Posting Komentar