Design Patterns
Creational, structural and behavioural patterns, architectural styles and antipatterns.
0/207
- 1What is the Singleton pattern?Middle
- 2What key problems does the Singleton pattern solve?Middle
- 3How does a lazy Singleton differ from an eager one?Middle
- 4Why is Singleton often called an "anti-pattern"?Middle
- 5How does Singleton violate the single responsibility principle (SRP)?Middle
- 6When is Singleton actually justified?Middle
- 7What is the Factory Method pattern?Middle
- 8How does Factory Method differ from a plain constructor?Middle
- 9How does Factory Method contribute to system extensibility?Middle
- 10What is the difference between Factory Method and Abstract Factory?Middle
- 11How is Factory Method related to the open/closed principle (OCP)?Middle
- 13What is the Abstract Factory pattern?Middle
- 14How does Abstract Factory differ from Factory Method?Middle
- 15How does Abstract Factory promote loose coupling between components?Middle
- 16Why is Abstract Factory often used together with Dependency Injection?Middle
- 17What are the weaknesses of Abstract Factory?Middle
- 18What is the Builder pattern?Middle
- 19How does Builder help when creating complex objects?Middle
- 20What does "director" mean in the Builder pattern?Middle
- 22How does Builder differ from Chain of Responsibility?Middle
- 23What drawbacks does the Builder pattern have?Middle
- 24What is the Prototype pattern?Middle
- 25When is the Prototype pattern used?Middle
- 26When can Prototype be dangerous?Middle
- 1What is the main purpose of the Adapter pattern?Middle
- 2What types of adapters exist?Middle
- 3What is the difference between the Adapter and a plain wrapper class?Middle
- 4When should you use the Adapter pattern in a project?Middle
- 5What does the Bridge pattern do?Middle
- 6What is the point of separating abstraction and implementation in the Bridge pattern?Middle
- 8What advantages does the Bridge pattern give when testing code?Middle
- 9When can the Bridge pattern be overkill?Middle
- 10What problem does the Composite pattern solve?Middle
- 11Why is it important for objects and containers to share a common interface?Middle
- 12Why is Composite often used in file systems?Middle
- 13What is the advantage of Composite for recursive data structures?Middle
- 14What drawbacks does the Composite pattern have?Middle
- 15What is the essence of the Decorator pattern?Middle
- 17What is the advantage of dynamically adding functionality?Middle
- 18What do Decorator and Wrapper have in common?Middle
- 19What drawbacks does the Decorator pattern have?Middle
- 20What is the essence of the Façade pattern?Middle
- 21How does Façade differ from Adapter?Middle
- 22How does the Façade pattern help reduce coupling between modules?Middle
- 24Why does Façade make testing and isolating components easier?Middle
- 25What happens if a facade becomes too "fat"?Middle
- 26What problem does the Flyweight pattern solve?Middle
- 27Why can Flyweight improve performance?Middle
- 28When does using Flyweight become inefficient?Middle
- 29What does the Proxy pattern do?Middle
- 30How does "Proxy" differ from "Decorator"?Middle
- 31In what situations is Proxy especially useful?Middle
- 32What challenges can arise with the Proxy pattern?Middle
- 2How is a request passed along a chain of handlers?Middle
- 3What are the pros and cons of the Chain of Responsibility?Middle
- 4In which cases is it appropriate to apply this pattern?Middle
- 5What does the Command pattern do and why is it needed?Middle
- 6How does the Command pattern facilitate undo/redo functionality?Middle
- 7What classes are typically involved in implementing Command?Middle
- 9What is the core idea of the Interpreter pattern?Middle
- 10When is using the Interpreter pattern justified?Middle
- 11Why is this pattern rarely used in practice?Middle
- 12What is the purpose of the Iterator pattern?Middle
- 13How does an iterator simplify traversal of complex data structures?Middle
- 14What is the difference between an external and an internal iterator?Middle
- 16How does it reduce coupling between objects?Middle
- 17What are Mediator's downsides?Middle
- 18When does Mediator lead to architectural complexity?Middle
- 19What does the Memento pattern do?Middle
- 20What three roles are involved in Memento?Middle
- 21What's the difference between Memento and Command when implementing rollback?Middle
- 22How do you store a change history using Memento?Middle
- 23What is the essence of the Observer pattern?Middle
- 25What problems does Observer solve?Middle
- 26What does the State pattern do and when is it useful?Middle
- 27How does State differ from Strategy?Middle
- 28How does State simplify large conditional constructs (if-else/switch)?Middle
- 29What classes are involved in implementing the pattern?Middle
- 30What does the Strategy pattern do and why is it needed?Middle
- 31How does Strategy help get rid of many conditional operators?Middle
- 32How does Strategy increase a system's flexibility?Middle
- 33What is the idea behind the Template Method pattern?Middle
- 35What is the Visitor pattern used for?Middle
- 36How does Visitor help add new operations without modifying classes?Middle
- 37What classes are involved in Visitor?Middle
- 1What does the Inversion of Control (IoC) principle mean?Middle
- 2What does "dependency inversion" (inversion) mean?Middle
- 3How does IoC help reduce coupling between components?Middle
- 4Why should high-level modules not depend on low-level modules?Middle
- 5How does IoC help build modular systems?Middle
- 7How does DI differ from ordinary manual dependency injection?Middle
- 8What types of dependency injection exist?Middle
- 9How does DI help with unit testing?Middle
- 10What does "container-based DI" mean?Middle
- 11Why can incorrect DI lead to "dependency hell"?Middle
- 12Why can incorrect DI lead to "dependency hell"?Middle
- 13How does DI increase a system's flexibility when scaling?Middle
- 14What is a dependency container?Middle
- 15What does the "lifetime" of dependencies (singleton, scoped, transient) mean?Middle
- 16How to avoid circular dependencies in a container?Middle
- 17Why is it important to manage the lifetime of services?Middle
- 19What is layered architecture?Middle
- 20What main layers does traditional architecture include?Middle
- 21What are the advantages of layered architecture?Middle
- 22What is the "presentation layer"?Middle
- 23What does the "business logic layer" do?Middle
- 24How do layers interact with each other?Middle
- 25Why is it important to limit dependencies between layers?Middle
- 26Give examples of typical layers in a web applicationMiddle
- 27How to implement DI in a layered architecture?Middle
- 29What is the main idea of the MVC pattern?Middle
- 30What are the responsibilities of Model, View, and Controller?Middle
- 31How does MVC provide separation of concerns?Middle
- 32What are the benefits of MVC for UI applications?Middle
- 33Why does MVC simplify testing?Middle
- 34What are the common mistakes when implementing MVC?Middle
- 36Tell me about the MVP approach.Middle
- 37How does MVVM differ from MVC?Middle
- 38What does the ViewModel do in MVVM?Middle
- 39How does the ViewModel provide two-way data binding?Middle
- 40What does the Presenter do in MVP?Middle
- 41Why is MVVM considered a reactive approach?Middle
- 42What does "unidirectional data flow" mean?Middle
- 44What is microservices architecture?Middle
- 45How do microservices differ from a monolith?Middle
- 46What problems does the microservices approach solve?Middle
- 47What does the "one business function, one service" principle mean?Middle
- 48What is an API Gateway?Middle
- 49How do microservices interact with each other?Middle
- 51What is a "bounded context" in microservices architecture?Middle
- 52Why is it important to isolate the database for each microservice?Middle
- 53What are the downsides of the microservices approach?Middle
- 54When are microservices not justified?Middle
- 55What does "loose coupling" mean between services?Middle
- 56What does "high cohesion" mean inside a service?Middle
- 57How to determine the boundaries of a microservice?Middle
- 58Why is REST not always the best choice for microservices?Middle
- 59When should you use gRPC?Middle
- 61What is event sourcing?Middle
- 62What is idempotency and why is it needed?Middle
- 63How is the data consistency problem between services solved?Middle
- 64Why is direct access to another service's database an anti-pattern?Middle
- 65What does an orchestrator (Kubernetes, Nomad, ECS) do?Middle
- 66What anti-patterns do you know when working with microservices?Middle
- 67What is a "Distributed Monolith"?Middle
- 69What key elements are part of EDA (publisher, subscriber, event bus)?Middle
- 70What does "event sourcing" mean?Middle
- 71What does a message broker (Kafka, RabbitMQ) do?Middle
- 72How does EDA improve scalability?Middle
- 73Why does EDA reduce coupling between services?Middle
- 74What does "idempotency" mean in the context of events?Middle
- 75How does EDA differ from request-response architecture?Middle
- 76How to store events in an event store?Middle
- 77What problems arise from redelivering events?Middle
- 78What does Clean Architecture represent?Middle
- 79How are the layers structured in Clean Architecture?Middle
- 81What does the "dependency rule" mean?Middle
- 82How is DI implemented in Clean Architecture?Middle
- 83How does Clean Architecture differ from Layered Architecture?Middle
- 84Why shouldn't the UI depend on business logic?Middle
- 85What is Domain-Driven Design (DDD)?Middle
- 86Why is DDD especially well suited to complex domains?Middle
- 88What is model in the context of DDD?Middle
- 89How does DDD help avoid "anemic" models?Middle
- 90How does DDD affect the project's architecture?Middle
- 91How does DDD relate to the SOLID principles?Middle
- 92What is strategic design in DDD?Middle
- 93What does bounded context (a limited context) mean?Middle
- 95What is an entity?Middle
- 96What is a repository?Middle
- 97What does the term "Ubiquitous Language" mean?Middle
- 98What is an aggregate in DDD?Middle
- 99Why should aggregates be small?Middle
- 100What is a domain event (an event in the domain)?Middle
- 101What is an "Anemic Domain Model"?Middle
- 102Why does DDD help define microservice boundaries?Middle
- 1What are grasp patternsSenior
- 3What is Adapter design pattern?Middle
- 4decorator patternMiddle
- 5What is Proxy design pattern?Middle
- 6What is Module design pattern?Middle
- 7Observer patternMiddle
- 8What is Strategy design pattern?Middle
- 9What is Command design pattern?Middle
- 10MVC (model-view-controller) and MVP (model-view-presenter) design patternsMiddle