CSSE280: Introduction to Web
Programming
Introductions, Internet, WWW, HTML Intro
Rose-Hulman Institute of Technology
Intro to Course
Front-end development
Back-end development
Node.js
Data-driven application
MongoDB
REST API
2
Agenda
Roll call, course introduction
In-class partners
Visual Studio Code installation
The Internet and the World Wide Web
HTML Intro
3
Roll call, Introductions
Student Introductions (Name, Hometown, Web development experience)
v Listen to other students’ Web dev background
v One of them will be your in-class partner
v You should partner with someone with similar experience
Student Assistants Introductions
v Jake, Stefan (Section 1)
v Steven, Zach (Section 2) 4
More Introductions, partner selection
Instructor Introductions
v Why I am doing this course (passion for Web dev, learn by teaching)
v We will all learn from each other
v Teach web services development
In-class partner selection, sign contract
5
Course intro
Course Schedule Page
v https://www.rose-hulman.edu/class/csse/csse280/201710/Schedule/Schedule.htm
v Resource column is of paramount importance
v Due date column is also very important
Course Piazza Page
v https://piazza.com/rose-hulman/fall2016/csse280
v Announcements, Q&A, bug reports (earn extra points!)
6
Course Syllabus
Course Grades
Weight Grade Component
10% Attendance, participation in-class, online, & with in-class partner
10% Quizzes
25% Graded Homework Assignments (6 to 8)
30% Exams (Thursday of weeks 3, 6, & 9), no finals
25% Term Project
Read the syllabus before next class
7
Install Visual Studio Code
http://code.visualstudio.com/Download
v Installation instructions:
https://www.rose-hulman.edu/class/csse/csse280/201710/Software/vscodeInstallation.pdf
v Launch from Terminal/Command Prompt
v Install extensions to add themes, languages, debuggers, additional services
v Built-in support for Git
v IntelliSense
8
5-mins break
Break every class
Get help finishing installation
of VS Code
Can use other editor if you
prefer
9
Internet vs World Wide Web
The Internet
v Network of networks that use the Internet protocol
suite to link billions of devices worldwide
v Consists of millions of private, public, academic,
business, government networks
v Networks linked together by electronic, wireless, &
optical networking technologies
v Carries information resources and services, e.g. WWW
10
Brief history of the Internet
The Internet
v Began as a US Department of Defense network called ARPANET (1960s-70s)
v Initial services: electronic mail, file transfer
v Opened to commercial interests and most universities in late 80s
v WWW created in 1989-91 by Tim Berners-Lee
v Early web browsers released: Mosaic 1992, Netscape 1994, Internet Explorer 1995
v Amazon.com opens in 1995; Google January 1996 11
Internet: Layered Network Architecture
v Physical layer: devices such as Ethernet, coaxial
cables, fiber-optic lines, modems
v Data link layer: basic hardware protocols
(ethernet, wifi, DSL PPP)
v Network / internet layer: basic software protocol (IP)
v Transport layer: adds reliability to network layer
(TCP, UDP)
v Application layer: implements specific communication
for each kind of program (HTTP, POP3/IMAP, SSH, FTP) 12
Internet Protocol (IPv4)
v Simple protocol for attempting to exchange data between two computers
v Each device has a 32-bit IP address written as four 8-bit numbers (0-255)
v Find out your internet IP address:
http://ip-lookup.net/
v Find out your local IP address:
in a terminal window, type: ipconfig (Windows) or
ifconfig (Mac/Linux)
v Rose-Hulman’s IP addresses begin with 137.112
13
Transport Control Protocol (TCP)
v Adds multiplexing and guaranteed packet delivery on top of IP
v Multiplexing: multiple programs using the same IP
port: a number given to each program or service
port 80: web client (port 443 for secure web browsing)
port 25: email
port 22: ssh and sftp
port 27017: mongoDB
v Some programs (games, streaming media programs) use simpler UDP protocol instead of TCP
14
World Wide Web
The WWW comprises Web Servers and Web Browsers
v Web Server: software that listens for Web page requests and serves up the requested pages
Apache - http://www.apache.org
Microsoft Internet Information Server (IIS) - http://www.iis.net/
Express - https://expressjs.com
Phusion Passenger - https://www.phusionpassenger.com
15
World Wide Web
The WWW comprises Web
Servers and Web Browsers
v Web browser: gets and renders
documents from servers
Popular browsers
16
Organizations you should know
Internet Engineering Task Force (IETF)
v internet protocol standards
Internet Corporation for Assigned Names and Numbers (ICANN)
v decides top-level domain names
World Wide Web Consortium (W3C)
v web standards
17
Domain Name System (DNS)
Set of servers that map domain names to IP addresses
v Example:
www.rose-hulman.edu è 137.112.18.53
v DNS Lookup Tool
http://mxtoolbox.com/DNSLookup.aspx
18
Uniform Resource Locator (URL)
Web Address OR an ID for the location of a Web resource on a computer network
v http://www.rose-hulman.edu/class/csse/csse280/index.html
protocol host path
When this URL is entered in the browser, it would:
v Ask the DNS server for the IP address of www.rose-hulman.edu
v Connect to that IP address at port 80
v Ask the server to GET /class/csse/csse280/index.html and display the result in the browser
19
Advanced URLs
Anchor: jumps to a given section of a page
v http://en.wikipedia.org/wiki/HTML_element#Anchor
Fetches the HTML_element document, then jumps to the part of the page labeled Anchor
Port: for web servers on ports other than the default port 80
v http://portquiz.net:8080/index.php
20
Advanced URLs
Query string: a set of parameters passed to a web application
http://www.google.com/search?q=miserable+failure&start=10
v parameter named q is set to value miserable+failure
v Parameter named start is set to value 10
21
Hypertext Transfer Protocol (HTTP)
Defines a set of commands understood by a Web server and sent from a browser
Some HTTP commands (your browser sends these internally)
v GET resource -- requests data from a specified resource
v POST resource -- submits data to be processed to a specified resource
v PUT resource -- uploads a representation of the specified URL
v DELETE resource -- deletes the specified resource
22
HTTP status codes
When a request is made by the browser, a response is sent back by the server with a
status code, possibly followed by a Web resource
Number Meaning
200 OK
301-303 Page has moved (temporarily or permanently)
403 It is forbidden to access this page
404 Page not found
500 Internal server error
Complete list of HTTP status codes 23
Internet Media Types (MIME)
Sometimes when including other resources in a Web page (stylesheet, image,
multimedia object), we specify their type of data
MIME Type File Extension
text/html .html
text/plain .txt
image/gif .gif
image/jpeg .jpg
videeo/quicktime .mov
application/octec-stream .exe 24
Basic HTML
Defines the content and structure of information on a page
v Not the same a presentation (appearance in the browser)
Surrounds text content with opening and closing tags
Each tag’s name represents an HTML element
v Syntax: <tagname>Content goes here...</tagname>
Most whitespace is collapsed or ignored in HTML
We will use HTML5 syntax
25
Structure of HTML page
DOCTYPE tells browser to interpret <!DOCTYPE html>
<html>
code as HTML5
<head>
HTML page is save in a file with information about the page
</head>
extension .html
The header describes the page, and <body>
page contents
the body holds the page’s content </body>
</html>
26
Page title: <title>
Describes the title of the page <!DOCTYPE html>
<html>
Displayed in the Web browser’s <head>
title bar and when bookmarking a <title>Introduction to HTML </title>
</head>
page
<body>
page contents
</body>
</html>
27
Paragraph: <p>
Describes a paragraph of text <!DOCTYPE html>
<html>
(block element)
<head>
This is placed within the body of <title>Introduction to HTML </title>
</head>
the page
Examples: <body>
<p>This is a paragraph of text </p>
v http://www.w3schools.com/tags/tryit.as </body>
p?filename=tryhtml_paragraphs2 </html>
28
Headings: <h1>, <h2>, … <h6>
<!DOCTYPE html>
Separate major areas of a page <html>
(block element) <head>
<title>Introduction to HTML </title>
This is placed within the body of </head>
the page
<body>
Examples: <p>This is a paragraph of text </p>
<h1>University of Smart People</h1>
v http://www.w3schools.com/tags/tryit.as
<h2>Department of Computer Science</h2>
p?filename=tryhtml_headers <h3>Sponsored by Big Rich Corporation</h3>
<h6>We teach the best stuff here!</h6>
</body>
</html> 29
Questions?