Questions about problem solving and planning for a solution through software design.

learn more… | top users | synonyms (1)

0
votes
1answer
35 views

Passing by argument vs keeping it as a member

I really cannot decide what option is the best, I see plenty of down/upsides to both approaches and right now I'm undecided. For example; class DX11GBuffer { public: DX11GBuffer(ID3D11DevicePtr ...
0
votes
0answers
24 views

Design a Queuing Solution with Clustering and Multiple Consumers

It is a Design Problem which I am listing out here. I have different set of business operations that are carried out for different business entities. Operations: Operation A Operation B Operation ...
0
votes
1answer
25 views

To cache or not to cach a ReadOnlyWrapper object?

I have a system with a structure like this: The ConcreteWriteable is caching the ReadOnlyWrapper. This is a similar system to what .Net's System.Array uses for its Array.AsReadOnly<T>(T[] ...
0
votes
1answer
73 views

Which design is better? [MainClass] -> [Class] OR [MainClass] -> [MiddleClass] -> [Class]

I have two designs which achieve the same result. -------Design A MainClass has a List and two methods. The methods create an autonomous object and is added to the list. The reason for the ...
0
votes
1answer
71 views

Resources to teach fundamental design concepts to a self-taught experienced developer [on hold]

I'm working remotely with a programmer who is very smart and good at hacking his way around problems, but lacks some basic concepts that are fundamental to write good software: A good grasp of ...
0
votes
1answer
54 views

trigger chat across multiple devices?

I am building up a chat app. I am struggling with the idea of syncronizing the chat messages in real time. My Scenario : trigger chat messages(incoming and outgoing) on multiple devices ...
-4
votes
0answers
15 views

How do I create the windows explorer kind of search bar with QT [on hold]

I am currently writing a program with QT using sqlite database and I need to write code to query the database and I want it to be like the search bar in Windows. such that as the user types, it brings ...
2
votes
4answers
45 views

Handle server-side/client-side when for showing missing information as placeholders

I have a database table which stores Incident details. Each Incident can have an image saved for it. There are some Incidents which will not have an image for it. I have an API which pulls the image ...
0
votes
0answers
85 views

Better way than scrolling a long list [migrated]

I have a mobile app that allows you to browse lists of songs: [a][b][c][d][e] Elvis - Song 1 Elvis - Song 2 Elvis - Song 3 Ernie Wood - Song 4 You can jump to the letter to filter based on the ...
5
votes
1answer
164 views

Log to file or to database table?

I'm developing a web application which uses MS SQL for various data: including users, user accounts, user licenses, license prices, invoices. I need to log users' real-time usage of the system, and ...
6
votes
5answers
231 views

Algorithm to test file equivalence

I'm writing a program that needs to test if a file is equivalent to one or more other files. To accomplish this, every time we see a new file we stat the file and get the size. We use the size as a ...
0
votes
0answers
38 views

adding model specific CRUD operation web api endpoints

