This demo is based on a traditional implementation approach: We have a Product class and it has a method which takes the discount and based on some business logic it applies the discount on the product. Product service will interact with database using ProductRepository. If you will notice ProductService has dependency on 2 concrete classes i.e.

There might be a situation where we want to encapsulate required information in an Object to perform some task and the task can be performed many times or whenever it's required. The command design pattern is the solution. It also gives you an easy way to implement Undo() that can just undo multiple commands.

Many developers have confusion about how to write database code in an application. I will discuss several approaches here and try to provide the explanation for each approach.
Dependency Injection is one of the SOLID" principles which helps to decouple the code by making sure that we depend on abstractions not on implementation of concrete classes.
Factory Design Pattern is a type of Creational Design Pattern. Creational Design Pattern deals with creation of object such that they can be decoupled from their implementing system. Using this design pattern it is very easy to decide which objects needs to be created for a given scenario.
Here we have an Employee class which has 3 properties: Name, Address and EmployeeDepartment . We want to get the bonus of employee and the calculation is done based on the department the Employee belongs to. In real time there will be some complex logic to calculate the bonus, for example purposes I am just returning some values.
I often fing many people are confused with Web Farm and Web Garden concepts. I have tried to explain these concepts in a little different way. Pleas go through and provide your feedback.
Distributing network traffic across multiple servers effectively is called Load Balancing.To meet high volumes, it generally requires adding more servers. Load Balancer routes the client requests to the servers in an optimized way and takes care that no server is overworked. If a new server is added to the group, It will start sending requests to this new server.
The OSI Model (Open System Interconnection) is a framework to define the protocol implementation in computer networking.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article