All Questions
Tagged with design-patternsobject-oriented
29 questions with no upvoted or accepted answers
3votes
0answers
81views
Memento and releasing resources
Let's suppose we have a class whose state has to be saved and later restored, and we resorted to the Memento pattern for that. What if the state includes resources that have to be explicitly ...
2votes
0answers
88views
Modelling network and persistent entity representations
I have an app where I need to synchronize some entities (simply download latest versions of entities from server to client). Entity has bunch of text properties and bunch of resource links (referenced ...
1vote
0answers
113views
Splitting an object's state into multiple objects
I'm writing a virtual CPU, and I decided to create a class for each command, to make it easier to replace/add/remove commands without changing too much. The original idea was that ICommand would be ...
1vote
0answers
226views
What design pattern does this implementation follow?
For a middleware solution I expose an API, which processes data and sends the necessary information to different parties. In the current design we create a new client, which acts sort of like an ...
1vote
0answers
284views
Scalable architecture design for managing data flow in C++ using an Observer design pattern
What I need I need a suitable and scalable solution to manage data flow between the classes in my C++ program. Why I need it Upon new feature requests, I'm continually adding new classes to the ...
1vote
0answers
59views
How does a framework manager, broker or coordinator class handle pluggable extensions and make them run?
I'm trying to understand if there is a manager/broker/coordinator class in frameworks and I hope so, but what possible ways are in a framework to make it run the pluggable extensions and what the term ...
1vote
0answers
87views
Expected behavior from client when thinking about design patterns?
I'm confused about the behavior I should expect from a client when thinking about design patterns. To be more precise, I'm reading the Head First Design Patterns book, and on the difference between ...
1vote
0answers
83views
Hierarchy of models while designing a client for a RESTful service
I am trying to write a client for a restful service. I am confused in designing the models. Below are the details: I have a Model named UnicastMessageRequest, it's definition is like this: ...
1vote
0answers
3kviews
design pattern/oop for large validation rule set
I'm writing this in node.js I have some data that needs validating before anything can be done with this. The data is validated in two different ways. I can use JSONSchema to validate the structure ...
0votes
0answers
205views
How to handle dependency injection in a library to avoid frequent breaking changes?
Let's say I have a C# .NET library with the following classes: public class FooService { private readonly IDependencyA a; public FooService(IDependencyA a) { this.a = a; } ...
0votes
0answers
104views
parent-child properties value inheritance at runtime/instance
I have 2 entities with a parent-child relation (like a base product and product variants), basically the two entities have the same properties and at runtime (when instantiating the object) if the the ...
0votes
0answers
233views
Is Controller a special kind of Indirection in GRASP Design pattern?
This is Indirection according to Wikipedia Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled. Controller seems ...
0votes
0answers
71views
State Pattern: Changing object behavior based on more than one field and consistency between their values and state value
I'm Trying to learn about State Pattern. In most of State Pattern examples that I have seen, methods of class change their behavior based on just one field (I mean before applying State Pattern and I'...
0votes
0answers
73views
Apply Value Object (Stringly Typed) in PHP
What is the best way to prevent wrong states in an object? This is the source of my question. Basically my curiosity started with the intention of not letting a class exist with wrong values. Prevent ...
0votes
0answers
204views
Decorator Pattern Java
This is an object-oriented design question that is specific to Spring Boot. I'm extending a Spring Boot application that has an interface that is being extended and used inside another service. The ...