Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [object-oriented-design]

Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.

2
votes
1answer
107 views

How to model workflows

I'm building a helpdesk-type system, where there are: Customer - can submit/resubmit tickets; Manager - can review submitted tickets, assign to developers (one ticket to multiple developers), review ...
2
votes
1answer
112 views

Design pattern for an indeterminate number and format of questions

In my application, I have a finite number of question types, but the order in which they're asked and whether they're asked at all is not known up-front. An example analogy is a hotel booking process,...
2
votes
1answer
157 views

Message Mapper Design Considerations

Long question context, skip to tl;dr for the meat of it. I am designing an integration between two web applications, and have come to the conclusion that a message pattern would be an appropriate ...
4
votes
0answers
3k views

Option<T> functional type implementation and scenarios

Have you ever being implementing Option<T> functional type? It is discussed here: https://app.pluralsight.com/library/courses/tactical-design-patterns-dot-net-control-flow/table-of-contents ...
3
votes
0answers
72 views

Nested containers with subclasses

I have nested containers A and B. The attributes are there to show that classes have some other members. One of my functions f takes another container of such containers (let's say vector again). ...
3
votes
0answers
5k views

Assembler vs Entity Translator and Entities vs DTO

I was hoping that someone could explain the exact difference between an Assembler and Entity Translator. Martin Fowler describes the Assembler as a sort of Mapper(?) which converts DTOs into Domain ...
2
votes
0answers
127 views

Is this an example of cyclic dependency?

I'm an undergraduate student and I have this assignment on a Discrete Event simulator. Currently I have completed to the end of v1.2 here. Attached also, is an algorithmic overview. I have wrote my ...
2
votes
0answers
76 views

Creating bindable input handler in C++ spanning two separate modules

I have a wxWidgets application. This is the first, main module. The second module is an openGL engine. It's a model-view-(controller) structure, where application is the view (and the controller), ...
2
votes
0answers
63 views

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 ...
2
votes
0answers
78 views

Should I pass presenter to use case when implement clean archeiture using scala

This question came to me when I was trying implement Clean Architecture using Scala, and come across this post. In the accepted answer, @candiedorange emphasis on the separation of responsibility, ...
2
votes
0answers
92 views

Access modifiers in combination of interpreter pattern with template method pattern

Motivation: (Skip to "The Problem" if you don't need motivation for it) As a project for myself, I'm writing an expression parser for certain kinds of mathematical expressions, and I'm using the ...
2
votes
0answers
286 views

Balance between aggregate boundaries and domain consistency in DDD

Designing an Aggregate and choosing an Aggregate Root getting tricky for me all the time especially when it comes to ensuring right transactional contexts and consistency constraints so I'm wondering ...
2
votes
0answers
260 views

How to separate data layer from business layer?

My current .NET project looks like below: Solution (.sln) --BusinessProject A (.proj) --BusinessProject B (.proj) --DataLayer (.proj) --A separate project calling ExternalService 1 (folder) --A ...
2
votes
0answers
93 views

Object oriented design of a plugin framework based on user defined classes?

I would like to design a plugin framework, but I have not been able to find an object oriented design that fits my objectives. My broader design goal is for me to let users define classes in a ...
2
votes
0answers
158 views

Design Pattern for Internal Builder

There is an object which is very complicated to build and many algorithms needed to figure out how it should be created (for your curiosity it is an object that represents and draws the beaming of ...
2
votes
0answers
426 views

Two-way adapters

In GoF there is a two way adapter concept: A potential problem with adapters is that they aren't transparent to all clients. An adapted object no longer conforms to the Adaptee interface, so ...
2
votes
0answers
353 views

What are the benefits of an input/output component design?

For the company I work at, all of our projects, including a new one started last year, are written in C89. We write for vxWorks (a real time embedded operation system). Our software runs multi-...
2
votes
0answers
336 views

Mocking third party web service

I am working on a project to create a wrapper library which will be used to interact with a web service provided by the client's IT team. The reason for this library is that we interact with this ...
2
votes
0answers
551 views

How should Object Model wrapper classes behave when underlying objects are deleted?

I'm currently building an object model library for use in a project. It wraps our internal concepts - Servers, Folders, Items - in an object hierarchy (IFolder, IItem, etc), and we have several ...
1
vote
0answers
27 views

avoid passing dbsession object to multiple modules

I have a project which has a service-oriented architecture. for example, anything relates to payment is inside payment module. -dao -config -constatnts -middlewares -modules -payment -user -...
1
vote
0answers
56 views

How to represent a set of ephemerides?

I am writing software that deals with ephemerides—tables describing the positions and orientations of celestial bodies or spacecraft—and I am struggling with how to represent them in the ...
1
vote
0answers
74 views

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 ...
1
vote
0answers
93 views

What Design Pattern to use to render PDF pages for a PDF Proposal?

I want to create a set of patterns to use for rendering a PDF Proposal (a set of PDF pages). I have made a good start, but not clear on how to proceed when more complexity is involved. I am using ...
1
vote
0answers
132 views

How to create an “internal” api for my library which is not exposed to the user?

Note that my question is not platform specific so that's why I don't add the [kotlin] tag (the code is in Kotlin). If there is a Kotlin-specific answer I'd like to hear about it though I am working ...
1
vote
0answers
68 views

How to follow MVC in a standard iOS App theoritically?

I want to understand one thing in plain english that how do I actually use an standard MVC design pattern in iOS App. I know about Modal View and Controller and theoretically I know what they do(...
1
vote
0answers
220 views

Dependency injection in the template class

I have a template wrapper class around the container std::priority_queue that supports multithreading. The short version of it is below. In this class I employ the function IsReady() that checks ...
1
vote
0answers
119 views

Should all classes and interfaces ultimately derive from one Class, and how does this affect type safety?

If I have "Object" as the top level class, then I have various interfaces, ISomething, ISomethingB, ISomethingC, then I have Class x,y,z, all ultimately deriving from the class Object (these ...
1
vote
0answers
103 views

Representing all possible values or a subset of values

I have a class that needs to return a set of values e.g public abstract class AbstractRule { public abstract String getName(); //Property is an example here. public abstract Set<Property&...
1
vote
0answers
2k views

Generic Type Parameters where one is itself Generic with a Type Parameter of the Other

I have a couple of classes with the following pattern that I am uncomfortable with. Is this the only way to do this, or are their other design patterns that would be more reliable. public class ...
1
vote
0answers
141 views

Proper program design for submitting a form

I have been stuck wondering what the best solution to the problem below: I am developing a form like GUI with quite a few places for input. Currently, I am storing each UI element in an ArrayList ...
1
vote
0answers
173 views

Designing object oriented programming

Basically, I want to make api calls using an SDK I am writing. I have the following classes: Car CarData (stores input values needed to create a car like model, make, etc) Basically to create a ...
1
vote
0answers
188 views

DAO Design with Child Objects

If I have objects that represent a hierarchy of relationships. For example: Person   Spouse     Spouse Contact     Spouse Address   ...
0
votes
0answers
24 views

Ranking / Generating score card based on scoresheet details

I am busy with a score keeping app. And would appreciate suggestions/ help. I will try to be brief and hopefully have explained the main gist of the app below The app basically maintains some scores. ...
0
votes
0answers
112 views

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 ...
0
votes
0answers
45 views

How would design a wrapper for a large, multi-response api like the one described below?

Let me explain. Lets say there exist some service at some organization that exposes information on a company's assets, from employees company-issued devices(laptops and issues) to the the large xerox ...
0
votes
0answers
81 views

Job Scheduling Software

I am designing a Job scheduling software. Users of the software will define the job definition in XML like format https://github.com/etingof/apacheconfig/: e.g. <job> job_name myjob &...
0
votes
0answers
95 views

How can I gracefully handle this addition of animation?

I have the following setup in a GUI library I'm making (for fun). Ignore the colors and positions being integers, it's just to serve the purpose of illustration. // Example program #include <...
0
votes
0answers
48 views

Check if exists user_id when create user

I have User class class User{ public User(string id){ this.User_Id = id; } public string User_Id{get;private set;} } When I create User in Application Layer.I am checking if exists any user ...
0
votes
0answers
288 views

Preferred way to implement protobuf-based classes in Python?

I'm working on a distributed application that will use protocol buffers as it's core interface definition language. While am amazed how pleasant protobufs are to work with in a networking context I'm ...
0
votes
0answers
63 views

Designing currency exchange class

I am writing a small library to get the currency exchange rate, at present the data is being gathered from European Central Bank which provides exchange rates from EUR. The rates are updated daily ...
0
votes
0answers
50 views

DI a post action interface or raise an event?

I got a class A that creates an object of type B and persists it on a database. The class B can be created in several ways so it receives an interface ICreator so it can create the object. Problem is ...
0
votes
0answers
40 views

Relationship Between Driving Simulation Objects

I am working on a very basic driving simulation. I am trying to decide the relationship between the following objects: Freeway, Vehicle, Driver, ProximitySensors. My real-world analysis suggests the ...
0
votes
0answers
55 views

Should a new interface be created if it doesn't add anything to the contract (yet)?

I'm writing an API for a bunch of different aspects of my project. I have some code that currently looks like interface LoginCredentialRepository { Callable<LoginCredential> ...
0
votes
0answers
160 views

What is the meaning of the different interface types in Ian Sommervilles's Software Engineering?

Reading Ian Sommervilles's Software engineering, he mentiones there are following interfaces: Paramater interface: data or functions are passed from one component to another Shared memory interface: ...
0
votes
0answers
611 views

Modeling a cookbook recipe with django

I'm trying to model recipes in a cookbook. Here's what I have so far: class Recipe(models.Model): title = models.CharField(max_length=255) class Ingredient(models.Model): class Meta: ...
0
votes
0answers
53 views

How to save the differences between objects which are the result of random changes?

I keep a state object of the following form: class State { int num1, num2; List<String> strings; MyObject myObject; // A class I wrote // etc. } The state changes many times ...
0
votes
0answers
55 views

Graphing Objects without invoking Domain Logic

I'm unsure of how to go about implementing a certain aspect of my objects. Given a model class that represents an object, with business functionality based on various events, how can we graph the ...
0
votes
0answers
186 views

EF “Code First” and Object/Relational Impedance

I'm trying to learn more about the current orthodoxy with respect to ASP.NET MVC application design, and I stumbled upon something that confuses me, relating to the choice among database design ...
0
votes
0answers
169 views

How do I model this Shipping Routes scenario?

Trying to begin coding this solution. I have a scenario as follows below: A shipping operator has a network of routes to various ports, the routes are specified explicitly below Buenos ...
0
votes
0answers
306 views

Reporting Logic vs Domain Logic

Should the reporting logic to extract domain data in a certain format reside in domain objects or separate reporting objects? The reporting logic needs to: select entities/data which match selection ...