Are there are any major design flaws / smells in creating a web api as described below The models I have public class CourseModel { public String Name {get; set;} public ...
1
vote
2answers
65 views

Explicitness, verbosity and their counterpart - when to prefer which?

I'am the only one in my team who advocates for adding a little implicitness in favor of codebase reduction and decreasing repetition. Yet I don't want to be a biased 'Bad apple' playing against ...
7
votes
3answers
175 views

How to model and store an entity which has “one or more” values

I'll use C# to design the model to be persisted Let's suppose I have the following entity: public class Episode { public int Id { get; set; } public string Title { get; set; } public ...
7
votes
4answers
832 views

Is there something as a bug-free application? [duplicate]

We are developing an application that goes through many testers before reaching our client. Finally, when it reaches the client, they find some more bugs and report to us, and this has become a ...
0
votes
0answers
65 views

Design of a datamodel in a OO way

I'm looking for some advice how to design a datamodel in OO way (C++ in special). My problem: The user input in runtime is a 1D matrix A = (a0,...,an). The program creates - on the basis of A - ...
1
vote
1answer
158 views

Is it OK for an interface to only communicate half of how something should work?

I have a service where certain other services can report their status to. By status I don't mean whether they are running or not, but whether they have received data. The point is that other services ...
0
votes
0answers
74 views

What is the best way to remember a successful execution over several program calls?

I'm working on a build process, that is called manually over the command line. To check if it exited unsuccessfully during the build I want to set a lock file (symbolic link) and remove it on ...
2
votes
1answer
78 views

Suitable software development method/model for R&D Projects

For Research and Development (R&D) project, what type of software development method / model more applicable/suitable? For example, my recent R&D project has several parameters: Requirement ...
1
vote
1answer
73 views

ADT design choices

How do you go about deciding which of the following two representations (in F# syntax) is the right choice in a particular situation? type Choice = A of string | B of string Or: type ChoiceKind = ...
0
votes
2answers
90 views

Track a series of choices with a single number

I want to track a series of scored questions in a single number (the total score). Is that possible? and how? For example, I have 30 questions with either 3 or 2 choices. For any given question, the ...
22
votes
5answers
1k views

Saving an object via a method of its own or via another class?

If I want to save and retrieve an object. Should I create another class to handle it, or it's better to do that within the class? Or maybe mixing of both? Which is recommended according to OOD ...
0
votes
4answers
414 views

Is it bad to use DI to inject constructor parameters at runtime?

These are two classes, the first one I inject an instance of type IEngine while the second one I inject owner's name, tickets and engine. Version 1: public class Car { public Car(IEngine ...
6
votes
3answers
211 views

Decentralized Data Management - encapsulating databases into microservices [closed]

I've recently been taking a course on Software design and there was a recent discussion/recommendation about using a 'microservices' model where components of a service are separated into microservice ...
3
votes
1answer
64 views

Introduce Data Transfer Objects or expose complex data model in REST

We are working on an MVVM application. Jersey (backend) exposing a REST interface and AngularJS (frontend) being the only consumer of this interface. The application uses a complex database model ...
6
votes
1answer
165 views

In MVC should a model contain subview models?

Some background: A colleague and myself have different interpretations of MVC which means, given the same problem, we are coming up with radically different solutions. He comes from a Java background ...
1
vote
1answer
125 views

Creating a calendar/planner program. Confused about OO logic?

I'd like to create a piece of software that has the functionality of a common written planner. To do this, it will have a Calendar. When planning the program, I became confused as to how I would ...
3
votes
1answer
208 views

How to programmatically connect to a particular PC of unknown IP from a WiFi network?

I want to connect and transfer data between a PC and an Android device both of which are on the same local WiFi network. I cannot use the local IP as such in the code to actually get the connection ...
3
votes
0answers
120 views

How to handle a memory consuming member variable

Suppose multiple objects of the same class should do something which takes a memory consuming resource. Which of the following approaches is recommended to define and use the resource by the objects? ...
1
vote
1answer
91 views

Should a web app for a service access its data via its own API or directly?

I'm building a service that will consist of mobile and desktop apps, which will require me to build my own RESTful web API to easily keep the data for the service in sync. I am also building a web ...
1
vote
4answers
205 views

Member variables versus. state variables? [closed]

Sometimes we declare a member variable in the scope of class but we could do the same by providing input to and getting outputs of the functions. I am learning that member variables are to hold the ...
0
votes
1answer
80 views

Should Form Object be considered a DTO?

I got this from one of online video tutorials. Author binds form data not to Value Object directly, but first to validable DTO, and THEN to Value Object, using service. Example: package ...
3
votes
4answers
225 views

How do you handle versioning in a multi-sided project?

I know it's a broad question so I'll try to be as specific as possible. This question is more an "organisational" question than a technical one. We have a multi-sided project with these main ...
0
votes
0answers
23 views

Incorporating web designer's into a rails app

I have a designer who has great knowledge of HTML, CSS and JavaScript (Not jQuery or AJAX though). He gives me his designs in those files and I have to incorporate it into my apps. The site is not ...
2
votes
1answer
96 views

Unique_ptr to hold memory for custom VM

I work for a company that use a custom DSL and my job is to port the VM to C++. I'm trying to do this in compliance with the C++11 standard so i use auto when appropriate, the new for syntax, etc. ...
1
vote
1answer
56 views

Design for a shared checkout

I am currently working on a ecommerce system that is slightly different in structure to a typical ecommerce system in that you have multiple stores, accessing the same database from different URLs. ...
0
votes
3answers
146 views

Should simple tasks be divided into separate functions? [duplicate]

If I have to write a simple program (25-35 lines), should I divide it even further, in functions which have a few lines and get executed max. 2 times, or to put it all im one? e.g. if I need to add ...
0
votes
0answers
24 views

Design architecture and software for webapp integrating with few other endpoints (Email Server, Jira, CRM system)

In my upcoming project, I need to integrate a webapp with few other endpoints. Main duty of the webapp will be some kind of thin-client for inner JIRA system for company. Moreover, I'll need to ...
0
votes
2answers
175 views

Bad Practice using Auto Generated Classes for Data Access

I've seen this before but haven't found concrete reasons. When you add Entities to your EF model, EF auto generates classes for these entities. In terms of DataAccess, why is it preferred to not ...
3
votes
3answers
487 views

Should an object load itself?

although I'm programming in C++ for some time now, I'm always faced with design decisions (probably due to the language's flexibility). One such problem is deciding if a method should be part of the ...
18
votes
8answers
2k views

Is it normal for a programmer to not have 100% clarity over their own code at times? [closed]

I'm not an expert programmer so this may be why, but I've come to notice that whenever I create complex code (like a Chess game I recently made), I am able to write the correct code to get the program ...
0
votes
1answer
85 views

Async properties in interfaces to cater for the possibility of expensive first-time evaluation: Is this a good idea?

First of all, sorry if this post is too long. I'll start with the… Short version: Is it generally advisable or a good idea to design an interface property as asynchronous simply because we cannot be ...
0
votes
1answer
75 views

How to determine which service to call

I have modeled my application using multiple 'user' domain objects. Candidate Recruiter Administrator Each entity extends from an AbstractUser implementing UserInterface. interface UserInterface ...
0
votes
3answers
108 views

Communicating between unrelated components/objects

Imagine that I have a game, with Monsters, Missions, Vehicles, and of course their controllers and such, so a Monster class, Mission Controller class, Vehicle Controller class and so on. Suppose that ...
1
vote
2answers
77 views

How to solicit new product recommendations from existing clients?

My company is working on developing a new product that is similar (but larger in scope) than our existing, primary application. It will incorporate most of the functionality of our current application ...
0
votes
1answer
67 views

Using entityManager/repository Class/session factory directly in controller

I wonder what is your approach on following subject: let's say we have MVC structure with entities, repositories, controllers and service layer. My approach to use above was pretty clear for me: ...
1
vote
0answers
58 views

Need to refactor file downloader and post processing utility [duplicate]

Not sure whether this is the right forum to ask this but here goes. Using this solution - http://stackoverflow.com/questions/26571351/replacing-if-else-logic-with-state-strategy-pattern I was able to ...
1
vote
1answer
97 views

Inheritance, Composition and Protocols

I'm reading a book on general object oriented concepts to try and gain a solid understanding of everything. One thing that is throwing me off is the difference between Inheritance and Composition. I ...
7
votes
1answer
186 views

Null Object Pattern and Input validation - copy real implementation or silently accept everything?

I have a WifiComponent in my Camera in my client application. It's responsible for handling the Wifi-related functionality of the Camera. The Camera represents a real world camera. This WifiComponent ...
1
vote
1answer
154 views

Should we use data object (or the data transfer object) for sharing data between these three classes?

I found an article by Martin Fowler that has made me doubt my design choices, particularly about data objects. Martin Fowler has written an article about what he thinks is a code smell. In this ...