• Tidak ada hasil yang ditemukan

Server Side Programmin g I Servlet Funda

N/A
N/A
Protected

Academic year: 2018

Membagikan "Server Side Programmin g I Servlet Funda"

Copied!
12
0
0

Teks penuh

(1)

MODUL PERKULIAHAN

Server-Side

Programmin

g I

Servlet

Fundamenta

ls

(2)

Fakultas Program Studi Tatap eMuka Kode MK Disusun Oleh

Ilmu Komputer Sistem Informasi

04

Misbahul Fajri, ST., MTI

Abstract

Kompetensi

Outline

 Common server-side programming techniques

Revisiting the Three-tier Model

Web-based e-commerce applications are usually built according to the “Three-tier Model” (Fig. 4.1), which includes:

 The First-tier: Web Client

 Discussed in Chapter 3

 The Second-tier: Server-side Application (SSA)  Discussed in this chapter

 The Third-tier: Database Management Systems (DBMS)  Discussed in Chapter 5

(3)

Server-side programming

technologies

There are numerous ways to implement server-side applications. Common examples include:

 CGI (Common Gateway Interface)

 ASP (Active Server Page)

 Java Servlets

 PHP, Perl, & other server programming languages

Databa

First-tier : Web

Clients

Second-tier :

Server-side Web

Applications

Cluster(s)

QLS

(4)

Common Gateway Interface (CGI)

 Early Web page designs were “static” in the sense that a client can only request for a static

HTML document from the Web server (Fig. 4.2).

 Later, CGI programming techniques were introduced to remove this constraint by providing

dynamic Web pages via server-side interaction, as shown in Fig. 4.3.

Static Web Page Retrieval (Fig. 4.2)

CGI-based Web Application (Fig. 4.3)

HTTP Request

HTTP

Document

Retrieve

Document

Request

for

Web

Document

Documents

Web

Web Browser

(5)

Common Gateway Interface (CGI)

 Fig. 4.3 explains the retrieval of a static Web page. The Web browser goes to the designated

URL on a specific Web server to retrieve the required static HTML document when it receives a client request.

 Note the content is independent of the request, in the sense, everyone who makes a request

to that particular URL gets the same document.

Active Server Page (ASP)

 ASP is a "scripting" technique that runs on Web servers rather than Web clients.This

contrasts with VBScript and JavaScript which run on web clients.

 It basically generates HTML documents for the Web client.

 Execution of the ASP code by the server returns the corresponding HTML document to the client.

 Fig. 4.4 shows the schematic diagram of ASP model.

Get Data

Browser

Web Server

Databas

e

(6)

ASP Model (Fig. 4.4)

Disadvantages of CGI programs

 Each new request activates a new process to run the CGI program

 Creating a process requires time and resource so CGI programs is not as scaleable a solution  Also, CGI programs may raise security problems

Java Servlet

 A servlet is a small piece of server-side application, which can be viewed as the server-side analog of an applet.

 In a typical servlet application, a servlet-enabled Web server receives an HTTP request from

the client.

ASP Engine

HTTP Request

HTTP Document

Web Browser

Web Server

(7)

 It then forwards the request to the servlet engine for performing the necessary operations as

specified by the program.

 Finally it returns a response (e.g., HTML document) to the client via the Web server (Fig. 4.5)

Typical Web-based Servlet Interaction (Fig. 4.5)

Revisiting the Three-tier Model

Web-based e-commerce applications are usually built according to the “Three-tier Model” (Fig. 4.1), which includes:

 The First-tier: Web Client  Discussed in Chapter 3

 The Second-tier: Server-side Application (SSA)

 Discussed in this chapter

 The Third-tier: Database Management Systems (DBMS)

 Discussed in Chapter 5

Servlet

Engine

HTTP Request

HTTP Response

Web

Browser

Web Server

(8)

Three-Tier Model (Fig. 4.1)

Server-side programming

technologies

There are numerous ways to implement server-side applications. Common examples include:

 CGI (Common Gateway Interface)  ASP (Active Server Page)

 Java Servlets

 PHP, Perl, & other server programming languages

Databa

First-tier : Web

Clients

Second-tier :

Server-side Web

Applications

Cluster(s)

QLS

(9)

Common Gateway Interface (CGI)

 Early Web page designs were “static” in the sense that a client can only request for a static

HTML document from the Web server (Fig. 4.2).

 Later, CGI programming techniques were introduced to remove this constraint by providing dynamic Web pages via server-side interaction, as shown in Fig. 4.3.

Static Web Page Retrieval (Fig. 4.2)

CGI-based Web Application (Fig. 4.3)

HTTP Request

HTTP

Document

Retrieve

Document

Request

for

Web

Document

Documents

Web

Web Browser

(10)

Common Gateway Interface (CGI)

 Fig. 4.3 explains the retrieval of a static Web page. The Web browser goes to the designated

URL on a specific Web server to retrieve the required static HTML document when it receives a client request.

 Note the content is independent of the request, in the sense, everyone who makes a request

to that particular URL gets the same document.

Active Server Page (ASP)

 ASP is a "scripting" technique that runs on Web servers rather than Web clients.This

contrasts with VBScript and JavaScript which run on web clients.

 It basically generates HTML documents for the Web client.

 Execution of the ASP code by the server returns the corresponding HTML document to the client.

Browser

Web Server

Databas

e

(11)

ASP Model (Fig. 4.4)

Disadvantages of CGI programs

 Each new request activates a new process to run the CGI program

 Creating a process requires time and resource so CGI programs is not as scaleable a solution  Also, CGI programs may raise security problems

Java Servlet

 A servlet is a small piece of server-side application, which can be viewed as the server-side analog of an applet.

 In a typical servlet application, a servlet-enabled Web server receives an HTTP request from

the client.

ASP Engine

HTTP Request

HTTP Document

Web Browser

Web Server

(12)

 It then forwards the request to the servlet engine for performing the necessary operations as

specified by the program.

 Finally it returns a response (e.g., HTML document) to the client via the Web server (Fig. 4.5)

Daftar Pustaka

Gambar

Fig. 4.4 shows the schematic diagram of ASP model.
Fig. 4.4 shows the schematic diagram of ASP model.

Referensi

Dokumen terkait

The study was conducted to attempt to evaluate production potentials of green back mullet at on-station of Bangladesh Fisheries Research Institute (BFRI) Brackishwater Station

Joint effect of credit default swap (CDS) inception and chief executive officer (CEO) compensation on bankruptcy risk. This table reports the joint effect of CDS inception

Hasil penelitian juga menunjukkan bahwa lama pemeraman tidak berpengaruh terhadap kadar protein kasar, kadar serat kasar dan kadar bahan eksfiak tanpa nitrogen (BETN) (p0,05).

Dengan ini menyatakan bahwa skripsi dengan judul “ Pengaruh Kepercayaan dan Persepsi Risiko Terhadap Minat Membeli Secara Online Pada Pengunjung Website Classifieds

Universitas Negeri

This situation appears to confirm Fullan’s argument that professional development "is still too divorced from the life of organization, not yet organically connected to every

gambar, melalui media komunikasi politik 2.0, dalam hal ini jejaring sosial maya facebook “ We Are All Khaled Said ”, kepada anggota komunitas akun tersebut, yang

harus memberikan kesempatan kepada peserta didik yang lain untuk menjelaskan tugas kelompoknya agar ketergantungan terhadap peserta didik yang lain dapat dikurangi,