⬇️ Main Note
https://docs.google.com/document/d/1nPhGd3qWqIWvRF1u2GotE5dII8690VmvkxeC1KA-oHA/edit
: It's like an guiding page for functions
Inside class
, we don't use the word function
because the functions inside the class are called method
s.
--> ex) date.getFullYear()
=> called method
Why not just make separate functions, not saving in class?
const aaa = new MyLoginAPI
aaa.logout()
Class were exported and became able to use in other files by importing them
→ This means that the core logics are written in the class file
→ As long as there happens more class files, the file structure gets a bit messy
Here, we’re using MVC .
--> APIs grouped as class
--> Inside controllers folder, there is service folder.
--> The core logic is insdie this service folder.
⇒ Business Logic : Logic inside the service === Core code
--> Controllers bring these services and construct the function with them.