CMPT 165 CMPT 165 INTRODUCTION TO THE INTERNET INTRODUCTION TO THE - - PowerPoint PPT Presentation

cmpt 165 cmpt 165
SMART_READER_LITE
LIVE PREVIEW

CMPT 165 CMPT 165 INTRODUCTION TO THE INTERNET INTRODUCTION TO THE - - PowerPoint PPT Presentation

CMPT 165 CMPT 165 INTRODUCTION TO THE INTERNET INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB AND THE WORLD WIDE WEB By Hassan S. Shavarani UNIT1: THE INTERNET AND THE WORLD WIDE WEB UNIT1: THE INTERNET AND THE WORLD WIDE WEB 1


slide-1
SLIDE 1

CMPT 165 CMPT 165

INTRODUCTION TO THE INTERNET INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB AND THE WORLD WIDE WEB

By

UNIT1: THE INTERNET AND THE WORLD WIDE WEB UNIT1: THE INTERNET AND THE WORLD WIDE WEB

Hassan S. Shavarani

1

slide-2
SLIDE 2

TOPICS TOPICS

  • 4. Protocols
  • 5. Surfing the Web
  • 6. MIME Types
  • 7. Fetching a Web Page
  • 1. Define the Internet
  • 2. History of the Internet
  • 3. Internet Basics

2

slide-3
SLIDE 3

INTERNET PROTOCOLS INTERNET PROTOCOLS How do computers communicate and share information using wired connections?

3

slide-4
SLIDE 4

IP Address Port Static IP Address DEFINITIONS DEFINITIONS

4

slide-5
SLIDE 5

a protocol is an information exchange agreement between the computers its a collection of rules in other words, the protocol is the communication language between computers INTERNET PROTOCOLS INTERNET PROTOCOLS

* image from https://upload.wikimedia.org/wikipedia/commons/6/6 5/Welcome_differentlangs.png

5

slide-6
SLIDE 6

INTERNET PROTOCOLS INTERNET PROTOCOLS ITS GOOD TO KNOW ITS GOOD TO KNOW there might be several protocols that do the same task (like the translations of the word "welcome") but there are also protocols that do specific things that others do not Port Number is most of the times a numerical designation of the protocol (e.g. HTTP is typically served on port 80)

6

slide-7
SLIDE 7

EXAMPLE PROTOCOLS EXAMPLE PROTOCOLS there are many protocols used online, but a few examples will help you understand what they do

7

slide-8
SLIDE 8

BORDER GATEWAY PROTOCOL (BGP) BORDER GATEWAY PROTOCOL (BGP) The language with which ISPs communicate!

8

slide-9
SLIDE 9

SIMPLE MAIL TRANSPORT PROTOCOL (SMTP) SIMPLE MAIL TRANSPORT PROTOCOL (SMTP) used by email clients (Outlook, Thunderbird, or a webmail client) e.g. used to send an email from from your university email server to Gmail

9

slide-10
SLIDE 10

SECURE FILE TRANSFER PROTOCOL (SFTP) SECURE FILE TRANSFER PROTOCOL (SFTP) used to copy files between computers (e.g. to transfer a file to a web server so others can see it) can only be used when you have an account on the other computer you enter a username and password to confirm your identity and then can manage your files

10

slide-11
SLIDE 11

PROPRIETARY PROTOCOLS PROPRIETARY PROTOCOLS Let's assume a multilayer online game (e.g. Counter- Strike or Call of Duty) how does each player instance communicate to the

  • thers?

what will each communication message contain?

11

slide-12
SLIDE 12

OTHER PROPRIETARY PROTOCOLS OTHER PROPRIETARY PROTOCOLS Network gaming: already mentioned! Instant messaging: iMessage and Skype, others Yahoo!, Google, Facebook. Peer-to-peer file transfer: Napster, Apple’s AirDrop, BitTorrent (sort of) Streaming: iTunes, Netflix, YouTube, Vimeo, CBC Music

12

slide-13
SLIDE 13

HYPERTEXT TRANSFER PROTOCOL (HTTP) HYPERTEXT TRANSFER PROTOCOL (HTTP) The protocol of our interest in this course

13

slide-14
SLIDE 14

WHAT IS A HYPERTEXT ? WHAT IS A HYPERTEXT ?

[*]

“HyperText is text ... with references (hyperlinks) to other text that the reader can immediately access ...[*]”

https://en.wikipedia.org/wiki/Hypertext

14

slide-15
SLIDE 15

HYPERTEXT TRANSFER PROTOCOL (HTTP) HYPERTEXT TRANSFER PROTOCOL (HTTP)

[*]

“HTTP is an application protocol for distributed, collaborative, and hypermedia information systems. HTTP is the foundation of data communication for the World Wide

  • Web. ...[*]”

https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

15

slide-16
SLIDE 16

HYPERTEXT TRANSFER PROTOCOL (HTTP) HYPERTEXT TRANSFER PROTOCOL (HTTP) the protocol that is used for the World Wide Web whenever your browser requests a page, it does it by contacting a web server and making the request with HTTP the server then responds by sending the page, again with HTTP

16

slide-17
SLIDE 17

in the course of your action SURFING THE WEB SURFING THE WEB when you click on a link in your web browser, you are making a request for a web page your web browser on your computer is acting as the client for this request tools (e.g. search engines or HTML validators) can act as clients as well! your web browser contacts a web server to make its request

