Posts

C# Understanding Encapsulation And Abstraction

Image
  Encapsulation Reduce Complexity Hide the information which you don’t want to share with the outside world. So, in simple words, encapsulation means hiding information. Abstraction Show only the essential features. Hide internal process. So, in simple words, abstraction means hiding implementation. Let’s see an example to understand encapsulation and abstraction. Where are Encapsulation and Abstraction in the above example? Encapsulation When we make functions  IsEmployeeExist  and  DeleteEmployee  access modifier to private then we are doing encapsulation. Abstraction We are allowing function  CheckEmployee  to be accessed from the outside world and hiding the internal process like  IsEmployeeExist  and  DeleteEmployee  is abstraction.

React Introduction

  What is React React  is a free and  open-source front-end JavaScript library  for building user interfaces based on UI components. It is maintained by  Meta  and a community of individual developers and companies. Example import React from "react"; const Example= () => { return ( <div className="hello_react"> <h1> Hello, world this is React ! </h1> </div> ); }; export default Example; The  Example  function is a React component that displays the famous introductory ''Hello, world this is React". When displayed in a web browser, the result will be a rendering of: < div class="hello_react"> < h1 >Hello, world this is React !</ h1 > </ div > 2) React History a) React was Created by Jordan Walke, a software Engineer at Facebook b) On April 2017, Facebook announced React Fiber, a new core algorithm of React Library for Building User Interfaces. 3) React Benefits and Fea

Useful Git commands for common tasks

  1)Git Clone Git Clone Is A Command For Downloading Existing Source Code From A Git Repository (Like Azure DevOps, GitHub) git clone “repository url” -b “branch name” 2) Git Branch Branches Are Highly Important In The Git World. By Using It, Developers Are Able To Work In Parallel On The Same Project. i) Creating A New Branch: git branch “branch-name” ii) To Push The New Branch git push -u “remote” “branch-name” iii) Viewing Branches: git branch or git branch — list iv) Deleting Branch git branch -d “branch name” 3) Git Commit Most-Used Command Of Git. Once We Reach A Certain Point In Development, We Want To Save Our Changes (Maybe After A Specific Task Or Issue). git commit -m “commit message” 4) Git Push After Committing Your Changes, The Next Thing You Want To Do Is Send Your Changes To The Remote Server. Git Push Uploads Your Commits To The Remote Repository. git push “remote” “branch-name” 5) Git Status The Git Status Command Gives Us All The Necessary Information About The Curre

Difference Between Var, Let, Const In JavaScript

  Var Var creates a variable that is function-scoped and can be reassigned at any time. If a  var  variable is declared  outside  of a function, it is part of the global scope and will be a property on the  global  object. Example //Example 1 var language = "javascript" ; language = "JavaScript is the world's most popular programming language" ; // New Value Assigned console . log ( language ) ; //Output //JavaScript is the world's most popular programming language //Example 2 function LanguageExample ( ) { var likes = 500 ; console . log ( likes ) ; //Output:- 500 } console . log ( likes ) ; //ReferenceError: likes is not defined (we can not access outside the function . only accessible inside function) JavaScript Copy Let A variable declared with  let  can be reassigned at any time.  let  is  block scoped , which means it is only available within the function. Example function LanguageExample ( ) { let likes = 500 ;

Web API Versioning

Image
What Is API Versioning? API versioning is the process of iterating different versions of your API. Why Is API Versioning Required? API versioning is required because it ensures stability and reliability. If you don’t properly version APIs, this can produce adverse effects on products and services. As developers, we often add new features to our apps and modify current APIs, as well. Versioning enables us to safely add new functionality without breaking changes. There are four common ways to version a REST API. 1. Versioning through URI The most commonly used versioning is in which we can add a version to the API  base URL . Example: http://api-demo.example.com/api/ 1 /employee 2. Query String Another option for versioning a REST API is to include the version number as a query parameter. This is a straightforward way to version an API from an implementation point of view. Example: https://api-demo.example.com/api/employee/?api-version=2 3. Custom headers Define a new header that contain