Best of Design PatternsMarch 2024

  1. 1
    Article
    Avatar of devtoDEV·2y

    Polymorphism in Javascript

    Polymorphism is a fundamental concept in object-oriented programming (OOP) languages, allowing the same function to be called with different signatures and enabling flexibility and adaptability in code design. In JavaScript, polymorphism is achieved through prototype inheritance and method overloading. It enhances code flexibility, extensibility, and reuse by allowing objects to exhibit multiple forms and behaviors based on their context. Different types of polymorphism in JavaScript include ad-hoc polymorphism, parametric polymorphism, subtype polymorphism, dynamic polymorphism, and compile-time polymorphism. Polymorphism is also leveraged in functional programming and can be applied in various design patterns, such as the strategy pattern, template method pattern, and visitor pattern.

  2. 2
    Article
    Avatar of mwaseemzakirWaseem .NET Newsletter·2y

    EP 51 : Null Object Pattern in C#

    The Null Object Pattern in C# provides a way to handle null values by returning a default object representing null instead of throwing a null exception. It can be used in situations where you want to provide default implementations for methods, simplify code with frequent null checks, or reduce the complexity of handling null references. However, it's important to carefully consider the design and requirements of your application before applying this pattern.

  3. 3
    Article
    Avatar of devtoDEV·2y

    ⚛️ Applying Design Patterns in React: Strategy Pattern (Part 2)

    Learn how to apply the Strategy pattern in frontend projects to avoid code duplication, improve code readability, and easily extend functionality without modifying existing logic.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    Rust Design Patterns

    A book about Rust design patterns that provides guidelines, methods, and anti-patterns to solve common coding problems.

  5. 5
    Article
    Avatar of javarevisitedJavarevisited·2y

    Strategy Design Pattern In Java

    Learn about the Strategy design pattern in Java and how it can improve flexibility and reusability in code.