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.
The Builder is a pattern that belongs to the creational design patterns family. What makes it special is its ability to provide abstraction to the client by encapsulating different types of the same object with various combinations during the creation process.
This article will discuss the Differences between Singleton and Static Class. This series explores Design Patterns, starting with MVC. The article discusses differences between Singleton and Static classes, highlighting their roles in maintaining global state in an application.
The Singleton Design Pattern ensures a class has only one instance and provides global access to it. Implementations include Basic Singleton, Thread-Safe Singleton with synchronization, Double-Checked Locking, and Bill Pugh Singleton using a static inner class.
Learn about the Singleton design pattern, which ensures a single instance of a class in Java. Explore eager and lazy loading techniques, including thread-safe solutions like double-check locking and enum-based singletons.
The Builder Design Pattern is a creational design pattern used to construct complex objects step by step. It separates the construction of an object from its representation, allowing for different types of objects to be created with the same construction process.
The Factory Design Pattern in Java is a creational pattern used to create objects without specifying the exact class of object that will be created. It promotes loose coupling by separating object creation from its usage, enhancing flexibility and maintainability in object-oriented systems.
The Bridge Design Pattern in Java separates abstraction from implementation, allowing them to vary independently. It promotes decoupling by creating a bridge between abstraction and its implementation, enhancing flexibility and maintainability in software systems.
Learn about the Prototype design pattern in Java, a creational pattern that enables object cloning for efficient instantiation. Explore cloneable interfaces, deep vs. shallow copying, and how to implement and use prototypes effectively in your Java applications.
The Abstract Factory design pattern is a creational pattern that provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Explains the MVVM pattern for designing graphical user interfaces, including the roles of Model, View, and ViewModel, XAML-based UI, and why code-behind should be limited.
Discover the Builder Design Pattern, a creational pattern that separates the construction of a complex object from its representation. Learn how it simplifies object creation, especially for objects requiring numerous parameters.
C# Facade Pattern is used in hiding complexity of large systems and provide simpler interfaces. In this article, we will understand what Facade Pattern is and when and how to use a facade pattern in C#.
In this article we will try to implement Facade Design pattern using an example of a Banking System which has different types of accounts like checking and savings.
In this article, We will Explore the diverse landscape of architectural patterns, ranging from traditional monolithic designs to modern microservices and cloud-based architectures.
Learn the Template Method pattern in C#, a behavioral design pattern facilitating framework design. Follow an example using a REPL framework, simplifying app development by automating loop execution and method invocation.
Learn how to use the Null Object pattern in C# to replace null references with safe default behavior and reduce null checks.
Learn how to replace long IF/ELSE or SWITCH statements with polymorphism using the RIP design pattern. This article covers implementing the Simple Factory pattern and lazy loading, enhancing code maintainability and readability in Visual Studio 2019 with .NET Framework.
Explore various caching architectures: client-side, server-side, CDN, distributed, database, and application-level caching. Each offers advantages like reduced latency and improved performance but comes with challenges like complexity and consistency management.
The Observer Design Pattern is a behavioral design pattern where an object, called the subject, maintains a list of its dependents, called observers, and notifies them of any state changes, typically by calling one of their methods.
SOLID principles are fundamental to object-oriented design, ensuring code is clean, maintainable, and scalable. Learn SRP, OCP, LSP, ISP, and DIP for robust, flexible software architecture.
A design approach known as the singleton pattern limits a class's instantiation to a single object while still allowing access to the object. When precisely one item is required to coordinate actions throughout the system, this is helpful.
Why do you use a Singleton class if a Static class serves the purpose What is the difference between Singleton and Static classes and when do you use each one in your program?
The Dependency Inversion Principle (DIP) advocates that high-level modules shouldn't rely on low-level modules. Instead, both should depend on abstractions, reducing coupling and facilitating future changes without modifying existing code structures.
The Open/Closed Principle (OCP) emphasizes that software entities should be open for extension but closed for modification. It enables adding new functionalities without altering existing code structures.
Learn about the Interface Segregation Principle (ISP) for cleaner and more maintainable code. Discover how segregating interfaces based on functionality improves system clarity and prevents unnecessary dependencies.
Explore the Liskov Substitution Principle (LSP) for robust software design. Learn how to ensure derived classes can seamlessly substitute base classes, avoiding unexpected behaviors and maintaining code integrity.
This article explores the Single Responsibility Principle (SRP), emphasizing the importance of class cohesion and minimizing reasons for modification. It provides examples of code violating and adhering to SRP principles.
Encryption has always been intriguing to me but seemed like it could be a very complex process to set up. However, SQL Server made it very simple when they introduced Always Encrypted (AE) into SQL Server 2016 and Azure SQL Database.
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