Bài giảng Lập trình Web - Chapter 0: Overview - Nguyễn Hữu Hiếu

Chapter 0  
Overview  
Nguyễn Hữu Hiếu  
Books and references  
n Stepp,Miller,Kirst. Web Programming Step by Step.( 1st  
Edition, 2009), Companion Website:  
n Robin Nixon. Learning PHP, MySQL, JavaScript, CSS &  
HTML5. A Step-by-Step Guide to Creating Dynamic  
Websites. (3rd Edition, 2015).  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
2
Content  
n HTML5 + Forms  
n CSS + CSS3  
n JavaScript  
n PHP  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
3
Grading  
n Bài tập: 10%  
n Thực hành: 10%  
n Assignment: 40%  
n Final Exam: 40%  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
4
Introduction to the Internet & the Web  
The Internet  
n Developed beginning in the 1960s, sponsored by  
ARPA (Dept. of Defense Advanced Research  
Projects Agency).  
n Protocol for communication between computers is  
called TCP/IP: Transmission Control Protocol /  
Internet Protocol.  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
6
Before the Web  
n Internet was already existing  
n Resources on the internet were found using command line  
tools like FTP  
n Example:  
– Run ftp program  
– Enter “C host” (connects to a server) – Enter username  
– Enter password  
– Ls (lists files)  
– Get file  
– Cd (change directory)  
n There were no links  
n You had to know where the information was  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
7
The Invention  
n 1989 – Tim Berners Lee proposes at CERN a  
way to organise information using hyperlinks  
n 1990 – he develops the first browser –  
“World Wide Web”  
n 1991 – first web server  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
8
Conclusions  
n World wide web was first a way to link text  
documents  
n It evolved into  
n
n
n
Providing different kinds of content (images, video)  
providing services for people (games, answers, news)  
Providing means for people to create content (wikis,  
forums, social networking applications, blogs)  
n
Providing services for computers  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
9
Conclusions  
n The content was first static – text pages that were  
rarely changed and only by the owner  
n Content became dynamic updated from the  
server’s database  
n Content became updated real time (without  
refreshing the page using asynchronous  
technologies)  
n Content comes from different sources and it’s  
aggregated on a page  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
10  
How the web works  
n The client-server model  
n Client and server operate on machines which are able to  
communicate through a network  
n The server waits for requests from a clients  
n Server receives a requests from a client  
n
n
n
Performs a the requested work  
Or lookup the requested data  
And send a response to the client  
n Servers: file servers, web servers, name servers  
n Clients: browsers, email clients  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
11  
How the web works  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
12  
URL format  
n URL: Uniform Resource Locator  
n <scheme>://<server-domain-  
name>/<pathmane>  
n
n
n
n
<scheme> which protocol to use  
http: Hypertext Transfer Protocol  
file: which tells the client document is in a local machine  
ftp: file transfer protocol  
<server-domain-name> identifies the server system  
n
i.e. hcmut.edu.vn  
<pathname> tells the server where to find the file  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
13  
Web browsers and servers  
n A browser: is a program that can retrieve files  
from the world wide web and render text, images,  
or sounds encoded in the files.  
n
i.e. IE, Google Chrome, FireFox, Opera, Safari,...  
n A web server: is an application which waits for  
client requests, fetches requested documents from  
disk and transmits them the client.  
n
i.e Apache, IIS, Nginx,…  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
14  
What happened when you click on hyperlink?  
n Determine URL and extract domain name.  
n Use the name server to get Internet Protocol  
n (IP)address Domain Name System(DNS)  
n Make a Transmission Control Protocol (TCP) connect to  
port 80  
n And send a request for a web page once the server  
has accepted to connection.  
n The server send the file and releases the TCP  
connection  
n The client displays the document.  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
15  
Stateless connection  
n Both client and server release TCP connection after a page  
has been transferred.  
n HTTP1.0 is stateless  
n
Connections are not persistent  
n
There is no indication to the server whether new transactions  
involve the same client  
n HTTP 1.1 is persistent  
n
By keeping track of the client IP addresses  
n
However, there is no way of identifying a repeated visits to the site  
by the same user.  
n
Furthermore, Internet Service Provider (ISP)s reallocate IP  
addresses to dial-up customers as new user dial in.  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
16  
Cookies  
n Request the browser to store a small data file  
(cookie) on the users hard disk.  
n Which can serve to identify users only.  
n For instance it could contain a key into a database  
on the server machine.  
n Most browsers nowadays allow you to decide  
whether or not you want cookies on your machine.  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
17  
W3C  
n The World Wide Web Consortium (W3C) is an  
international community where Member  
organizations, a full-time staff, and the public work  
together to develop Web standards. Led by Web  
inventor Tim Berners-Lee and CEO Jeffrey Jaffe,  
W3C's mission is to lead the Web to its full  
potential.  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
18  
Tài Liệu Tham Khảo  
n [1] Stepp,Miller,Kirst. Web Programming Step by Step.( 1st  
Edition, 2009) Companion Website:  
n [2] W3Schools,  
Trường Đại Học Bách Khoa TP.HCM  
Khoa Khoa Học và Kỹ Thuật Máy Tính  
© 2017  
Lập Trình Web  
19  
pdf 19 trang myanh 24960 Free
Bạn đang xem tài liệu "Bài giảng Lập trình Web - Chapter 0: Overview - Nguyễn Hữu Hiếu", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_lap_trinh_web_chapter_0_overview_nguyen_huu_hieu.pdf