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
Copy file name to clipboardExpand all lines: courses/backend/node/week2/README.md
+1-19Lines changed: 1 addition & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,22 +24,4 @@ By the end of this session, you will be able to:
24
24
-[ ] Set up multiple environments
25
25
-[ ] Managing secrets
26
26
-[ ] Create basic test suites
27
-
28
-
### 1. What is Representational State Transfer (REST)?
29
-
30
-
Building software is like building houses: architecture is everything. The design of each part is just as important as the utility of it. REST is a specific architectural style for web applications. It serves to organise code in **predictable** ways.
31
-
32
-
The most important features of REST are:
33
-
34
-
- An application has a `frontend` (client) and a `backend` (server). This is called [separation of concerns](https://medium.com/machine-words/separation-of-concerns-1d735b703a60): each section has its specific job to do. The frontend deals with presenting data in a user friendly way, the backend deals with all the logic and data manipulation
35
-
- The server is `stateless`, which means that it doesn't store any data about a client session. Whenever a client sends a request to the server, each request from the client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. This makes it possible to handle requests from millions of users.
36
-
- Server responses can be temporarily stored on the client (a browser) using a process called `caching`: storing files like images or webpages in the browser to load the next time you enter a website (instead of getting them from the server, which generally takes longer to do).
37
-
- Client-server communication is done through `Hypertext Transfer Protocol (HTTP)` (more on that later), which serves as the style (the how) of communication.
38
-
39
-
It's important to know about REST because it teaches us how web applications are designed and holds us to a standard that makes development and usage predictable. However, don't worry if you don't know what any of this means just yet. It's good to be exposed to it, and understanding will come with experience.
40
-
41
-
For more research, check the following resource:
42
-
43
-
-[What is REST: a simple explanation for beginners](https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f)
44
-
45
-
-[@NoerGitKat (lots of web app clones/examples to learn from)](https://github.com/NoerGitKat)
Copy file name to clipboardExpand all lines: courses/backend/node/week2/session-plan.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,11 +31,30 @@ Run through the [phonebook example](./session-materials/phonebook/). The functio
31
31
1. Set up [`database.js`](./session-materials/phonebook/database.js)
32
32
2. Walk through [`phonebook.js`](./session-materials/phonebook/phonebook.js)
33
33
34
-
## Snippets API continued
34
+
## Implementing REST with Express
35
35
36
-
Now we can pick up where we left the exercises last week. Help the trainees complete the remaining endpoints:
36
+
### REST refresher
37
+
38
+
Building software is like building houses: architecture is everything. The design of each part is just as important as the utility of it. REST is a specific architectural style for web applications. It serves to organise code in **predictable** ways.
39
+
40
+
The most important features of REST are:
41
+
42
+
- An application has a `frontend` (client) and a `backend` (server). This is called [separation of concerns](https://medium.com/machine-words/separation-of-concerns-1d735b703a60): each section has its specific job to do. The frontend deals with presenting data in a user friendly way, the backend deals with all the logic and data manipulation
43
+
- The server is `stateless`, which means that it doesn't store any data about a client session. Whenever a client sends a request to the server, each request from the client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. This makes it possible to handle requests from millions of users.
44
+
- Server responses can be temporarily stored on the client (a browser) using a process called `caching`: storing files like images or webpages in the browser to load the next time you enter a website (instead of getting them from the server, which generally takes longer to do).
45
+
- Client-server communication is done through `Hypertext Transfer Protocol (HTTP)`, which serves as the style (the how) of communication.
46
+
47
+
It's important to know about REST because it teaches us how web applications are designed and holds us to a standard that makes development and usage predictable.
37
48
38
-
TODO: Add a section with live coding somewhere below to explain error handling? include that in one/all of the exercises?
49
+
For further reading, check the following resources:
50
+
51
+
-[What is REST: a simple explanation for beginners](https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f)
52
+
-[@NoerGitKat (lots of web app clones/examples to learn from)](https://github.com/NoerGitKat)
53
+
54
+
55
+
### Snippets API continued
56
+
57
+
Now we can pick up where we left the exercises last week. Help the trainees complete the remaining endpoints:
0 commit comments