Download presentation
Presentation is loading. Please wait.
1
Fundamentals of WEB Programming
2
The Web There is no such protocol, called “WEB”, it is a non-technical expression! HTTP: The protocol used by modern web browsers to access webpages. It is a client-server textual protocol (originally a 7-bit protocol!) that uses host names Client: The computer that initiates the connection Server: The computer that accepts the connection and provides the data
3
Subdomain/IP assignments
A DNS zone file Subdomain/IP assignments
4
How it works? Internet Home network Root NS Provider Home network
facebook.com
5
How to start? The future owner of facebook.com buys a computer (real or virtual) and subscribes an internet connection The internet connection must be 7/24, unfiltered, with a static IPv4 address (IPv4 exhausted: , only available from ISPs) Then the domain name facebook.com must be registered via a domain registrator (registrar), and must be renewed once in every years The root servers contain every IP-DNS association. Only dedicated (“country- level”) DNS servers can access the root name servers. Every other computer must use the name server provided by the ISP (Alternative: )
6
DNS resolution Send results (or authority info)
Local cache Send results (or authority info) Not in cache Home router Send results (or authority info) Not in cache ISP Not in cache Send results (or authority info) Root / additional DNS
7
Internet vs. WEB Internet marika.hu zoo.com theater.com school.com
receptek.html cats.html allatok.html dogs.html marika.hu zoo.com intro.html math.html Internet faq.html arts.html theater.com school.com
8
WEB: The documents spreaded all over the world can link to each other
Internet vs. WEB WEB: The documents spreaded all over the world can link to each other receptek.html cats.html allatok.html dogs.html marika.hu zoo.com intro.html math.html Internet faq.html arts.html WEB theater.com school.com
9
Three standards hirek allas cimlap.html URL (Uniform Resource Locator)
belfold.html allas ajanlatok.html cimlap.html
10
Three standards HTML (Hyper Text Markup Language)
Document formatter standard Extensible with other document parts (e.g. styles=CSS, scripts=JS) <table border = "1"> <tr> <th>I. hely</th> <th>II. hely</th> <th>III. hely</th> </tr> <td>Béla</td> <td>Gizi</td> <td>Saci</td> </table> eredmeny.html contents Shown in browser
11
Three standards HTTP (Hyper Text Transfer Protocol)
12
HTTP Testable from home Execute -> cmd.exe Install telnet:
pkgmgr /iu:"TelnetClient„ Establish TCP connection: telnet users.nik.uni-obuda.hu 80 Send command: GET /kovacs.andras/webprog/hello.html HTTP/1.0 Host: users.nik.uni-obuda.hu
13
HTTP GET /kovacs.andras/webprog/hello.html HTTP/1.0 HTTP commands
GET method We want the contents of the document URL without hostname Full path, filename with extension Version number 1.0 or 1.1 HTTP/2: published in the end of 2015 13.7% supported in May 2017
14
HTTP HTTP methods Method Description HEAD GET POST PUT DELETE
Get only the HTTP headers GET Get the whole document POST Send data to server (form data, can encode files too) PUT Send file to the server (Historically. Now: REST API) DELETE Remove file from the server (Historically. Now: REST API)
15
HTTP HTTP is a stateless protocol – no built-in session management
By default, every request is connection:close Even when using connection pooling, two requests cannot be paired Solution: cookies/sessions Local vs server-side storage
16
Cookies OE NIK PHP/Symfony
17
Session OE NIK PHP/Symfony
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.