Skip to content

Latest commit

 

History

History
319 lines (189 loc) · 11.9 KB

README.md

File metadata and controls

319 lines (189 loc) · 11.9 KB

Birkbeck, University of London

Visual Design and Web Project

About this repository

This repository holds lecture notes for the Web Project side of Visual Design and Web Project, a module in the Department of Film, Media, and Cultural Studies at Birkbeck, University of London. The first four sessions are dedicated to programming with vanilla JavaScript, and the last three cover the basics of making web applications with the JavaScript framework Vue.js.

You can download and run demo files in this repository. See the steps for installation.

General Resources

We have one main textbook for programming concepts and vanilla JavaScript: Marijn Haverbeke, Eloquent JavaScript: A Modern Introduction to Programming (EJS), third edition, 2018, https://eloquentjavascript.net/.

For the Vue.js JavaScript framework, we will rely mainly on the official documentation at vuejs.org.

Prerequisites

The first JavaScript session on setup, values, and data types can be found in the repository for last term.

Session 1 - Simple programs in JavaScript

Learning outcomes

Students will be able to do the following with JavaScript:

  • Assign and re-assign values to variables with appropriate declarations
  • Write conditional statements to control program logic
  • Define and call functions to reuse code

Reading

Priority

  • EJS chapters 2 & 3

statements, ;, variables, =, let, const, var

conditionals, if, else, while, {}, block scope

functions, function, return, {}, function scope

Session 2 - Complex structures and objects in JavaScript

Learning outcomes

Students will be able to do the following with JavaScript:

  • Describe the characteristics of JavaScript arrays
  • Form, mutate, and read data in arrays
  • Rerun code on each item in an array or string using iteration
  • Describe the characteristics of JavaScript objects and classes
  • Write class definitions and object methods
  • Access object properties and run object methods

Reading

Priority

  • EJS chapter 4

Also recommended

  • EJS chapter 6

arrays, [], indexing, slice, length, concat, push, pop, mutability

indexing, slice, length, newlines, \n, trim, string interpolation, backticks, $, {, }, split, join

iteration, for...of, for

objects, properties, methods, classes, class, inheritance, constructor, new, maps, Map

Session 3 - JavaScript in the browser

Learning outcomes

Students will be able to do the following with JavaScript:

  • Define the DOM
  • Write JavaScript that reads and mutates the DOM
  • Run code when users perform actions on the DOM
  • Catch bugs with console logging, type checking, and strict mode
  • Handle errors and exceptions

Reading

Priority

  • EJS chapters 14 & 15

Also recommended

  • EJS chapters 8, 10, 11 & 13

Document Object Model (DOM), document, getElementById, getElementsByTagName, getElementsByClassName, HTMLCollection, Element, querySelector, querySelectorAll, NodeList, Node, live and static objects

modifying the DOM, events, addEventListener, click, callbacks

strict mode, exceptions, errors, throw, try, catch

Session 4 - Visualising data with Javascript

Learning outcomes

Students will be able to do the following with JavaScript:

  • Describe the characteristics of JSON and CSV data formats
  • Get data from hosted files and parse it for use in a program
  • Make calls to a REST API
  • Store and retrieve data in localStorage
  • Draw shapes on a webpage

Reading

Priority

Also recommended

  • EJS chapter 11

JSON, JSON string, JSON array, JSON methods, localStorage

APIs, making GET requests, fetch

SVG, canvas, vector and raster (bitmap) images, text, transformations

Session 5 - Tooling up for web projects

Learning outcomes

Students will be able to do the following:

  • Open and run basic commands in command line interfaces
  • Perform common Git operations on the command line
  • Interpret error messages in JavaScript
  • Debug JavaScript programs
  • Create animations using JavaScript
  • Learn about JavaScript drawing libraries

Reading

Priority

Also recommended

  • EJS, chapter 8

Terminal, Git Bash, ls, pwd, touch, mv, cat, git

setTimeout(), setInterval(), requestAnimationFrame(), p5.js and JavaScript libraries

Session 6 - Simple web applications with Vue

Learning outcomes

Students will be able to do the following with Vue.js:

  • Describe the characteristics of Vue
  • Install Vue on a computer or load it in a webpage
  • Declare reactive objects
  • Dynamically populate HTML templates with text
  • Dynamically populate HTML attributes with data
  • Run code when users perform actions on the DOM

Reading

Priority

Also recommended

Introduction to Vue

frameworks, Vue characteristics, installation, Vue from CDN, browser extensions, IDE extensions, Volar

How Vue structures code and objects

templates, {{ }}, single-file components, .vue, setup, reactivity, reactive, ref

Making HTML attributes dynamic

attribute bindings, v-bind, :

Updating content based on events

event listeners, v-on, @, click, methods

Session 7 - Inputs and complex rendering in Vue

Learning outcomes

Students will be able to do the following with Vue.js:

  • Bind user input data to reactive objects as models
  • Render HTML based on conditions
  • Render lists
  • Render values based on other values
  • Run code at a specific time in the lifecycle of the webpage

Reading

Priority

Also recommended

Tying form data to model data

form bindings, value, input, v-model

Rendering HTML based on conditions

conditional rendering, v-if, v-else, v-else-if

Rendering lists

list rendering, v-for, in, key, mutating methods

Rendering values based on other values

computed properties, computed

Controlling running order

lifecycle hooks, created, updated, mounted

Session 8 - Modular web applications with Vue components

Learning outcomes

Students will be able to do the following with Vue.js:

  • Describe the characteristics of Vue components
  • Divide an app into an appropriate set of components
  • Nest components
  • Pass data to child components
  • Receive data and events from child components
  • Create more complex component nests with slots

Reading

Priority

Also recommended

Structuring code with components

components, .vue

Passing data to child components

props, defineProps, props

Passing data to parent components

emits, emit, defineEmits, response

Nesting components with slots

slots, slot

Rights

Lectures are copyright Birkbeck, University of London. Pictures and workshop documents are copyright Birkbeck, University of London unless otherwise stated where they are referenced in the lectures.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution 4.0 International License.