From ecc14ae5688bfc236c6d14f7106d0931afb21e63 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Sun, 4 Aug 2019 10:22:10 +0200 Subject: [PATCH] Lecture notes and exercises for week 1 --- README.md | 10 +++--- Week1/LECTURENOTES.md | 29 +++++++++++++++++ Week1/MAKEME.md | 2 +- Week1/README.md | 2 +- Week1/search.html | 72 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 Week1/LECTURENOTES.md create mode 100644 Week1/search.html diff --git a/README.md b/README.md index 8e693f1f7..d2b95580f 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ or links, please share them by [opening a pull request](https://github.com/FooCo Here you can find course content and homework for the JavaScript3 modules -|Week|Topic|Read|Homework| -|----|-----|----|--------| -|1.|• Structure for a basic SPA (Single Page Application)
• [XMLHttpRequests](../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
• API calls|[Reading Week 1](/Week1/README.md)|[Homework Week 1](/Week1/MAKEME.md)| -|2.|• [Event Loop (order of execution)](../../../fundamentals/blob/master/fundamentals/event_loop.md)
• [Promises](../../../fundamentals/blob/master/fundamentals/promises.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)| -|3.|• [try...catch](../../../fundamentals/blob/master/fundamentals/try_catch.md)
• [async/await](../../../fundamentals/blob/master/fundamentals/async_await.md)
• [The `this` keyword](../../../fundamentals/blob/master/fundamentals/this.md)
• call, apply, bind
• [Object Oriented Programming and ES6 Classes](../../../fundamentals/blob/master/fundamentals/oop_classes.md)|[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)| +|Week|Topic|Read|Homework|Lecture notes| +|----|-----|----|--------|-------------| +|1.|• [XMLHttpRequests](../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
• API calls
• Structure for a basic SPA (Single Page Application)
|[Reading Week 1](/Week1/README.md)|[Homework Week 1](/Week1/MAKEME.md)|[notes](/Week1/LECTURENOTES.md) +|2.|• [Event Loop (order of execution)](../../../fundamentals/blob/master/fundamentals/event_loop.md)
• [Promises](../../../fundamentals/blob/master/fundamentals/promises.md)|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|[notes](/Week2/LECTURENOTES.md) +|3.|• [try...catch](../../../fundamentals/blob/master/fundamentals/try_catch.md)
• [async/await](../../../fundamentals/blob/master/fundamentals/async_await.md)
• [The `this` keyword](../../../fundamentals/blob/master/fundamentals/this.md)
• call, apply, bind
• [Object Oriented Programming and ES6 Classes](../../../fundamentals/blob/master/fundamentals/oop_classes.md)|[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)| __Kind note:__ diff --git a/Week1/LECTURENOTES.md b/Week1/LECTURENOTES.md new file mode 100644 index 000000000..1a1062c0e --- /dev/null +++ b/Week1/LECTURENOTES.md @@ -0,0 +1,29 @@ +## XMLHttpRequests +- What is an Http request? + - Life of a request + - https://dev.to/dangolant/things-i-brushed-up-on-this-week-the-http-request-lifecycle- + - REST + - Verbs + - Headers + - Status codes +- Example w/ curl +- Now how do we send a request with a browser? +- Websites of the early era required a complete page load upon each request (https://en.wikipedia.org/wiki/Ajax_(programming)) + - This is inefficient and provides a bad user experience with full reloads on each action. Example: MapQuest in the early days. +- AJAX + - Gmail in 2004 and Google Maps in 2005 + - A way for browsers to send requests asyncronously! 🎉 + - In 2006, W3C releated XMLHttpRequest specification +- XMLHttpRequest + - Guide: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest + +## API calls +- Open API's without need for auth tokens (https://github.com/public-apis/public-apis/blob/master/README.md). Use one for example. +- Create new HTML file +- Create a button that will have an event listener +- Retrieve data from api with XMLHttpRequest obj + +- ...but callbacks? [joke](https://www.reddit.com/r/ProgrammerHumor/comments/che938/asynchronous_javascript/) + + +## Structure for a basic SPA diff --git a/Week1/MAKEME.md b/Week1/MAKEME.md index eed3987c8..80dbe5aec 100644 --- a/Week1/MAKEME.md +++ b/Week1/MAKEME.md @@ -2,9 +2,9 @@ ``` Topics discussed this week: -• Structure for a basic SPA • XMLHttpRequests • API calls +• Structure for a basic SPA ``` ## Step 1: Single Page Application :sweat_drops: diff --git a/Week1/README.md b/Week1/README.md index 8728329f4..3f0e38109 100644 --- a/Week1/README.md +++ b/Week1/README.md @@ -2,9 +2,9 @@ ``` In week one we will discuss the following topics: -• Structure for a basic SPA (Single Page Application) • XMLHttpRequests • API calls +• Structure for a basic SPA ``` Here are resources that we like you to read as a preparation for the first lecture: diff --git a/Week1/search.html b/Week1/search.html new file mode 100644 index 000000000..b5d3f1897 --- /dev/null +++ b/Week1/search.html @@ -0,0 +1,72 @@ + + + + TV show search + + + + + +
+
+ + + +