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

learn more… | top users | synonyms (1)

1
vote
2answers
89 views

Method arguments: more specific or more general?

Say hi to the method: public void hello(Data data); This method uses same data and performs... whatever. Now, written like this, the method is very specific - i.e. the argument is very specific. ...
0
votes
3answers
104 views

Should class names reflect namespace name?

Is it generally considered good practise for a class name to reflect the namespace name it exists under, or should the namespace name implicitly be considered part of the class name? For example, ...
2
votes
2answers
57 views

Handling exception types according to the current “layer” of appplication

Imagine this simple application use case, say, for fetching data from outisde of the app. These steps represent the "depth" of the layers, from top to bottom. UI touch event ViewModel handles said ...
0
votes
0answers
39 views

REST MVC Confusion For An Enterprise Appplication Architecture

I already have experience working with MVC based web apps and started reading recently about REST. But went into confusion when re-thinking about how existing web app not using any kind of framework/...
1
vote
1answer
110 views

System for scheduling parallel tasks/callbacks

I am looking for a system for building state machines with timed/scheduled transitions, and with events that happen periodically during a given state. I can implement it myself, though I feel like ...
0
votes
1answer
158 views

What kind of data structure should be used to store components in an electrical schematic program?

Is there a specific data structure, object oriented programming methodology, and/or approach for achieving what programs like LT Spice, Altium Designer, and Cadence Virtuoso use to manage components/...
0
votes
1answer
70 views

Constructor Chaining vs Similar ones

I have the following constructors: public Class1() { this.Variable = new Variable(); } public Class1(Variable vari) { this.Variable = vari; } Which can be rewritten as: public Class1() ...
2
votes
1answer
71 views

Unique Identifiers for classes - Java with Spring

My use case requires me to implement multiple validators which implement the interface: public interface Validator { boolean validate(Object o); } Based on the business group of the Object o, a ...
1
vote
1answer
113 views

What would the best way to design a giant API wrapper class with multiple 'sections'?

Here's the problem I'm trying to solve: There's a rather large API I'm trying to write a wrapper class around. The simplest approach would be to make one class with a method representing each ...
0
votes
1answer
256 views

C# Design Patterns

I have a question about what the best design pattern to use would be. I have 2 specific scenarios, the first one fits neatly into a Unit of Work(UoW) pattern. The second is a little bit more fiddly. ...
0
votes
0answers
36 views

Use MVC Identity from other Application

I want to create a logon system, using WebAPI2. I also have a MVC4 application which I want to upgrade to MVC5 without changing too much straight away. I was wondering if it was possible to point the ...
0
votes
1answer
84 views

Can you use a state machine diagram in the development view (4+1 Architecture)

I have seen several different diagrams in several different views. Is is possible to use the state machine diagram in the development view in 4+1 Architecture?
0
votes
2answers
44 views

Trouble handling constraints for the input of a method

I'm looking for advice on how to handle constraints on the input of a method. I have a method that only works if the input argument(s) fulfill certain constraints. If the method is called on input ...
1
vote
2answers
124 views

Concurrent inserts to MySQL or write to separate tables and consolidate it?

I'm working on Apache Storm (but anyone who knows MySQL well could help too). Topology is like this: Single spout ----emit---> Multiple instances of a Bolt Each instance of the Bolt inserts a ...
1
vote
3answers
924 views

How should I handle multi-tasking in a WPF application?

In most of the multi-tasking CRM applications I've seen, MdiWindow is used to allow users to open multiple windows at the same time. But MdiWindow doesn't seem to be commonly used in WPF. Looking ...
1
vote
0answers
31 views

Selenium Test Design Struture - Test Granularity for a Large Project [migrated]

Summary I have large Selenium Test project, and I'm struggling with how to manage my test structure in a way that I feel is easily maintainable, scalable, and that provides a good level of test ...
2
votes
3answers
105 views

Base Class vs Common Member Class

Imagine I have two classes like this... public class SingleplayerGameSetup { public int Seed { get; private set; } public int AiNations { get; private set; } } public class ...
2
votes
1answer
121 views

Do extracting piece of logic to function improve or reduce code readability?

If there is some code that needs to be implemented across multiple controllers (lets say, 10), e.g.: // Inside a controller function var myField = null; var response = service.callBackend(function(){...
1
vote
1answer
49 views

Review page use of AJAX

I am currently working on a site that heavily uses AJAX. I have a page that when called renders the basic HTML and then uses AJAX to get the data that the pages needs and then renders the rest of the ...
0
votes
1answer
97 views

Is pure RESTful required for Angular JS / Backend running on same web server?

I am developing an application with Sprintboot + REST + Angular. While I am working on the REST API, I am trying to design as RESTful as possible. I'm encountering certain pages where the Angular UI ...
1
vote
2answers
167 views

Designing validation classes

This is a follow-up of this question. I decided to implement what the accepted answer suggests, however, I realized I also needed individual public methods for each member the entity to be validated ...
3
votes
2answers
292 views

Is accessing lower tier members of an aggregate to perform an operation bad practice?

I am currently building a small project that is supposed to keep track of recipes. Each recipe has a bunch of information, including a rating for said recipe. Since the rating has some additional ...
1
vote
2answers
53 views

Refactoring to an inheritance hierarchy early on

I am building a management tool for recipes. Recipes have a bunch of data, including very generic stuff like an ID, tags, ratings and trivia. I currently only manage recipes, but i want to add support ...
-1
votes
0answers
36 views

Developing a phrase bank to help people construct their CVs

I am currently developing the backend for a resume phrase bank which will help people construct their CVs by selecting a phrase from a large data set. I have decided to present the data in the form ...
-2
votes
1answer
77 views

