Other interests: guitar, rock n roll, gardening, road trips
Introductions
Your TAs are:
Allison Austin
amaustin@ucdavis.edu
Sarah Liu
asaliu@ucdavis.edu
Introductions
Now, it's your time to introduce yourselves
Discuss the following with a neighbor:
What is your name?
What is your year?
What do you want to learn from this class?
What is your favorite programming language, frontend framework, dev environment, and why?
Welcome!
Our goal: Build an application that runs over the Web.
Example applications:
Amazon
Google
Facebook
ChatGPT
Course Objectives
Specifically, by the end of this course, you will be able to:
Create dynamic web applications that can interact with users and databases
Support CRUD operations in a web app
Develop user interfaces using a modern JavaScript/TypeScript framework
Apply iterative design and development processes along with HCI principles and heuristics
Think-pair-share
If I'm trying to buy a guitar from Amazon, what does Amazon need to do to show me a list of guitars?
Amazon needs to:
Accept user query and send a request to their backend
Their backend will query their database to find any guitars matching the user's query ("les paul")
DB returns a list of guitars with prices, images, and descriptions
Frontend displays data correctly
The Web
What is the difference between the Web and the internet?
The internet is the physical network of cables, routers, and wireless connections that link computers together.
The World-Wide Web is a service that uses the internet (via HTTP, etc.) to deliver content.
Think-pair-share
Discuss the interplay between the physical infrastructure of the internet and the logical abstraction provided by the World Wide Web. How does this separation encourage innovation in web application design?
Answer: The internet’s physical infrastructure (cables, routers, etc.) forms a robust backbone for data transfer. The Web abstracts these details, providing a uniform platform for content delivery. This separation lets developers focus on building innovative applications without worrying about the underlying hardware.
Big Picture
A typical web application involves:
Web Server – runs application code
Database – stores data
Internet – connects clients and servers
Web Browser – runs on desktops, phones, or tablets
Servers and browsers communicate over the internet to generate dynamic pages.
Big Picture
How it Works
A collection of programs: Some written by us, others by browser/server vendors.
Code running on both the browser (client-side) and the server.
Data is exchanged over the internet to create dynamic, interactive pages.
Major similarities on assignments will be reported to SJA.
Web programming is formulaic; copying code without understanding is considered cheating.
Your understanding will be tested in coding questions.
The Design Cycle
Why do we care about user interfaces?
How much of a real-world program is devoted to the user interface portion?
48%
Major part of work for “real” programs!
You will work on “real” software
(intended for people other than yourself)
Bad user interfaces cost
money, lives, time, ...
User interfaces are hard to get right
Design
Your assignment grades partly depend on how accurately you implement the designs.
For any designs you create, you must submit detailed design documents and explanations.
For hw3 and the final project, you will create your own designs in Figma.
Rubric for grading
Label
Points
Description
✓++
21/20
Reserved for design awards (top 3 submissions)
✓+
20/20
Exceeds expectations: The assignment is complete and some elements exceed expectations. Presentation impeccable.
✓
17/20
Satisfactory completion of the assignment: The assignment is complete and fulfills expectations, though some issues remain. Presentation understandable.
✓-
15/20
Needs improvement: Some components of the assignment are incomplete, and many issues remain. Presentation may fall short (e.g., incomplete descriptions).
-
0/20
Unsatisfactory: No submission, or missing substantial assignment components.
HTML
What does HTML stand for?
Hyper-Text Markup Language
What does this mean?
Markup Language: Uses tags (e.g., <p>, <div>) to indicate roles for page content.
Hyper-text: Incorporates links between pages.
Browsers are Lenient!
The browser will do its best to render the HTML you provide—even if there are errors. It rarely displays obvious error messages.
Think-Pair-Share
Open the following as an HTML file in your browser and observe how it renders the content. What does this tell you about browsers?
<body>
<p>Hello World!
<body>
</p>
Discuss your observations with a neighbor.
A Few Principles
Page elements (text, images, etc.) must be nested inside tags (e.g., <head> and <body>).
HTML tags should be properly nested.
GOOD:
<body>
<p>
</p>
</body>
BAD:
<body>
<p></body>
</p>
Tree Structure of Web Pages
The Document Object Model (DOM) represents HTML elements as a tree (e.g., html, head, body, etc.).
html
head
meta
title
script
style
body
p
a
img
The DOM
The DOM is the browser’s internal data structure containing the Web page content.
It is constructed as a tree by reading the HTML file.
Browsers typically build the DOM in a depth-first manner.
Collaboration with the Browser
Your HTML and web programming code plug into larger systems and frameworks.
Both the browser and your code work together to produce the final Web page.
Understanding these systems helps you use them effectively.
Syntax Details
Start your HTML files with <!doctype HTML> to indicate HTML5.
Whitespace only matters to separate words.
Capitalization in tags and attributes is not significant.
The <head> section usually includes a <title> (displayed in the browser tab).
<meta charset="utf-8"> is a self-closing tag that sets the character encoding.