Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
Learn about the Factory Design Pattern in C#. This article explains its implementation with a real-world banking example, demonstrating how to create flexible, maintainable, and decoupled object creation logic.
This article explains the Abstract Factory Design Pattern in C#, demonstrating its implementation with a real-world payment gateway example. It covers abstract products, factories, concrete implementations, and client usage.
Learn how to build an AI-powered birthday party planner using Copilot Studio and Microsoft OpenAI. Streamline theme selection, product management, and logistics with intelligent automation for efficient and creative event planning.
The Factory Design Pattern is a creational design approach that simplifies object creation by providing a central mechanism. It promotes code reusability, maintainability, and decoupling, making software development efficient and scalable.
This article will be an implementation of Dependency Injection for a MVC app.
This article discusses Dependency Injection. This article series covers Design Patterns, starting with MVC. This specific article focuses on Dependency Injection (DI) in .NET, explaining the Dependency Inversion Principle and DI implementation to achieve loosely coupled classes.
Enhancing software quality by avoiding antipatterns in code reviews that cover antipatterns in the Input Kludge, Magic Pushbutton, Encapsulation Violation, Anemic Domain Model, and how to create a rich domain model.
This article will make console demo for the Dependency Injection
This article will discuss more about the implementation of Dependency Injection.
The "Service Locator" pattern, while widely used, often leads to issues in software design, making it an anti-pattern in the context of Dependency Injection (DI). This article explores the drawbacks of Service Locator, including increased coupling, reduced testability, and maintenance challenges.
This series delves into Software Design Principles, with a focus on the Inversion of Control (IoC) Principle in this article. It covers Dependency Inversion, Dependency Injection, IoC Containers, and various implementation strategies in .NET applications.
This article will discuss the SOLID in code demo. This article series covers Software Design Principles, focusing on the SOLID principles. It includes practical code demos and explanations for each principle: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.
The Prototype Pattern is a creational design pattern that simplifies object creation by cloning existing instances instead of starting from scratch. Ideal for complex objects, it reduces initialization overhead and ensures consistency.
In this article, we learn about Singleton Pattern: Ensuring a Single Instance in .NET Core. The Singleton Pattern ensures a class has only one instance, providing global access. It's commonly used for managing shared resources like logging, configurations, or database connections, ensuring efficient resource usage.
The Abstract Factory Pattern provides an interface for creating families of related objects without specifying their concrete classes. It ensures consistency and flexibility in object creation, useful in scenarios like UI design, configuration systems, and data access layers, promoting modular and decoupled design.
The Factory Method Pattern is a creational design pattern that delegates object creation to subclasses, promoting flexibility and maintainability. It defines an interface for creating objects but lets subclasses decide which class to instantiate. This approach reduces coupling and enhances scalability in complex systems.
In this article we will learn about Categorizing Design Patterns: Creational, Structural, and Behavioral. It provides real-life examples, benefits, and challenges, offering developers insights for better software architecture.
This article discusses the importance of design patterns in .NET Core development, highlighting how they enhance scalability, maintainability, and flexibility. Key patterns include Singleton, Repository, Factory Method, and Strategy, improving code quality and communication.
Design patterns are essential in software development, offering reusable solutions to common problems. By applying patterns like Singleton, Factory Method, and Observer, developers create flexible, maintainable, and scalable code.
In this article, we learn about Builder Pattern: Constructing Complex Objects. The Builder Pattern simplifies the creation of complex objects through step-by-step construction. It enables flexibility, modularity, and clarity in assembling products, making it ideal for various configurations and customizations.
This series explores software design principles, focusing on SOLID principles: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion, and their practical application in software development.
This series explores software design principles, distinguishing between high-level design principles like SOLID and low-level design patterns, offering practical guidelines and implementation strategies for creating better software applications.
Delve into how distributed transactions ensure consistency, atomicity, and fault tolerance across decentralized systems, maintaining ACID properties crucial for scalability and robust transaction management in modern, scalable applications.
The Two-Phase Commit (2PC) protocol ensures data consistency in microservices by coordinating transactions across services. It involves a prepare phase where participants log changes and vote, and a commit phase where the coordinator finalizes or aborts based on votes.
This pattern is particularly useful for implementing state machines or managing complex state-dependent logic, as it promotes cleaner code and improves maintainability in software development.
By Ziggy Rafiq, discover how Factory and Abstract Factory design patterns simplify the creation of complex objects in C# 12.
In this article, you will see the real world example of Factory Design Pattern.
The Adapter Design Pattern is a structural pattern that allows incompatible interfaces to work together. It acts as a bridge between two incompatible interfaces by converting the interface of a class into another interface clients expect.
Everything on Design Patterns & Practices, not only its articles: the Design Patterns & Practices page →
Write an article and earn +1,000 SHARP when it is approved.
Write an article