Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f136c6

Browse files
author
Noer Paanakker
committed
added readings all weeks, some exercises as well
1 parent 637344b commit 7f136c6

File tree

5 files changed

+118
-78
lines changed

5 files changed

+118
-78
lines changed

README.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
In order to successfully complete this module you will need to master the following:
1111

12-
-
12+
- Learn what an API is
13+
- Catch up on the history of JavaScript
14+
- Understand how to write
15+
- Connect with different public APIs
1316

1417
## How to use this repository
1518

@@ -23,28 +26,19 @@ After your first class you should start off with checking the `reading materials
2326

2427
If you have any questions or if something is not entirely clear ¯\\\_(ツ)\_/¯, please ask/comment on Slack!
2528

26-
Topics:
29+
## Planning
2730

28-
1. API calls
29-
- XMLHttpRequest
30-
- Fetch
31-
- jQuery
31+
| Week | Topic | Reading Materials | Homework | Lesson Plan |
32+
| ---- | ------------------------------------------------------------------------ | ------------------------------ | ------------------------------- | -------------------------------------- |
33+
| 1. | Application Programming Interface (API), AJAX, jQuery | [Reading W1](/Week1/README.md) | [Homework W1](/Week1/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
34+
| 2. | Fetch API, Promises, JavaScript Versions, Thinking like a programmer III | [Reading W2](/Week2/README.md) | [Homework W2](/Week2/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
35+
| 3. | ES6 Classes, 'this' keyword, Async/await, Try...Catch, Arrow functions | [Reading W3](/Week3/README.md) | [Homework W3](/Week3/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
3236

33-
> In practice, the terms `API call`, `network request` and `network call` are all used to refer to the same thing: sending a request from the client to some kind of server in order to get data.
37+
## Finished?
3438

35-
| Week | Topic | Reading Materials | Homework | Lesson Plan |
36-
| ---- | ----------------------------------------------------- | ------------------------------ | ------------------------------- | -------------------------------------- |
37-
| 1. | Application Programming Interface (API), AJAX, jQuery | [Reading W1](/Week1/README.md) | [Homework W1](/Week1/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
38-
| 2. | Fetch API, Promises, Async/await, Try...Catch | [Reading W2](/Week2/README.md) | [Homework W2](/Week2/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
39-
| 3. | ES6 Classes, 'this' keyword, Arrow functions | [Reading W3](/Week3/README.md) | [Homework W3](/Week3/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
39+
Did you finish the module? High five!
4040

41-
**Kind note:**
42-
43-
We expect you to **always** come prepared to the class on Sunday.
44-
45-
### Overall
46-
47-
A good understanding of all the above mentioned topics. Want to check your Knowledge? Go through the [JavaScript Fundamentals README](../../../fundamentals/blob/master/README.md) and research/ ask for help (Slack!) with the concepts that are not entirely clear.
41+
If you feel ready for the next challenge, click [here](https://www.github.com/HackYourFuture/Node.js) to go to Node.js!
4842

4943
_The HackYourFuture curriculum is subject to CC BY copyright. This means you can freely use our materials, but just make sure to give us credit for it :)_
5044

Week1/MAKEME.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,40 @@
99

1010
## **1. Practice the concepts**
1111

12+
This week's concepts can be challenging, therefore let's get an easy introduction using some interactive exercises! Check the following resources out and start practicing:
13+
1214
- [Introduction to jQuery](https://www.codecademy.com/learn/learn-jquery)
1315

1416
## **2. JavaScript exercises**
1517

18+
**Exercise 1: Place the kitten**
19+
20+
Write an function that makes an API call to https://wwww.placekitten.com/api
21+
22+
XHR, jQuery and fetch
23+
24+
**Exercise 2: Who do we have here?**
25+
26+
Wouldn't it cool to make a new friend with just the click of a button?
27+
28+
Write a function that makes an aPI call to https://www.randomuser.me/api
29+
30+
**Exercise 3: asdsa**
31+
**Exercise 4: asdsa**
32+
**Exercise 5: asdsa**
33+
1634
## **3. Code along**
1735

1836
Now that you've learned about APIs and how to connect with them, let's apply it in the context of a complete application.
1937

20-
In
38+
In the following two applications you'll be making API calls to two different services. In the first you'll make
2139

2240
- [Vanilla JS Numbers Facts App - AJAX & Fetch](https://www.youtube.com/watch?v=tUE2Nic21BA)
2341
- [Build a JavaScript & jQuery Movie Info App](https://www.youtube.com/watch?v=YsPqjYGauns)
2442

2543
## **4. PROJECT: Hack Your Repo I**
2644

27-
> In this assignment you will built upon some existing code that is already pre-written by your teachers. Your homework consist of writing the code to make the application work as requested per week.
45+
> In this assignment you will build upon some existing code that is already pre-written by your teachers. Your homework consist of writing the code to make the application work as requested per week.
2846
2947
You are going to write a _Single Page Application_ (SPA) that uses the [GitHub API](https://developer.github.com/guides/getting-started/).
3048

Week1/README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,28 @@ These are the topics for week 1:
88
- Public/private APIs
99
- Connecting with APIs
1010
2. Asynchronous JavaScript and XML (AJAX)
11+
- JavaScript Object Notation (JSON)?
1112
- XMLHttpRequest (XHR)
12-
- What is JSON?
1313
3. jQuery
1414
- What's a module?
1515
- What's a library?
1616
- Using jQuery to make AJAX requests
1717

1818
## 1. Application Programming Interface (API)
1919

20-
An Application Programming Interface, or API for short, is
20+
Whenever we talk development we'll inevitably end up talking about Application Programming Interfaces, or APIs for short. But what is all the fuss about?
2121

22-
You can think of APIs in the following manner: Imagine you want to rent out a room in your house through Airbnb.
22+
The first thing we need to understand is that API means different things to different people. Some people use it to refer to a complete application (frontend + backend), others use it to only refer to the server, or there's even people who use it to refer to any
23+
24+
For our purposes it's useful to stick to one definition, while keeping in mind that others will use it differently. Here's the definition we'll use:
25+
26+
```markdown
27+
An API is that part of the server that is open to requests from the client (whether it's a from a frontend or another server).
28+
```
29+
30+
You can think of an API in the following manner: Imagine you want to rent out a room in your house through Airbnb. Everyone who has a key to this room can freely enter and make use of whatever is inside.
31+
32+
For more research, check out the following resources:
2333

2434
- [What are APIs - series](https://www.youtube.com/watch?v=cpRcK4GS068&list=PLcgRuP1JhcBP8Kh0MC53GH_pxqfOhTVLa)
2535

@@ -39,7 +49,7 @@ Understand this fundamental truth: programming is a means to serving a business
3949

4050
### Connecting with APIs
4151

42-
A big part of what applications do is **moving data from one place to another**. Let's say you are on the HackYourFuture website and feel like donating some money. First of all, that's very nice of you! You head out to the website and click on the donate button. You type in the amount and click on "donate"! You'll notice you immediately get redirected to a different website, namely Mollie.com. How did Mollie know to do this?
52+
A big part of what applications do is **moving data from one place to another**. Let's say you are on the HackYourFuture website and feel like donating some money. First of all, that's very nice of you! You head out to the website and click on the donate button. You type in the amount and click on "donate". You'll notice you immediately get redirected to a different website, namely Mollie.com. How did Mollie know how to do this?
4353

4454
It's because the HackYourFuture website sends an **API call** to Mollie. The request basically says "Hey Mollie, some user from the HackYourFuture site wants to make a digital payment, can you handle that?". As a response Mollie answers "Of course, send the user to this specific URL and I'll take it from there!".
4555

@@ -52,11 +62,36 @@ For further study of how to make API calls, check out the following resources:
5262

5363
## 2. Asynchronous JavaScript and XML (AJAX)
5464

55-
AJAX is the idea that data can be loaded into a webpage without refreshing the entire website. The term is a
65+
AJAX is the idea that data can be loaded into a webpage without refreshing the entire website. The term is an acronym for `asynchronous JavaScript and XML`. Let's pick that apart:
66+
67+
- Asynchronous JavaScript refers to the fact that an asynchronous function is used. As we've learned in the previous module, an asynchronous function allows the browser to do multiple things simultaneously.
68+
- XML is a data format used to send information from a server to a client, and vice versa.
69+
70+
The name AJAX is actually a misnomer, because XML isn't really used any more. Instead, another data format has taken its place: `JSON`.
71+
72+
### JSON
73+
74+
In AJAX we make a client request to a web server, that in response sends us back information to be used in the frontend. Generally speaking, this data will be send in `JSON` format.
75+
76+
So, technically speaking, the term would actually be AJAJ
77+
78+
- [JSON Crash Course](https://www.youtube.com/watch?v=wI1CWzNtE-M)
5679

5780
### XMLHttpRequests (XHR)
5881

59-
- [XMLHttpRequest](../../../../fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
82+
In order to make an AJAX request we have to make use of a special type of object, called `XMLHttpRequest`(shortened to XHR). It's an object predefined for us by the `window` object in the browser.
83+
84+
> The `window` object is the most top-level object available to us in the browser. It contains the `document`, which contains all the HTML/CSS and JavaScript we write. Besides this, the `window` also contains a lot of other things we use when writing frontend code: `setTimeout()`, alert() and it even contains a reference to the `console` (from which we get `console.log()`). Try it out in the console if you want to see for yourself!
85+
86+
By creating a new instance of this object we can start making AJAX requests!
87+
88+
```js
89+
const xhr = new XMLHttpRequest();
90+
```
91+
92+
Check the following resources to learn more about XHR.
93+
94+
- [XMLHttpRequest](https://github.com/hackyourfuture/fundamentals/blob/master/fundamentals/XMLHttpRequest.md)
6095
- [AJAX Crash Course](https://www.youtube.com/watch?v=82hnvUYY6QA)
6196

6297
## 3. jQuery
@@ -92,3 +127,7 @@ At it's most fundamental level it means that others have written functions and o
92127
One of the most well-known and often used libraries in JavaScript is called `jQuery`. It's a library that was designed to make DOM manipulation, as well as event handling, CSS animation and AJAX operations much easier to perform.
93128

94129
- [jQuery Crash Course Playlist](https://www.youtube.com/playlist?list=PLillGF-RfqbYJVXBgZ_nA7FTAAEpp_IAc)
130+
131+
## Finished?
132+
133+
Are you finished with going through the materials? High five! If you feel ready to get practical, click [here](./MAKEME.md).

Week2/README.md

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,51 @@
1-
## 1. Promises
1+
# Reading Material JavaScript3 Week 2
22

3-
By now you should've had some practice using callbacks. To reiterate, we use callbacks **as a way to create asynchronicity** in our application: we want to
3+
## Agenda
44

5-
- [Callback Hell](http://callbackhell.com/)
5+
These are the topics for week 2:
66

7-
- [Async JS Crash Course](https://www.youtube.com/watch?v=PoRJizFvM7s)
7+
1. JavaScript Versions
8+
2. Promises
9+
- Callback Hell
10+
- ES6 Update
11+
3. Fetch API
12+
4. Thinking Like a Programmer III
813

9-
## 2. Fetch API
14+
## 1. JavaScript Versions
1015

11-
Last week you learned about making API calls. For repetition's sake
16+
You are undoubtably different than when you were a baby. Back then you couldn't really do much: crying, laughing and taking dumps. That's pretty much it. But as the years past you increasingly could do more and more: walking, socializing or playing an instrument.
17+
18+
Likewise, so has JavaScript evolved. Back in
1219

13-
- [fetch()](https://www.youtube.com/watch?v=tc8DU14qX6I)
20+
- [The Weird History of JavaScript](https://www.youtube.com/watch?v=Sh6lK57Cuk4)
1421

15-
## 3.
22+
## 2. Promises
1623

17-
# Reading material for the second lecture:
24+
### Callback Hell
1825

19-
```
20-
In week two we will discuss the following topics:
21-
• Async vs Sync
22-
• Event Loop (order of execution)
23-
• Promises
24-
```
26+
By now you should've had some practice using callbacks. To reiterate, we use callbacks **as a way to create asynchronicity** in our application: we want to enable our application to do multiple things simultaneously.
27+
28+
But what if you want to have multiple
29+
30+
- [Callback Hell](http://callbackhell.com/)
2531

26-
Here are resources that we like you to read as a preparation for the second lecture:
32+
This is where Promises come in. The concept of a Promise, in execution, doesn't add anything new. It does exactly what callbacks aim to do, which is enabling asynchronous actions: for example, clicking a button to load in an image, while still being able to navigate the webpage.
2733

28-
### Async VS Sync
34+
What
35+
36+
So, in effect, you could call Promises the updated version of callbacks. Callbacks version 2.0.
37+
38+
- [A Simple Guide to ES6 Promises](https://codeburst.io/a-simple-guide-to-es6-promises-d71bacd2e13a)
39+
- [Promises](https://www.github.com/hackyourfuture/fundamentals/blob/master/fundamentals/promises.md)
40+
41+
## 3. Fetch API
42+
43+
Last week you learned about making API calls. For repetition's sake
2944

30-
- [Stacks/Queues](https://www.youtube.com/watch?v=wjI1WNcIntg) (5 mins)
31-
- Read about Asynchronous vs. Synchronous programming: http://www.hongkiat.com/blog/synchronous-asynchronous-javascript/
32-
- [Why closures are helpful with async code](http://stackoverflow.com/questions/13343340/calling-an-asynchronous-function-within-a-for-loop-in-javascript)
45+
- [Fetch() - Working with Data and APIs in JavaScript](https://www.youtube.com/watch?v=tc8DU14qX6I)
3346

34-
### Fundamentals
47+
## 4. Thinking Like a Programmer III
3548

36-
- [Event Loop](../../../../fundamentals/blob/master/fundamentals/event_loop.md)
37-
- [Promises](../../../../fundamentals/blob/master/fundamentals/promises.md)
49+
## Finished?
3850

39-
_Please go through the material and come to class prepared!_
51+
Are you finished with going through the materials? High five! If you feel ready to get practical, click [here](./MAKEME.md).

Week3/README.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
# Reading material for the third lecture:
1+
- [Async JS Crash Course](https://www.youtube.com/watch?v=PoRJizFvM7s)
2+
- [The Evolution of Callbacks, Promises & Async/Await](https://www.youtube.com/watch?v=gB-OmN1egV8)
23

3-
```
4-
In week three we will discuss the following topics:
5-
• Object Oriented Programming and ES6 Classes
6-
• The this keyword
7-
• call, apply, bind
8-
```
4+
## Finished?
95

10-
Here are resources that we like you to read as a preparation for the third lecture:
11-
12-
### Fundamentals
13-
14-
- [Object-Oriented Programming & Classes](../../../../fundamentals/blob/master/fundamentals/oop_classes.md)
15-
- [What is 'this'?](../../../../fundamentals/blob/master/fundamentals/this.md)
16-
17-
### `call` `apply`, `bind`
18-
19-
- [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call)
20-
- [Function.prototype.apply()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
21-
- [Function.prototype.bind()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)
22-
23-
24-
## Recommended Readings
25-
26-
[Eloquent JavaScript: Chapter 6 - The Secret Life of Objects](http://eloquentjavascript.net/06_object.html). Read up to the section of **Maps**.
27-
28-
29-
_Please go through the material and come to class prepared!_
6+
Are you finished with going through the materials? High five! If you feel ready to get practical, click [here](./MAKEME.md).

0 commit comments

Comments
 (0)