Introduction When it comes to design patterns in object-oriented programming, it is very hard to find where we can apply such patterns and what problem exactly does it solve with some real-world example. In my series of articles, I would like to cover bad code without patterns and how to apply design patterns in that properly to make better code. In this article, I have covered the chain of responsibility behavioral design pattern. Let us look into this. Definition It is the most important design pattern that falls under the behavioral category as per gang of four. It defines that “avoid coupling from the sender of a request to its receiver by adding one more object to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.” Scenario Suppose you are a Developer and you want to apply a leave request in your company. The company policy for Developer says that if leave request for 1-day team lead will handle if leave re
Introduction We are in the new world of microservices and cross-platform applications which will be supported for multiple platforms and multiple heterogeneous teams can work on the same application. I like ASP.NET Core by the way its groomed to support modern architecture and adhere to the software principles. I am a big fan of dot net and now I become the craziest fan after seeing the sophisticated facility by dot net core to support infrastructure level where we can easily perform vertical and horizontal scaling. It very important design aspect is to keep things simple and short and by the way, RESTFul applications are build and it is a powerful mantra for REST-based application and frameworks. Some times we need to overrule some principles and order to handle some situations. I would like to share my situation of handling HTTP long polling to resolve the ASP.Net core 2 mins issue. What is HTTP Long polling? In the RESTFul term, when a client asks for a query from the serv