Stack Exchange Network

Stack Exchange network consists of 174 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.

3
votes
0answers
70 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
2k 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
4k 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
111 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
62 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
89 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
233 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
235 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
90 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
156 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
400 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
329 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
315 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
543 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
25 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
55 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
72 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
81 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
69 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, ...
1
vote
0answers
129 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
63 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
211 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
118 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
100 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
1k 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
186 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
56 views

Factory methods for converting one tree of objects to another

I have a tree of objects that I need to convert to a similar (but not isomorphic) tree of other objects and the creation logic is quite complex. The object types are in a hierarchy where only the ...
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
45 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
210 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
81 views

Game Model Architecture?

Just for background, this is a project using Swift and GameplayKit. I've dealt with MVC and simple design patterns and architecture. Shout out to this thread(What architecture should I use for my game ...
0
votes
0answers
48 views

Creating a central repository for repositories with related data?

I am building a website for a fruit company. In my database I have a list of countries, and for each country, a list of distributors that sell my fruit products. The country and distributor are ...
0
votes
0answers
55 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
180 views

Abstract Factory of Composite Builders - Dependency Injection?

I was hoping to get some help on a mixture of complex design patterns. I will do my best to simplify the issue using very basic examples. Modularity is a very big need in this system as well as ...
0
votes
0answers
278 views

Class Model Diagram vs. Concept Class Diagram?

In the requirements engineering process of gathering requirements, etc., models are used to depict the relationship between various entities. The two mentioned models are just two but I'm trying to ...
0
votes
0answers
86 views

Send records to messaging queue using either of one policy

I have bunch of keys (clientKey) and values (processBytes) that I want to send to our messaging queue by packing them in one byte array. I will make one byte array of all the keys and values which ...
0
votes
0answers
37 views

Access not similar configs with one data access object

I'm currently working on a little project and hope to get better with software design. I have a solution, but I think there is a much a better way I’m not aware of. The problem is each config needs a ...
0
votes
0answers
103 views

How to implement strategy pattern in context of few key elements on every page?

This is my concern: I need to generate content for <title> <h1> and <meta name="description"> tags, that will affect ~ 100 000 pages. Basically, it is a SEO optimization. ...
0
votes
0answers
64 views

Design pattern which could suit for startup initialization of static variables before an engine starts serving its request

I should initialise the startup variables before serving the requests. Few of my variables could be initialised from local property file (say init.properties) and few would get initialised from an url ...
0
votes
0answers
179 views

How to make a proper argument manager for CLI Software?

I thinked about an ArgumentManager class working like this: A constructor with argc & argv(or std::vector) as parameter. getCount() => Returns argc. getArgLit(argLit) => Return true if the ...
0
votes
0answers
82 views

UWP Application interfacing with Desktop Application Programming Structure

Intro: I'm writing an application that monitors certain events and sends a notification when said event takes place. Pretty simple. Problem: In order to monitor said events I need to use a .NET ...
0
votes
0answers
49 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
401 views

Good architectural patterns for layered website architecture

I am working on a decently sized website (using Java/Spring). We've tried our best to follow the layered architecture but are struggling to come up with good design guidelines for the whole team to ...
0
votes
0answers
93 views

Architecture with Commands, Service Layer and DAOs

I have an application that basically has to execute a chain of processes. These processes act on different UNIX hosts and different Databases. So I came up with the following architecture in 3 layers. ...
0
votes
0answers
73 views

Properly designing a data class

So I have the following problem: I need to create a data class containing a bunch of properties. I also need to have header properties and child properties since I will be using an expandable list in ...
0
votes
0answers
39 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> ...