You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Build a JavaScript & jQuery Movie Info App](https://www.youtube.com/watch?v=YsPqjYGauns)
24
+
18
25
## **4. PROJECT: Hack Your Repo I**
19
26
20
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.
Copy file name to clipboardExpand all lines: Week1/README.md
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,16 @@ These are the topics for week 1:
11
11
- XMLHttpRequest (XHR)
12
12
- What is JSON?
13
13
3. jQuery
14
-
- What's a module/package?
14
+
- What's a module?
15
15
- What's a library?
16
16
- Using jQuery to make AJAX requests
17
17
18
18
## 1. Application Programming Interface (API)
19
19
20
+
An Application Programming Interface, or API for short, is
21
+
22
+
You can think of APIs in the following manner: Imagine you want to rent out a room in your house through Airbnb.
23
+
20
24
-[What are APIs - series](https://www.youtube.com/watch?v=cpRcK4GS068&list=PLcgRuP1JhcBP8Kh0MC53GH_pxqfOhTVLa)
21
25
22
26
### Public/private APIs
@@ -41,20 +45,40 @@ It's because the HackYourFuture website sends an **API call** to Mollie. The req
41
45
42
46
> Anytime a request to an API is made this is called an `API call`. However, in practice people use different terms for the same thing. Synonyms for `API call` are `API request`, `Network call/request` or`HTTP call/request`. Which do you prefer?
43
47
48
+
For further study of how to make API calls, check out the following resources:
49
+
44
50
-[Working with APIs in JavaScript](https://www.youtube.com/watch?v=ecT42O6I_WI)
45
51
-[Making HTTP Requests in JavaScript](https://www.kirupa.com/html5/making_http_requests_js.htm)
46
52
47
53
## 2. Asynchronous JavaScript and XML (AJAX)
48
54
55
+
AJAX is the idea that data can be loaded into a webpage without refreshing the entire website.
A `module` is a part of a program that contains one or more functionalities. For example, a single function that has only 1 job could be considered a module. When developing applications you'll always be writing multiple functionalities in order for your software to work as expected. These can be written all in one file, and it would fine. The browser/operating system would be able to interpret and execute it anyway. But for you, the human, it's very hard to keep overview of what is happening at what level of the application.
67
+
68
+
In order to keep a better overview, we can choose to **modularize** our application: split it up into smaller parts that, in theory, all work independently.
69
+
70
+
However, creating better overview is not the only reason. Among other reasons, modules make a developer's job easy by:
71
+
72
+
- Allowing the them to focus on only one area of the functionality of the software application
73
+
- Isolating individual blocks of code, in case anything breaks
74
+
- Encouraging the developer to write code in a way that makes it reusable
75
+
76
+
For more information about this, go through the following:
77
+
78
+
-[JavaScript Modules: From IIFEs to CommonJS to ES6 Modules](https://www.youtube.com/watch?v=qJWALEoGge4)
57
79
58
80
### What's a library?
59
81
60
82
### Using jQuery to make AJAX requests
83
+
84
+
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.
Copy file name to clipboardExpand all lines: Week2/MAKEME.md
+1-60Lines changed: 1 addition & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -17,37 +17,6 @@
17
17
18
18
## **4. PROJECT: Hack Your Repo II**
19
19
20
-
# Homework Week 2
21
-
22
-
```
23
-
Topics discussed this week:
24
-
• Async vs Sync
25
-
• Event Loop (order of execution)
26
-
• Promises
27
-
```
28
-
29
-
## Step 1: Read
30
-
31
-
- Read this article on scopes & closures: [explaining-javascript-scope-and-closures](https://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/)
32
-
33
-
- If you are still not completely clear on promises, here are some additional resources :ring:
34
-
35
-
-[Google's post about Promises](https://developers.google.com/web/fundamentals/getting-started/primers/promises)
36
-
-[A nice article from David Walsh](https://davidwalsh.name/promises)
37
-
-[A real life example](https://github.com/mdn/js-examples/blob/master/promises-test/index.html)
- Fix Requested Changes (if any) on the Pull Request.
44
-
45
-
## Step 3: Convert callbacks to promises
46
-
47
-
**_Deadline Thursday_**
48
-
49
-
### 3.1 Preparation
50
-
51
20
The homework for week 2 will build on the work you did in week 1. You will create a new branch based on the `week1` branch.
52
21
53
22
1. Make sure that you committed all changes in the week 1 version of your homework.
@@ -61,31 +30,10 @@ The homework for week 2 will build on the work you did in week 1. You will creat
61
30
62
31
You will continue to work on the files `index.js` and (possibly) `style.css`.
63
32
64
-
- Complete your GitHub app code from the previous week, if needed, to meet the requirements from that week's assignment.
65
33
- Replace all asynchronous callbacks (e.g. as used with XMLHttpRequest) by ES6 promises.
66
34
- Beautify your app's styling.
67
35
- If not yet completed in week 1, make your app responsive (use CSS media queries and [Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)).
68
36
69
-
### 3.3 Handing in your homework
70
-
71
-
If necessary, review the instructions how to [Hand in homework](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/homework_pr.md) using GitHub pull request.
72
-
73
-
To test whether your code will be accepted when you submit your homework as a pull request you need to ensure that it does not contain ESLinr errors. Open a terminal window in VSCode and type the following command:
74
-
75
-
```
76
-
npm test
77
-
```
78
-
79
-
If any errors or warnings are reported by this command you need to fix them before submitting a pull request.
80
-
81
-
In addition, check for the following:
82
-
83
-
- Have you removed all commented out code (should never be present in a PR)?
84
-
- Do the variable, function and argument names you created follow the [Naming Conventions](../../../../fundamentals/blob/master/fundamentals/naming_conventions.md)?
85
-
- Is your code well-formatted (see [Code Formatting](../../../../fundamentals/blob/master/fundamentals/code_formatting.md))?
86
-
87
-
If the answer is 'yes' to the preceding questions you are ready to follow these instructions:
88
-
89
37
1. Push your `week2` branch to GitHub:
90
38
91
39
```
@@ -94,11 +42,4 @@ If the answer is 'yes' to the preceding questions you are ready to follow these
94
42
95
43
2. Create a pull request for your `week2` branch.
96
44
97
-
Note:
98
-
99
-
1. Please remove all redundant, commented-out code and console.log's from your files before pushing your homework as finished. There is no need for your mentors to review this stuff.
100
-
2. Please make sure your code is well-formatted and follows the recommended naming conventions.
101
-
102
-
## Step 4: Read before next lecture
103
-
104
-
Go through the reading material in the [README.md](../Week3/README.md) to prepare for your next class.
45
+
> Note: Please remove all redundant, commented-out code and console.log's from your files before pushing your homework as finished. There is no need for your mentors to review this stuff. Also, please make sure your code is well-formatted and follows the recommended naming conventions.
0 commit comments