-
Notifications
You must be signed in to change notification settings - Fork 0
/
LearningGoals.txt
162 lines (137 loc) · 5.04 KB
/
LearningGoals.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Implementing components that make up the user interface
-- Used Typscript types
-- Used angular interceptors and JWT tokens
-- Used bootstrap for styling
-- Used basic css tricks to enhance the look
-- Used a 3rd party photo gallery tool (Ngx gallery)
-- Used Routing params
Implementing Persistence
-- Angular Template forms
-- Angular CanDeactive Router Guard
-- Angular @ViewChild Decorator
-- Persisting changes to the API
-- Adding loading indicators to the client app
-- Caching data in Angular services
Implementing Photo Upload functionality
-- Photo storage options
-- Adding related entities
-- Using a 3rd party API
-- Using the Debugger
-- Updating and deleting resources
-- What to return when creating resources in a REST based API
Photo upload control using cloudinary coud services
-- Client uploads photo to API with JWT
-- Server uploads the photo to cloudinary
-- Cloudinary stores the photo and sends a response
-- API saves photo URL and pblic ID to DB
Implementing more advanced forms using Reactive Forms in Angular
-- Use Reactive Forms
-- Use Angular Validation for inputs
-- Implementing custom validators
-- Implementing reusable form controls
-- Working with Date inputs
Implementing paging, sorting, and filtering
-- How to implement pagination on the API and Client
-- Deffered Execution using IQueryable
-- How implement filtering on the API and client
-- How to implement sorting on the API and client
-- Using Action filters
-- Adding a TimeAgo pipe
-- Implement caching in the client for apginated resources
PAGINATION
- Helps avoid performance problems
- Parameters are passed by query string eg: https://localhost:5001/api/users?pageNumber=1&pageSize=5
- Page size should be limited
- We should always page results
DEFERRED EXECUTION
example:
IQueryable<User>
var query = context.Users
.Where(x => x.Gender == gender)
.OrderBy(x => x.UserName)
.Take(5)
.Skip(5)
.AsQuaryable()
Nothing executes above
Execution:
query.ToListAsync()
query.ToArrayAsync()
query.ToDictionary()
query.Count()
The codes above is what actually sends a request to our database
Date: 2/14/2022
Implementing the Like User functionality
-- Manay to many relationships
-- AppUser --> (can be liked by many, can like many) --> AppUser
-- Configuring entities in the DbContext
-- UserLike Table
--SourceUserId
--LikedUserId
Using Fluent API
AppUser --> (Has One) --> SourceUser --> (With Many) --> LikedUsers
AppUser --> (Has one) --> LikedUser --> (With Many) --> LikedByUsers
Implementing the Messaging functionality and gain and understanding of the following:
-- More many to many to many relationships
-- Using query params in angular
Refactoring our code to use ASP.NEt Identity and gain a undersatind of the following:
-- Using .Net Identity
-- Role management
-- Policy based authorisation
-- UserManager<T>
-- SigningManager<T>
-- RoleManager<T>
REASONS
-- Battle hardened, written and tested by Mircrosoft
-- Comes with a password hasher with 10,000 salt iterations
-- Full framework for managing members and roles
-- Provides an Entity framework schema to create the needed tables
-- Highly customisable
Implementing SignalR into our application and understand how to
-- Use and set up SignalR on both the API and Client
-- Implement online presence
-- Implement live chat between users
What is SignalR
-- Open Source library that provides real-time web functionality to apps
-- Good for:
-- Dashboards and monitoring apps
-- Collaborative apps
-- Apps that require notifications
-- Chat apps
Features
-- Handles connection management automatically
-- Sends messages to all connected clients simultaneously
-- Sends messages to specific clients or groups of clients
-- Supports:
-- WebSockets
-- Server-sent events
-- Long polling
-- Offers client side npm package
Implementing Unit of work pattern and gain and understanding of the following
-- The Unit of work pattern
-- Optimising queries to the DB
-- Adding a confirm dialog service
-- Finishing touches
What is Unit of work?
Unit of work maintains a list of objects affected by a business transaction and coordinates the writing of changes
PhotoUpload Management Implementation
-- Any photos a user uploads should be unapproved
-- Only admins or modearators can approve photos
-- No other user should be able to see unapproved photos
-- The user that uploaded the photo should be able to see the photo but it should be clearly indentified as "Awaiting approval"
-- When a user uploads their first photo this should not be set as their main photo
-- When an admin or moderator approves a photo for a user that does not have a main photo then this should set the photo to main
Publishing our application
-- Prepare the app for publication
-- What to consider before Publishing
-- Switching DBs
-- Serving static content from the API Server
-- Publishing to Heroku
-- Integrating Heroku into Github
-- Using git branches
What to consider when publishing
-- Environment variable
-- localhost
-- CORS - if hosting the client app in different domain
-- Database
-- Cost
-- Capacity / scalability