-
Notifications
You must be signed in to change notification settings - Fork 9
[Foundation] session plan intro to backend #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'll try answer your questions first:
In general, this is a leftover learning goal from the old legacy node.js module (which we split up). I can't find any actual material on it. It might no longer make sense in the context of this module, but we should probs talk about it somewhere.
(See my suggestion in question 3, i agree).
Agree... here's what I'm thinking: Move basic CRUD concepts into the Intro to Databases learning goals as part of "Perform basic SQL operations: SELECT, INSERT, UPDATE, DELETE". I think at this point, it could be really high level and just used to "put a name" to the operations that are being made. In this module, we could simply reference crud like "Remember the four CRUD operations we can do on our data? When we make a GET request, we only want to READ data e.g. with SELECT....... With this POST example, we want to CREATE a new thing..." Then we are only reminding/reinforcing the terms here, and it's not actually about teaching it.
I put these into the "hyf-assignment-template" which is where trainees will complete all the assignments. Technically we havne't used this before also for exercises, but it seemed like the right place, since trainees will already be working in this repo and will have to finish them for the assignment anyway. See HERE. Does this seem reasonable? Right now I mention it at the top of exercise1.md, but maybe it's not clear enough 😅 -- Regarding the databases overlap, let's wait for @marcorichetta's input too! |
adamblanchard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions aside, I approve! You do such a good job of balancing new topics and the level of detail to go into to keep trainees learning but hopefully not get overwhelmed 🤩
Assuming that...
- We can align on the CRUD learning goal
- You're happy with the exercise code (now you know it lives in hyf-assignment-repo)
... i'd say this is in a really great place to merge 🙇 Thank you so much for all the work in getting it into it's final form 🙌
| @@ -0,0 +1,114 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
| ); | ||
| ``` | ||
|
|
||
| **Callback function** in the Express endpoint has a predefined structure as well. For starters, it has certain **arguments**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really love this simple and clear explanation that fits with the stage that the trainees are at here
| }; | ||
| ``` | ||
|
|
||
| **Note:** What sorcery is this?! We didn't cover `Promise` nor `async` yet! Do not worry, you will in later modules. For now, it is just important to understand that **this syntax enables us to wait for the outcome to arrive**. In other words, a `Promise` is just that - I promise I will deliver the output (`resolve`) or I shall collapse trying (`reject`)! Use this [two helper functions](./session-materials/examples/data.js) to follow along. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
It does make sense, I will link it in the excercise.md as well. One thing though -> excercise2 uses |
|
My 2 cents here: Don't forget the order of the modules: DB week 1 => Node.js week 1 It would be great if they could integrate the Node.js app with the DB they create in the previous lesson.
CRUD methods are part of the DB module.
+1 to using Knex and the raw method. |
|
Related discussion about also talking about CRUD conceptually in the web architecture 101 module (before databases and intro to backend) https://github.com/HackYourFuture-CPH/programme/pull/160/files#diff-58df775bd5048edefa9b1268584287954e122e73d6ceb60f9d701e96100e28cfR161 |
|
@marcorichetta Just to make sure we're talking about the same thing, this PR is regarding the foundation course. So we will teach "Databases" (the foundation module) and then this one "Intro to backend" (also foundation module). I mention it because you talked about the ordering and pointed to Node.js module (which appears in the Backend course, not this one). You created a PR to set up the node module in the backend course (#146) but that is still open and valid and won't be superseded by this one. As i understand :) |
@marcorichetta, I also understand the thing as @adamblanchard. This is foundation intro to backend, so then it comes after foundation databases module. Also please take note that the session plan is indeed integrating with DB made in the previous class. The endpoints are going to be using the sqlite db. Is there something else you meant?
I guess at the moment I was preparing this PR that was not yet reflected in the foundation database session plan except from learning goals. I would like to see how is that lead in the db session to best refer to it in this session.
Yes, I think I will change it to that. The Promises are also not part of the scope for foundation, so it does make sense to jot them in and create confusion. |
adamblanchard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! I'm approving and merging this now. Mega thanks @magdazelena (and @marcorichetta for the feedback).
Closes #122
Notes
Edit
Ok, CRUD on the db is part of database module. So the learning goals here relate to the usage of CRUD via endpoints? Or there is a need for more elaboration on db methods here? (I don't think that's a good idea) :))