Skip to content

Commit 6bed336

Browse files
committed
Move rest content from readme to session plan
1 parent b9e63e6 commit 6bed336

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

courses/backend/node/week2/README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,4 @@ By the end of this session, you will be able to:
2424
- [ ] Set up multiple environments
2525
- [ ] Managing secrets
2626
- [ ] 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)
27+

courses/backend/node/week2/session-plan.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,30 @@ Run through the [phonebook example](./session-materials/phonebook/). The functio
3131
1. Set up [`database.js`](./session-materials/phonebook/database.js)
3232
2. Walk through [`phonebook.js`](./session-materials/phonebook/phonebook.js)
3333

34-
## Snippets API continued
34+
## Implementing REST with Express
3535

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.
3748

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:
3958

4059
1. [POST endpoint exercise](./session-materials/07-post-endpoint.md)
4160
2. [PUT endpoint exercise](./session-materials/08-put-endpoint.md)

0 commit comments

Comments
 (0)