ARCHITETTURA SW E HW DI UN SITO WEB

annuncio pubblicitario
ARCHITETTURA SW E HW
DI UN SITO WEB
WEB DESIGNER VIEW
• Un sito web è un sistema composto da
componenti HW e SW
• I componenti SW sono applicazioni WEB
sviluppate secondo una precisa architettura
Client-Server
INTERNET CLIENT SERVER
Nome Dominio
Indirizzo IP
DNS
HTTP
REQUEST
(GET, POST)
Applicazioni
Applicazioni
CLIENT
CLIENT
CLIENT
CLIENT
(Browser)
(Browser)
Web
WebServer
Server
HTTP
RESPONSE
(pag. HTML)
Applicazioni
Applicazioni
SERVER
SERVER
APPLICAZIONI CLIENT
Strumenti
• Applet JAVA
• JAVA-script
• ...
Esempio Java
Script
<HTML>
<HEAD>
<SCRIPT LANGUAGE=“LiveScript”>
Function pushbutton ()
Alert (“Ciao”);
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE=“button” name=“button1”
value=“ Premi “ onclick=“pushbutton()”>
</FORM>
</BODY>
</HTML>
APPLICAZIONI SERVER
Strumenti
• Perl
• Java servlets
• JSP
• ASP
• PHP
Esempio JSP
<html> <head>
<title>Welcome user</title>
</head>
<%@ include file="dukebanner.html" %>
<table border="0" width="700">
<tr>
<td width="150">   </td><td width="550">
<h1>My name is Duke. What's yours?</h1>
</td></tr><tr><td width="150"   </td>
<td width="550">
<form method="get">
<input type="text" name="myName" size="25">
<br>
<input type="submit" value="send name">
<input type="reset" value="reset">
</td>
</tr>
</form>
</table>
Welcome <%=request.getParameter("myName")%>
</body></html>
HTTP
REQUEST
(GET, POST)
http://dominio/nomeprog.ext
Valori di .ext
.htm .html
.cgi
.java
.jsp
...
HTTP
HTTP
RESPONSE
(pag. HTML)
WEB SERVER
Web Server manda in
esecuzione l’interprete
Associato all’ext
Web
WebServer
Server
Il programma eseguito
restituisce un testo
HTML
HTTP
REQUEST
(GET, POST)
http://dominio/nomeprog.ext
APPLICATION SERVER
Web
WebServer
Server
Application
Application
Server
Server
HTTP
RESPONSE
(pag. HTML)
Ad esempio mod_php
Un application server serve
per semplificare gli
applicativi, offre agli
applicativi servizi
preconfezionati.
Se è compatibile Enterprise
Java Bean permette di
scrivere applicativi non
dipendenti dal SO e dagli
strumenti usati, ad esempio
tipi di DB.
E’ una specie di
middleware.
I DATI
Web
WebServer
Server
Application
Application
Server
Server
DB
Ad ogni richiesta WS
attiva un’applicazione
che termina restituendo
la risposta (file HTML).
Lo stato dell’applicazione
deve essere
necessariamente
mantenuto mediante
un DB, o comunque un
meccanismo di “store”
di dati permanenti.
Il DB serve anche per il
Content-Management,
User Management,
Community
ESEMPIO DI ARCHITETTURA COMPLETA
Business Logic/
Application
Load Balancing
USER INTERFACE
Pagine
HTML e
Applicazioni
front end
Services and DBs
Content
Managem.
Content
User
Managem.
E-comm
Queries
User
Management
Data
DMZ
Front end: ad es.Linux +
Web Server Apache +
Jserv
Middle tier ridondato
Back end
e-commerce
Data
ARCHITETTURA HW
BACK END SERVER
USERS
FIREWALL
FRONT END
CMS
Responses
Requests
WEB SERVER (APACHE)
Scarica