Posts

ASP.NET Core 7: Implementing the Back-End for Front-End (BFF) Pattern in ASP.NET Core

Image
In my previous article , we have seen an implementation of the API Gateway in ASP.NET Core using Ocelot, in this article we will see an implementation of the Back-End for Front-End (BFF) pattern implementation in ASP.NET Core. With an expansion in Web-based applications, there are several technologies that have emerged to support web-based apps. In recent years we have shifted from thick-client applications to thin-client applications those interact with various Back-End services. There are several domains that have Web-based User interfaces and mobile-based user interfaces e.g. e-commerce apps, Banking, and Social Media Apps along with these UIs such applications also have complex server-side architectures, and these applications address such complex architectures using Microservices as backend services. If the UI is tightly coupled with backend services, then it is exceedingly difficult to use such backend services for other UI. This is where the BFF pattern comes in. Introduction to...

ASP.NET Core: Implementing API Gateway using Ocelot

Image
In this article, we will learn about creating API gateways for ASP.NET Core Applications using Ocelot. In my previous article , I have explained the process of creating resilient microservices where I have explained its need for application development. Microservices architectures are proven as a backbone of modern high availability-based application architectures. Since microservices provide a Techo-Agnostic approach to designing and developing microservices, it's important to make sure that instead of exposing the public endpoints of each microservice to the client the architecture must create an API gateway so that the client will be provided access to all microservices using a single gateway endpoint.  What is API Gateway? API Gateway acts as a FRONT-DOOR for all backend services. This provides a single access point for the business logic, and data from the backend services. The API Gateway has the following advantages Isolates the client application from knowing about the actu...

React.js with TypeScript: Sharing Data Across Components using React.Context

Image
In this article, we will see the step-by-step implementation of using " React.Context" to share data across components. We will use TypeScript as a programming language to implement the code for this article.    Why TypeScript? TypeScript is an open-source language that increases JavaScript application productivity by providing a type system. TypeScript is a typed JavaScript that compiles to plain JavaScript. TypeScript delivers a unique and easy approach to building front-end applications. React Context      React.js is a JavaScript Library for building interactive UI. This library is used to build the composable UI. In such cases, the UI may contain multiple components and these components may have a Parent-Child relationship across them. With the UI having such type of relationship, we may have the case of sharing data across the components. The Context provides a way to pass data through the components tree without having to pass props down manually at...

ASP.NET Core: Creating Resilient Microservices

Image
In this article,  we will see how to implement resilient Microservices using ASP.NET Core. The question here is why we need to implement such a design for the Microservices? Consider, the design for Microservices shown in Figure 1 Figure 1: The Direct Access of Microservices from the client application  As shown in Figure 1, the E-Commerce client application directly accesses Product and Customer Microservices. The client application will be able to receive data from these services successfully if the Product and the Customer services are up and running. But in case one of these services is down because of some errors, then the client application will not get the data and hence might be a reason to crash the client app. In this case, although the client app is not responsible for the stability of the Microservices still any issue that occurs in Microservices will crash the client application.  The question here is, how to resolve such kind of a design flow in our applicat...