Monday, November 29, 2021

Implement CQRS with MediatR in ASP.NET Core Web API

 


https://www.youtube.com/watch?v=bgoGtkmUAQg
https://www.youtube.com/watch?v=T1qyGmdgSQE
The Command and Query Responsibility Segregation(CQRS) is an architectural pattern that separates the read and writes operations of a data source
Mediator is used to reduce communication complexity between multiple objects or classes. This pattern provides a mediator class which normally handles all the communications between different classes and supports easy maintenance of the code by loose coupling. Mediator pattern falls under behavioural pattern category.
 
Basically, a Mediator perform 2 operations.
  • · Accept the incoming request
  • · Handles the incoming request and provide the response.
CQRS Mediator Patterns are prefered over large projects.

Advantages of CQRS

  1. Independent scaling
  2. Optimized data transfer objects
  3. Provides separation of concern
  4. High scalability

 





Sunday, November 14, 2021

Angular Help

https://nodejs.org/en/download/



Publish : ng build is the command you use when you're ready to build your application and deploy it.
  1. Run the command npm install in the terminal. This command will read the package.json file and install all the required dependencies into a node_modules folder in your project.











 C:\>node -v

c:\users\ng --version

c:\users>npm install @angular/cli

npm install -g @angular/cli@1.0.0  //npm install @angular/cli@latest   //npm install -g @angular/cli@latest

ng serve -- open

npm start

open vs project in VS code: code .

npm install -g @angular/cli@9.1.11

npm uninstall -g @angular/cli                                            

 Angular CLI Commands   : https://www.c-sharpcorner.com/article/quick-preview-angular-cli-commands/

ng generate module/component/service/class name

ng generate component login //ng generate component register

ng g c login

ng generate module user-auth //1 file

ng g c user-auth/sign-in // component under module

ng g class Dummy

ng g service  api-service

ng g service user-auth/test-service //service under module

ng build --prod   //ng build --dev


ngOnInit :

Executes after the constructor and after ngOnChange hook for the first time. It is most commonly used for component initialisation and retrieving data from a database


<form (submit)="onSubmit()"> <input [(ngModel)]="playerName"> </form> let playerName: string; onSubmit() { return this.playerName; }

Interview: https://www.youtube.com/watch?v=-jeoyDJDsSM














develop & debug applications using latest features of Angular. Candidate should have knowledge of below:
Angular 18/19
New features of Angular 18/19
Services in Angular
Components, Modules, Routing, forms, reactive programming.
Components & their life cycle
Templates & data binding, directives
Change Detection Mechanism
Zone less strategy
Pipes and different types of pipes
Signals in Angular
Passing data from One component to another
Observables
Auth guards
Flex box in CSS
Prototypes, callbacks
JavaScript, TypeScript




Driving

 https://youtube.com/shorts/5Ac2qZHrApU?si=_X-G7pJFHiZoD-s7 https://www.youtube.com/watch?v=f6pSsex87oU