Giter Site home page Giter Site logo

lld_by_ishan's Introduction

Low-Level Design Series by Ishan

Welcome to the Low-Level Design (LLD) series by Ishan! ๐Ÿš€ ๐Ÿ’ป This repository is a comprehensive collection of detailed low-level design problems, structured into different modules covering Object-Oriented Programming (OOP), SOLID design principles, design patterns (Creational, Structural, Behavioral), and specific low-level design problems.

Table of Contents

  1. Object-Oriented Programming (OOP) ๐Ÿ”—
  2. SOLID Design Principles ๐Ÿ”—
  3. Design Patterns ๐Ÿ”—
    • Creational ๐Ÿ”—
    • Structural ๐Ÿ”—
    • Behavioral ๐Ÿ”—
      • Chain of Responsibility ๐Ÿ”„: Illustrated through a real-life example involving a hierarchical approval system within an organization. The chain involves managers, senior managers, and directors, each capable of approving specific types of requests, with unapproved requests cascading up the hierarchy.
      • Command Pattern ๐Ÿ› ๏ธ: Explored through two diverse examples:
        • Banking Scenario: Demonstrates how commands can be used to execute various banking operations.
        • Air Conditioner System: Introduces a flexible command pattern where commands are issued from a remote to the AC, allowing for easy addition of new commands without altering existing code.
      • Iterator Design Pattern ๐Ÿ”: Focuses on the creation of a custom iterator that traverses a list of browsing history objects, providing a convenient way to obtain desired results.
      • Mediator Design Pattern ๐Ÿค: Examined through a chat server and client interaction, where communication between users is facilitated through a mediator (server). Also applied to an auction system, illustrating how live bids are managed.
      • Memento Design Pattern ๐Ÿ•ฐ๏ธ: Explored using an article storage scenario, demonstrating how the pattern enables the storage of previous states that can be recovered at any point in the future.
      • Observer Design Pattern ๐Ÿ”๐Ÿ‘€: Examined through multiple examples where a subject is tracked by various observers. The subject notifies registered observers, triggering their update methods.
      • State Design Pattern ๐Ÿ”„๐Ÿ“ฆ: Illustrated through two examples:
        • Order State Lifecycle: Captures the lifecycle of an order with various states.
        • TV State Management: Manages the state of a TV, showcasing the transition between different operational states.
      • Strategy Design Pattern ๐ŸŽฎ๐Ÿ”ง: Explored through diverse scenarios:
        • Bird Management System: Demonstrates how different birds have different flying and quacking behaviors.
        • Payment Strategy System: Applied during runtime for shopping payments, allowing flexible payment strategy selection.
      • Template Design Pattern ๐Ÿ“œ๐ŸŽฎ: Demonstrated through examples in gaming, where different games share a common structure for initialization, start, and stop methods. The play method is intentionally not overrideable by child classes, ensuring a consistent template.
      • Visitor Design Pattern ๐Ÿš—๐Ÿ’ณ: Beautifully illustrated through two real-life scenarios:
        • Car Service Center: Represents a car visiting a service center to receive various services.
        • Offer System: Deals with multiple offers and credit cards, utilizing visitor methods for each card to interact with specific offers, creating numerous possible combinations.
  4. Low-Level Design Problems ๐Ÿ”—

OOP

The OOP module contains fundamental Java concepts, providing a solid foundation for understanding object-oriented programming.

SOLID Design Principles

Explore detailed explanations of the SOLID design principles, helping you write maintainable and scalable code.

Design Patterns

Dive into the world of design patterns, categorized into three sub-modules:

Creational

Discover design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

Structural

Explore patterns that focus on simplifying the composition of classes or objects, emphasizing the composition of classes or objects.

Behavioral Design Patterns ๐Ÿ”—

In the Behavioral module of Design Patterns, we explore solutions that focus on algorithms, communication, and the assignment of responsibilities between objects.

1. Chain of Responsibility ๐Ÿ”— ๐Ÿ”„

Illustrated through a real-life example involving a hierarchical approval system within an organization. The chain involves managers, senior managers, and directors, each capable of approving specific types of requests, with unapproved requests cascading up the hierarchy.

2. Command Pattern ๐Ÿ”— ๐Ÿ› ๏ธ

Explored through two diverse examples:

  • Banking Scenario: Demonstrates how commands can be used to execute various banking operations.
  • Air Conditioner System: Introduces a flexible command pattern where commands are issued from a remote to the AC, allowing for easy addition of new commands without altering existing code.

3. Iterator Design Pattern ๐Ÿ”— ๐Ÿ”

Focuses on the creation of a custom iterator that traverses a list of browsing history objects, providing a convenient way to obtain desired results.

4. Mediator Design Pattern ๐Ÿ”— ๐Ÿค

Examined through a chat server and client interaction, where communication between users is facilitated through a mediator (server). Also applied to an auction system, illustrating how live bids are managed.

5. Memento Design Pattern ๐Ÿ”— ๐Ÿ•ฐ๏ธ

Explored using an article storage scenario, demonstrating how the pattern enables the storage of previous states that can be recovered at any point in the future.

6. Observer Design Pattern ๐Ÿ”— ๐Ÿ”๐Ÿ‘€

Examined through multiple examples where a subject is tracked by various observers. The subject notifies registered observers, triggering their update methods.

7. State Design Pattern ๐Ÿ”— ๐Ÿ”„๐Ÿ“ฆ

Illustrated through two examples:

  • Order State Lifecycle: Captures the lifecycle of an order with various states.
  • TV State Management: Manages the state of a TV, showcasing the transition between different operational states.

8. Strategy Design Pattern ๐Ÿ”— ๐ŸŽฎ๐Ÿ”ง

Explored through diverse scenarios:

  • Bird Management System: Demonstrates how different birds have different flying and quacking behaviors.
  • Payment Strategy System: Applied during runtime for shopping payments, allowing flexible payment strategy selection.

9. Template Design Pattern ๐Ÿ”— ๐Ÿ“œ๐ŸŽฎ

Demonstrated through examples in gaming, where different games share a common structure for initialization, start, and stop methods. The play method is intentionally not overrideable by child classes, ensuring a consistent template.

10. Visitor Design Pattern ๐Ÿ”— ๐Ÿš—๐Ÿ’ณ

Beautifully illustrated through two real-life scenarios:

  • Car Service Center: Represents a car visiting a service center to receive various services.
  • Offer System: Deals with multiple offers and credit cards, utilizing visitor methods for each card to interact with specific offers, creating numerous possible combinations.

Low-Level Design Problems

Each directory in this module corresponds to a specific low-level design problem. Inside each directory, you'll find a comprehensive solution along with explanations, diagrams, and code samples.

Contact Information

If you have a specific design problem you'd like me to cover or if you simply want to share your thoughts, feel free to reach out:

Thank you for being a part of the Low-Level Design Series community! ๐Ÿš€

Show your Support

If you find this repository helpful or have suggestions for improvement, don't forget to โญ๏ธ it! Your support keeps this project active and encourages further development.

Happy coding! ๐Ÿš€

lld_by_ishan's People

Contributors

ishan-aggarwal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.