Skip to main content

Posts

Vue.js Sample For Beginners

Introduction: Vue.Js is a front-end progressive javascript framework. Vue.Js is one of the most widely used javascript frameworks. It is a very light-weight or skinny framework, which downloads very fastly on all most all modern browsers. It can be used in both multi-page and single-page applications. Getting Started: Let's start learning Vue.Js by hands-on by creating a single-page sample application by referring to all basic features in it. Create a folder to store sample application files, add an 'index.html' file and 'app.js'(maintain Vue.Js Code) file and refer  Vue.Js CDN link  on the index.html and for UI design let's refer  Bootstrap links on the index.html page. index.html: <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"

ASP.NET Core Web API Versioning

Introduction: An iteration and evolutionary changes of an ASP.NET Core Web API is handled by Versioning. Versioning of an API gives confidence to the clients which consumes API for a long time. Any changes or development of an API will be accessible using the new version and it won't cause issues to the clients consuming the old version of API. When To Use Versioning: Any API response changes. Developing an API by implementing testing levels like 'Alpha', 'Beta', and 'RC' versions before releasing Production. Deprecating an API which means API going to be removed or upgraded by a version within a short period. Versioning Types: Query String Versioning Url Path Versioning Media Type Versioning API Version Nuget: To Configure versioning to AspNet Core Web API Microsoft provided a library(Microsoft.AspNetCore.Mvc.Versioning). So to use the versioning library please install NuGet below.              Install-Package Microsoft.A

Angular State Management With NgRx

Introduction: NgRx framework helps Angular to develop more reactive applications. NgRx provides state management to an application, where data of an application is stored at a single place and then supplied throughout the application where ever needed. Using NgRx if data is updated, all the components consuming that data get updated instantly. Benefits of using NgRx with Angular application like Serializability, Type Safety, Encapsulation, Testable, and Performance. Key Features: NgRx framework key features like Store: A  s tore is a data place where all the application related information stored and supplied to the Angular components on demand. Reducer: A reducer is a pure function based on Actions it returns the new state. Actions: An action expresses an event of an application, that causes a change in the state of the application. Selector: A selector is a pure function that obtains a slice of data from the store. Effects: An Effect is to isolate components f

Dotnet Core MVC Cookie Login Sample Role-based Authorization (Part 2)

Introduction: Authorization means an authenticated user having permission to access specific protected resources. In general, Authorization can be called special permissions. For example in an application, an admin user has all permission to modify the application, a non-admin user might have permission likes read-only content in the application. In the  first article , we have discussed the Cookie-Based login mechanism. This will be a continuation article, here we discuss Authorization. Note: Before reading this article, read  Dotnet Core Cookie Login Sample (Part 1) . Pages Controller: Now add a new controller name as 'PagesController.cs' and to this controller add 3-action methods to show 3 pages in the application. PagesController.cs: namespace CookieAuth.Web.Controllers { [Route("pages")] public class PagesController : Controller { [Route("admin")] [HttpGet] public IActionResult Admin() {