Git Repository design questions

I have following hierarchy of topics I am working on DataStructure Linked List Array Stacks Tree Enterprise Apps EJB JMS Android App Games Productivity Apps My question is how can I best ...
0
votes
3answers
326 views

Simple React application design

I have a very simple app that lets you log in and then displays a dashboard. The design process with React and Redux is very simple : I have two React components : Login and Dashboard I store a ...
1
vote
1answer
68 views

How can I filter my coordinates system?

Following up with this, I have a bunch of coordinates and I draw them on a bitmap image as a coordinate system. Now, I would like to get rid of all the noise, and filter coordinates to give a "clearer"...
7
votes
4answers
636 views

Model relationships with DDD (or with sense)?

Here is a simplified requirement: User creates a Question with multiple Answers. Question must have at least one Answer. Clarification: think Question and Answer as in a test: there is one ...
-2
votes
1answer
34 views

Need a solution for data filter problem

Problem statement: I have a input with multiple key value pairs and a list tasks stored in database with filter object. As an output I need a list of tasks matching the input values based on task's ...
2
votes
3answers
112 views

Implementing an event scheduler for animations

The basic idea is to have some animated widgets that sit in a container, quite similar to Qt (the only actual difference is that my widgets are animated). The animation is in some cases dependent on ...
2
votes
2answers
184 views

Class with methods that depend on a variable argument, but this variable is constant throughout large parts of the application

I am looking for advice on how to design the following scenario: I have a 3-dimensional vector class, the entries are of type double. I want two vectors to be considered equal if their corresponding ...
16
votes
4answers
3k views

How should I store readonly data to deploy with my application?

I'm developing a desktop application, and this application requires some information to run, but it doesn't change any of this information (the data must be loaded on every execution of the app, but ...
-3
votes
0answers
78 views

What choices do I have in implementing an in house API? [closed]

I have been asked to help implement an in house API and desktop app for a partner company. They would like an on site Server (cloud is out of the question for them for now) and to use existing ...
0
votes
2answers
101 views

Named repositories in DDD

Today we are working with Stored Procedures to access the database. In order to allow unit testing, we implemented an interface for each group of related stored procedures, for example: ...
0
votes
0answers
30 views

Versioning content in a No-SQL datastore

I am working on design a document management system and it has the following components : A Module has a content. A Document contains a list of Modules. A Document Collection contains a list of ...
1
vote
4answers
79 views

Handling missing values in response

Suppose a web application relies heavily on the third party APIs and I am expecting a response from it but somehow I don't get any, maybe because of the API exception or missing value on the API side ...
4
votes
2answers
118 views

Detecting breaking changes when modifying shared code

Currently we have about 20 solutions. The majority of these have multiple projects, including share utils projects, data access, etc. We've had a few problems where a contractor changed something in ...
0
votes
1answer
42 views

One Webjob or several

I am writing a web Job that will process messages from Azure Topic Subscriptions. Each message received by the Topic may need additional processing and the Topic Subscription Filters will contain ...
1
vote
1answer
154 views

Elevator design challenge [closed]

I need to strengthen my OOP skills and hence I thought to implement an Elevator simulator. At first what seem to be a simple design has grown into a complete mess and has left me confused about my ...
0
votes
3answers
148 views

Cyclic dependency in this project design

I have 2 modules (containing multiple classes). Let's call them Module A and Module B. Module B has a dependency on Module A: Module B -> Module A. Now, I have created an utility class C, which A ...
0
votes
2answers
163 views

How should I architect my back end based on these needs?

I haven't started building my back end yet but I need to now. My needs are the following: Database needs to be holding millions of game information (just info that can be stored in a typical db ...
0
votes
1answer
45 views

Which strategy to use in Client-Server messaging to trigger specific behavior in them?

I'm developing a virtual assistant to manage transactions in a business. I'm using an external service to handle Natural Language and get intents, actions and parameters from my user requests. The ...
0
votes
2answers
252 views

DDD Request Validation Handling

I stuck somewhere that I can't find a solution! There are plenty of validation questions here, but as far as I see, most of them were asking about entity validation. But what about request validation? ...
1
vote
3answers
191 views

Should I create .Clone() on a class or create a copy-constructor?

I'm quite unsure what I should use in C# - both should in theory do the same, but I think both are quite easely overseen. Or is there another possibility I have to take in consideration? I know in C++...
0
votes
1answer
74 views

How to check foreign key dependency in ddd aggregate root

When I want to call a constructor on aggregate root class Task, I am interested how can I check if a passed taskType exists in TaskType repository (enforced later in DB on ORM level). I want to ...
6
votes
3answers
571 views

How to properly deal with starvation

I'm trying to find a way to avoid starvation in my program, a producer/consumer (two threads, one for each role) problem with four priority levels (four deques). Basically, the consumer thread always ...
1
vote
2answers
103 views

Single Class to Serve as View Model as well as Container for Submitted Form

I see the following design in the code which is part of the default web application project in visual studio: A single data model class in constructed and decorated with various data validation ...
1
vote
1answer
40 views

Redesigning schedule value hierarchy

I have a couple of schedule value classes that represent the value a schedule holds for a specific slot. First, there's the ScheduleValue class for schedules with two dimensions, where the first one (...
13
votes
6answers
526 views

Idiomatic usage of exceptions in C++

The isocpp.org exception FAQ states Do not use throw to indicate a coding error in usage of a function. Use assert or other mechanism to either send the process into a debugger or to crash the ...
0
votes
0answers
57 views

Using java interfaces to narrow the classes public interface

There is a lot of content on the web discussing if it is worth defining an interface if only one class implements it. The answers are mostly either "Yes, because you probably need to mock it anyways" ...