I’m focusing on expanding my knowledge of backend development. Each week I’ll be posting a few notes on something Node-related that I’m learning. This helps me better concretize what I’m learning and blends my two favorites things: coding and writing.
A few notes on some basics of Node and how it works:
Review of Model, View, Controller and how Node uses this. The model is the code we write in the data that is stored that accesses the database, so if we need to query the stores, pull reviews related to a store, ect. All of the stuff that fetches data from our database, that’s our model. The controller (when I first learned it, it was called the Octopus!) can be described as the traffic cop in between. The thing that gets the data and puts into the template is the Controller. “Hey model, give me some data. Ok I have it, I’’m sending it to the view. The friend in your group always organizing stuff, that’s the controller.
Routing. Routing is a core concept in Node and Anytime someone goes to / something (like Google.com/something) we’re hitting a routes file, and it handles every single url hit that we get. You can have multiple route handles (like for admin! app.use(‘/admin’, adminRoutes)
Modules: reusable blocks of code whose existence won’t accidentally impact and hurt other code. JS didn’t have this before yet it’s a new ES6 feature. Node js implements Common JS modules. Common modules just mean an agreed upon standard for how code modules should and will be structured.
Some different resource I use to learn Node:
-This Learn and Understand Node course.
-Exploring and debugging in my company’s app
-Wes Bos’s Learn Node course is excellent.
-Just building on my own.
What are your resources for learning Node? Let me know!