Skip to content

Commit db73986

Browse files
committed
add mvc notes
1 parent e0be55d commit db73986

File tree

8 files changed

+48
-0
lines changed

8 files changed

+48
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Authentication
2+
3+
![auth](../../session%205/images/auth.jpg)
4+
5+
## Different ways for authentication
6+
7+
1. Basic
8+
1. username and password
9+
2. mobile number and OTP
10+
3. email and password
11+
2. JWT
12+
1. It's a short for JSON Web Token
13+
2. JSON Web Token is a proposed Internet standard for creating data with optional signature and/or optional encryption whose payload holds JSON that asserts some number of claims.
14+
3. The tokens are signed either using a private secret or a public/private key.
15+
4. [What Is JWT and Why Should You Use JWT](https://www.youtube.com/watch?v=7Q17ubqLfaM)
16+
5. https://jwt.io/
17+
3. OAuth 2
18+
1. [ref](https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2)
19+
20+
# Authorization
21+
22+
![authorization](../images/authorization.jpg)
23+
24+
## Common Authorization Methods
25+
26+
![common authr methods](../../session%205/images/auth%20methods.jpg)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MVC
2+
3+
MVC (Model-View-Controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic. It emphasizes a separation between the software's business logic and display.
4+
5+
![mvc](../images/MVC.jpg)
6+
7+
## Model
8+
9+
The Model component corresponds to all the data-related logic that the user works with. This can represent either the data that is being transferred between the View and Controller components or any other business logic-related data. For example, a Customer object will retrieve the customer information from the database, manipulate it and update it data back to the database or use it to render data.
10+
11+
## View
12+
13+
The View component is used for all the UI logic of the application. For example, the Customer view will include all the UI components such as text boxes, dropdowns, etc. that the final user interacts with.
14+
15+
## Controller
16+
17+
Controllers act as an interface between Model and View components to process all the business logic and incoming requests, manipulate data using the Model component and interact with the Views to render the final output. For example, the Customer controller will handle all the interactions and inputs from the Customer View and update the database using the Customer Model. The same controller will be used to view the Customer data.
18+
19+
# Request proceesing flow
20+
21+
![flow](../../session%205/images/request%20processing%20flow.jpg)

session 5/chapters/resources.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[auth vs authorization](https://www.okta.com/identity-101/authentication-vs-authorization/)

session 5/images/MVC.jpg

58.4 KB
Loading

session 5/images/auth methods.jpg

226 KB
Loading

session 5/images/auth.jpg

234 KB
Loading

session 5/images/authorization.jpg

116 KB
Loading
137 KB
Loading

0 commit comments

Comments
 (0)