Spring 2023
Slides credited to Joel Ross
Email xuhaixu@uw.edu
Zoom https://washington.zoom.us/my/orsonxuhaixu
Office Hours Thu 4 - 6 PM @ MGH080 or Zoom
(starting from 2nd week)
Email xuhaixu@uw.edu
Zoom https://washington.zoom.us/my/orsonxuhaixu
Office Hours Thu 4 - 6 PM @ MGH015H or Zoom
(starting from 2nd week)
[Not required]
In person: introduce to yourself to your neighbor! Meet someone new!
(Online: post a greeting in the chat, and then respond to someone else's greeting. Have an unthreaded conversation! Embrace chaos.)
Shangzhen Yang (they/them)<shangy24@uw.edu>
Section BA: MGH430
Tue 3:30p - 4:20p
Office H: Tue 4:30 - 5:30 PM PT, or by appointment (on Zoom)
Arnav Gupta (he/him)
<agupta8@uw.edu>
Section BB: MGH430
Wed 12:30a - 1:20p
Office Hours: Mon 2 - 3 PM PT, or by appointment (on Zoom)
Lectures will be used to review and demo the material.
We also put some demo videos from previous courses.
You are welcomed to watch them before/after the class.
https://sprinter-rehost.web.app (Su22)
https://pokedex340-8ec91.web.app/ (Sp22)
https://huskyswaps-e2042.web.app/items (Wi22)
https://project-skincare-proposal.web.app (Wi22)
https://subscriptr.web.app/ (Wi22)
https://project-minionsville.web.app/ (Au22)
https://moody-340.web.app/ (Au22)
https://ecolife-30294.web.app/ (Au22)
Project Proposal
Draft 1 (Static Mockup)
Draft 2 (React)
Final Version
We will also provide accommodations for illnesses/accessibility/etc.
5 credit course = 15 hour per week commitment (link)
Autumn 2022
Class & Lab Work (5 hr/week)
At Home Work (10 hr/week)
5 credit course = 15 hour per week commitment (link)
protocol
domain
resource
"Hi Wikipedia, I'd like you to send me the Informatics page!"
two
t
(how to handle info)
(who has info)
(what info you want)
Web Server
Response
Request
+
=
We will be working with branches in this class. The "starter" lecture code is on its own branch, and we'll do work on the "completed" branch
git branch
List available branches
git branch [my_branch]
Create a new branch called "my_branch"
git checkout [my_branch]
Switch to branch "my_branch"
git merge [other_branch]
Merges changes from other_branch into the current branch.
"this is a heading, this is a paragraph, this is a definition, this is a hyperlink..."
<tag>
Content
</tag>
<tag>content</TAG>
open/start tag
close/end tag (leading slash)
content
}
ignores whitespace and tag case (use lowercase)
<h1>: a 1st-level heading
<h2>: a 2nd-level heading (and so on, down to <h6>)
<p>: a paragraph of text
<a>: an “anchor”, or a hyperlink
<img>: an image
<button>: a button
<em>: emphasized content (not necessarily
italic). The same as _text_ in Markdown.
<ul>: an unordered list (and <ol> is an ordered list)
<li>: a list item (an item in a list)
<table>: a data table
<form>: a form for the user to fill out
<div>: a division (section) of content. Also acts as an empty
block element (followed by a line break)
<span>: a span (section) of content. Also acts as an empty
inline element (not followed by a line break)
And more at http://www.w3schools.com/tags/ref_byfunc.asp
<tag attributeA="value" attributeB="value">
content
</tag>
Attributes are a space-separated list of names (think: variables) and values.
Values are (almost) always Strings.
NO SPACES!
<html lang="en">
...
</html>
<!-- an image -->
<img src="baby_picture.jpg" alt="a cute baby">
<!-- a is an "anchor" (hyperlink) -->
<a href="https://ischool.uw.edu">iSchool homepage</a>
"hypertext reference"
alternate text for screen readers
source
images have no (text) content so no closing tag
language of document is English
<h1>Hello <em>(with emphasis)</em> world!</h1>open h1
close h1
open em
close em
<p>I <strong>never<strong> make mistakes</p>important text
did not close tag!
<!-- An unordered list (ul) with 3 items.
The second item's content contains an
ordered list (ol) containing 2 items. -->
<ul>
<li>Pigeons</li>
<li>
Swallows:
<ol>
<li>African</li>
<li>European</li>
</ol>
</li>
<li>Budgies</li>
</ul>
cmd + / to
comment a line
comments
Open up the command palette with
F1 or
cmd-shift-p for quick access to commands.
<html lang="en">
<body>
<h1>Some content...</h1>
...
</body>
</html>
declare language
<!DOCTYPE html>
<html lang="en">
<body>
<h1>Some content...</h1>
...
</body>
</html>
for search engines, etc.
document format
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Page Title</title>
</head>
<body>
<h1>Some content...</h1>
...
</body>
</html>
document "header" (not shown)
title in tab
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Page Title</title>
</head>
<body>
<h1>Some content...</h1>
...
</body>
</html>
for non-English chars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="your name">
<title>My Page Title</title>
</head>
<body>
<h1>Some content...</h1>
...
</body>
</html>
start document body (shown) content
start HTML document (web page)
end of body content
end of document
A command line package manager ("app store") that comes with Node.js. used to manage external libraries and applications.
npm install -g PACKAGE_NAME to
globally
(whole computer) install command line programs.
npx
PACKAGE_NAME to download and run without installing
npm install PACKAGE_NAME to
locally (per project) install a new code package and record it in the
package.json file.
npm install to
locally install all of the package.json listed dependencies for a project.
Exercises contain test suites that you can use to check your work. Run these tests using the Jest test framework:
Make sure to install jest globally (or use npx)
npm install -g jest
Run a particular test suite (e.g., for problem-name.spec.js):
jest problem-name
# or
npx jest problem-name
Install the dependencies listed in package.json
# must be in project dir
npm install
Problem Set repositories are set up to automatically run the Jest grader when pushed to GitHub.
(see also: https://websitesfromhell.net/)
Do the "Start Here" steps on Canvas
Read: Chapter 1-5 (especially Ch. 4)
Problem Set 01 due Friday (for reals!)
Problem Set 02 due next Wednesday
Begin thinking about idea for your project
Next: HTML Semantics and Accessibility
Due to a conflict, there will be no class on Wed
On Tuesday:
The slides & recording will be uploaded on Canvas
Leverage TA's office hour if you needs help
On Wednesday:
Leverage the lecture time to watch the video, or you can make it flexible!