Posts

Showing posts from February, 2023

Best Practices for ASP.NET Core

A common performance problem in ASP.NET Core apps is blocking calls that could be asynchronous. Many synchronous blocking calls lead to  Thread Pool starvation  and degraded response times.         Do not  block asynchronous execution by calling  Task.Wait  or  Task<TResult>.Result .          Do not  acquire locks in common code paths.          Do not  call  Task.Run  and immediately await it - ASP.NET Core already runs app code on normal Thread Pool threads, so calling  Task.Run  only results in extra unnecessary Thread Pool scheduling.        Do  make  hot code paths  asynchronous.       Do  call data access, I/O, and long-running operations APIs asynchronously if an asynchronous API is available.     Do not  use  Task.Run  to make a synchronous API asynchronous.     Do  make controller/Razor Page actions asynchronous. The entire call stack is asynchronous in order to benefit from  async/await  patterns. Always avoid to load large amount of data in a webpage. Du

How you can be master in Angular

Image
Rule of Thumb  => Learn Angular from the Angular Team.  All major concept has been listed in short in the below url. Checkout any concept quickly and start learning on it.  Angular Bible: https://angular.io/guide/glossary#service    On the left navigation, you will get the tutorials of all individual topic. Else, you can search them from the top right corner. Be familiar with basic things, and then go depth. For example, following are a few complex examples where we can do many things in one shot.  Implements and import multiple classes export class PeekABooComponent extends PeekABooDirective implements              OnChanges, OnInit, DoCheck,              AfterContentInit, AfterContentChecked,              AfterViewInit, AfterViewChecked,              OnDestroy { import {   AfterContentChecked,   AfterContentInit,   AfterViewChecked,   AfterViewInit,   Component,   DoCheck,   Input,   OnChanges,   OnDestroy,   OnInit,   SimpleChanges } from &