17

slide-18
SLIDE 18

A WEB REQUEST DEMONSTRATION A WEB REQUEST DEMONSTRATION

* image from https://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Scheme_static_page_en.svg/1200px- Scheme_static_page_en.svg.png

18

slide-19
SLIDE 19

What is the very least piece of information that we need to request a webpage?

19

slide-20
SLIDE 20

UNIFORM RESOURCE LOCATOR (URL) UNIFORM RESOURCE LOCATOR (URL) URL is used by a web browser (or other tool) to find (locate) a page or other content (a resource) on the web

scheme(protocol) server(host name) path

* image from http://www.cs.sfu.ca/CourseCentral/165/common/study-guide/figures/url.svg

20

slide-21
SLIDE 21

NAME TO IP ADDRESS LOOKUP NAME TO IP ADDRESS LOOKUP

* image from http://cdn.ttgtmedia.com/rms/onlineImages/DNS_servers_desktop.jpg

21

slide-22
SLIDE 22

MULTIPURPOSE INTERNET MAIL EXTENSION (MIME) TYPES MULTIPURPOSE INTERNET MAIL EXTENSION (MIME) TYPES The standard way of indicating the type of the document being sent via HTTP

22

slide-23
SLIDE 23

MIME TYPE EXAMPLES MIME TYPE EXAMPLES

Type Description Example of typical subtypes text Represents any document that contains text and is theoretically human readable text/plain, text/html, text/css, text/javascript image Represents any kind of images. Videos are not included, though animated images (like animated gif) are described with an image type. image/gif, image/png, image/jpeg, image/bmp, image/webp audio Represents any kind of audio files audio/midi, audio/mpeg, audio/webm, audio/ogg, audio/wav video Represents any kind of video files video/webm, video/ogg application Represents any kind of binary data. application/octet-stream, application/pkcs12, application/vnd.mspowerpoint, application/xhtml+xml, application/xml, application/pdf

* table from https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

23

slide-24
SLIDE 24

FETCHING A WEB RESOURCE USING HTTP FETCHING A WEB RESOURCE USING HTTP EXAMPLE REQUEST EXAMPLE REQUEST

GET /assets/cmpt165.txt HTTP/1.1 Host: mytesthost.com User-Agent: The Imaginary Browser

24

slide-25
SLIDE 25

FETCHING A WEB RESOURCE USING HTTP FETCHING A WEB RESOURCE USING HTTP EXAMPLE RESPONSE EXAMPLE RESPONSE

HTTP/1.1 200 OK Last-Modified: Mon, 23 Jul 2017 08:41:56 GMT Content-Length: 36 Content-Type: text/plain this is my awesome coding experience

25

slide-26
SLIDE 26

now that we have seen how the web pages get from the server to the browser, we should turn to how they are actually made. that is what we're going to be spending most of the course learning about

26

slide-27
SLIDE 27

WEBPAGE CREATION TECHNOLOGIES WEBPAGE CREATION TECHNOLOGIES there are three different technologies used to create web pages and they cover three main aspects of a web page Content: HTML (HeperText Markup Language) Appearance: CSS (Cascading Style Sheets) Behaviour: JavaScript

27

slide-28
SLIDE 28

WHAT IS A MARKUP LANGUAGE ? WHAT IS A MARKUP LANGUAGE ?

[*]

“A markup language is a system for annotating a document in a way that is syntactically distinguishable from the text ...[*]”

https://en.wikipedia.org/wiki/Markup_language

28

slide-29
SLIDE 29

GENERALIZED MARKUP LANGUAGES GENERALIZED MARKUP LANGUAGES

GML

Generalized Markup Language

SGML

Standard Generalized Markup Language

XML

eXtensible Markup Language

HTML

HyperText Markup Language Simplified, Loosen rules, Applied to web layout definition Simplified, Keep most useful features, Applied to data transfer

XHTML

eXtensible HyperText Markup Language Re-tighten rules, not forgiving

* idea from http://images.slideplayer.com/33/8232613/slides/slide_17.jpg

29

slide-30
SLIDE 30

HYPERTEXT MARKUP LANGUAGE (HTML) HYPERTEXT MARKUP LANGUAGE (HTML) is used to describe the content of pages its usually what people are talking about when they mention a web page it expresses things like this is a paragraph or this is an important word it is not concerned about how things look

30

slide-31
SLIDE 31

CASCADING STYLE SHEETS (CSS) CASCADING STYLE SHEETS (CSS) suggests appearances for the pieces of content we have created in HTML expresses ideas like all paragraphs should have this font size with CSS

31

slide-32
SLIDE 32

JA VASCRIPT JA VASCRIPT is a programming language that is embedded in web browsers can be used to insert logic and behaviour into web pages

32

slide-33
SLIDE 33

WHY WE NEED TO SEPARATE CONTENT, APPEARANCE, WHY WE NEED TO SEPARATE CONTENT, APPEARANCE, AND BEHA VIOUR? AND BEHA VIOUR? Efficiency: less files to be downloaded in the browser (caching will be possible) Faster Development: not everything is written again and again in every page (different people can work on different parts of the page) Easier to Maintain: a single change will be made

  • nce!

33

slide-34
SLIDE 34

Any Questions?

34