Skip to main content

Posts

An Introduction On VueJs 3.0 Vue Router

In this article, we are going to understand the basic concept of routing in the VueJS 3.0 application. Create A VueJS 3.0 Sample Application: Let's understand routing concepts by doing a sample VueJS 3.0 application, so as a first step create a sample application. Command To Install Vue CLI Globally On Your System npm run -g @vue/cli Command To Create Vue App: vue create your_app_name The vue-router available as a separate library, so to install it run the following command. Command To Install Vue Router Library(For Vue3.0) npm install vue-router@4 After successfully installing the route library we can observe the route library reference in the package.json file. Create Vue Components: Let's create sample components like 'Home' and 'About'. We will load this component based on a route like pages. src/components/Home.vue: <template> <div> My Home Page </div> </template> <script> export default { } </sc

Part-2 An Overview On GraphQL Implementation In .Net Application Using Hot Chocolate Library

Part-1  shown startup steps like initial configuration of Hot Chocolate GraphQL library into the .Net5 Web API application. This is a continuation part here we are going to understand a few concepts like fetching data from the database, GraphQL mutations, different GraphL queries, etc. Configure EntityFrameworkCore Database Context: Now we need to integrate our database into our GraphQL endpoint by creating an entity framework core database context. Package Manager Command: Install-Package Microsoft.EntityFrameworkCore -Version 5.0.1 .Net CLI Command: dotnet add package Micorsoft.EntityFrameworkCore -Version 5.0.1 Package Manager Command: Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 5.0.1 .Net CLI Command: dotnet add package Microsoft.EntityFrameworkCore.SqlServer -Version 5.0.1 Now add your connection string into the app settings file. appsettings.Development.json: "ConnectionStrings":{ "MyWorldDbConnection":"Your_database_Connectio

Part-1 An Overview On GraphQL Implementation In .Net Application Using Hot Chocolate Library

In this article, we are going to understand the implementation steps of GraphQL in .Net5 application using Hot Chocolate Library. GraphQL: GraphQL is an open-source data query and manipulation language for APIs. It is a query language for your API and a server-side runtime for executing queries by using a type system you define for your data. GraphQL can be integrated into any framework like .Net, Java, NetsJS, etc and it isn't tied to any specific database or storage engine and instead backed by your existing code and data. GraphQL caries two important operations: Query - fetching data Mutation - save or update. Hot Chocolate GraphQL: Hot Chocolate is an open-source GraphQL server that is compliant with the newest GraphQL latest specs. It is the wrapper library of the original .Net GraphQL library. Hot Chocolate takes the complexity away from building a fully-fledged GraphQL server. An Overview On GrphQL SDL(Schema Definition Language): A syntax to data query and manipulation

Use Redis Cache In NestJS Application

Redis Cache: Redis is an open-source in-memory data structure store, used as a database cache. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, etc. Caching can significantly improve application performance and its scalability by reducing the workload to generate the content. If our server application runs on multiple servers then it is easy to share the Redis Cache between them. Setup Redis Docker Image Container: For this sample to use Redis instance locally we will use Docker. If you don't have any prior knowledge of docker, not a problem just follow the steps below.  Click here for a video session on Redis docker setup Note: Skip this section if you already have redis direct instance or azure or any cloud provider that have redis Step1: Download docker into our local system "https://docs.docker.com/desktop/" . Docker was available for all desktop operating systems. Step2: After downloading the docker installer, t

An Overview On Implementing Health Checks In .Net5 Application

In this article, we will discuss Healths Checks implementation in .Net5 application. Health Checks: To verify the state of an application .net provides health checks as a middleware configuration. Health check reports of an application can be accessed via an endpoint. Health check monitoring scenarios of an application like: Health check helps to verify the status of app dependencies like Database, External Service calls, to confirm they work normally. Memory and Disk Usage Monitoring. Advanced scenarios like monitoring application load balancers Create A Sample Web API App: Let's create a sample .Net5 Web API application and do some sample examples to understand the Health Checks. For development, an IDE can be chosen on our personal preference, but the most recommended are Visual Studio 2019(Version 16.8.* supports .Net5) or  Visual Studio Code . Initial Health Check Configurations: Initially, we need to register the 'AddHealthChecks' service and endpoint to view heal

.Net 5 MVC Application Model Binding And Validation Using Record Types(C#9 Feature)

In this article, we will understand the model binding and validation that will be carried out by 'record' types c#9 feature in MVC application. Specs: C#9 .Net5 MVC Application C# 9 Record Types: The Record Types has been introduced in C# 9 feature. Using Record Types, it is effortless to create immutable reference types. Most features supported by 'Class' will be supported by the 'Record' types but in the case to make them immutable(not allow changes in the object) then it will be an ideal choice to use 'Record' types. Record Syntax Type1: public record Profile { public string FirstName { get; } public string MiddleName { get; } } Above Record, the syntax looks similar to 'class' but only defense instead of 'class' we use 'record' keyword. Always declare properties as private in records that fulfill our immutable feature. Record Syntax Type2: public record Profile(string FirstName, string MiddleName) This syntax declarat