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

learn more… | top users | synonyms (1)

1
vote
2answers
88 views

Dependency injection vs dependency lookup in a layered architecture

Given a layered architecture, where the business logic is isolated in a package from all other layers, like persistent storage, user interface, interfaces for various (vendor) remote services, etc, I ...
1
vote
1answer
36 views

What's the best way to store class/type info in a plugin system in your software?

There are lots of applications like 3ds Max, Maya, etc that allows you to use plugins, where even the default nodes are created as plugins. This is all good but if the developer changes the ...
1
vote
1answer
48 views

Rich object model in the context of a good REST API and of an existing rich object model on the server-side

First off, let's frame this question in the context of a good REST API and an existing rich object model on the server-side, as well as modern web architecture (MVC frameworks like angularjs). I'm ...
-1
votes
1answer
52 views

Pathfinding in a 3d world with obstacles?

What are some methods for pathfinding in a 3d world? Object X needs to move from Point A to Point B but it might have to avoid things like asteroids, planets or gas pockets that makes the object ...
3
votes
1answer
64 views

Consistent snapshot

Suppose process A has a consitent snapshot of some entities. And it is constantly receiving updates for this enteties. Now client B connecting to A and it should receive the consistent snapshot of ...
-3
votes
1answer
71 views

Class refactoring [on hold]

I have many rows in databases that are in fact classes, eg: 1-2 3-4 .. 10+ Something Now there are 2 options. One is to create class per table row (Something.class etc.), or to create single class ...
0
votes
1answer
21 views

Synchronization of resource that has moved out of requests filter range

I have a RESTful API with corresponding clients. If a client request fetches a set of resources (Events) based on a filter, say events taking place between 2015-04-13 - 2015-04-19. If an event which ...
0
votes
1answer
141 views

Full screen command line app that user cannot close in any way [on hold]

All I'd like user to see is a "full screen" command line interface running my program. Users can enter certain input when prompted to, but they shouldn't be able under any circumstances to stop the ...
-2
votes
0answers
22 views

Arduino Bluetooth Programming [closed]

I'm part of a group where we need to make a boat that can do several tasks, and I have been put in charge of programming. I have an Arduino, and it has to control a water pump and a motor that will ...
3
votes
0answers
95 views

Fine grained search over a large dataset

I have roughly 4 million records per day and have to keep 7 years worth online, so we are looking at 10.2 billion records that I need to be able to search through. The users are expecting that the ...
2
votes
1answer
86 views

Ambiguity of seemingly clear method names in APIs

(The question is language-agnostic, but to illustrate the point, I wrote the examples in C#.) Say I'm trying to model the behavior of "components" that communicate via "ports". I might model this ...
0
votes
0answers
81 views

Java server side : Is this a good design/layered approach? [on hold]

We are in the process of designing an application using AngularJS, RESTful service (Jersey) and JPA for CRUD operations.The RESTful layer might call other external services to get data. There could be ...
1
vote
1answer
100 views

Does Go implicitly discourage getters and setters and encourage direct member access?

As the title says, is accessing public struct fields more idiomatic in Go than getters and setters? Wouldn't that lead to violation of data encapsulation, also public fields in other OO languages like ...
-1
votes
1answer
62 views

How to make variables inherent to an object or system

How can one make variables inherent to an object or system? For example, when creating a web browser, each option that is created for the user to have control over (i.e. how a window opens, if ...
2
votes
1answer
91 views

Is it OK to deprecate methods that need to be public due to the packaging model but are not to be used outside the codebase in Java?

I am currently working on a semi-large project that has several packages. There are 3 main packages, a "client" package, a "server" package and a "common" package. There are two jars, one for the ...
2
votes
3answers
253 views

Repetitive code over multiple classes. Best way to centralize code?

I'm working with 3D arrays that I flatten into a 1D arrays with the following index calculation: index = x + WIDTH * (y + DEPTH * z) I'm starting to notice that I'm using the calculation all over ...
-3
votes
0answers
28 views

Application to generate reports from boiler plate text [closed]

I write long complex reports for a living. Much of the content of these reports could be generated automatically from boiler plate text. I would like to develop a stand-alone application which would ...
1
vote
1answer
114 views

How to optimize the application with huge number of database requests per minute

I have to provide free demo of some service to end users in my application. Free demo could be of 30 mins, 1 hours, 5 hours etc. (predefined time) for a new user for one time only. User can also ...
2
votes
2answers
160 views

Archive Without Adding Dependencies [closed]

We're going back and forth on this problem and I'd like to have oppinions: We have a library calculating stuff and some module with GUI logic using it. We want to add some kind of archiving to the ...
2
votes
2answers
67 views

Creating an auto-patching system for Spring Hibernate Application

I have this question for few months now. We have a web application which has monthly changes and weekly bug fixes if any. Usually we just build the new war, undeploy the old ones and redeploy new ...
4
votes
1answer
201 views

Would SQLite be less useful without accepting inserts of non-numeric values into numeric columns?

In SQLite the following statement would be successful and the string would be inserted/updated into the SALARY column which is of type INTEGER: update employee set salary='TOO MUCH' where emp_id=1; ...
2
votes
2answers
175 views

Designing entities that should be mutable through the GUI but protected from programmer error

I have a set of entities, for now represented by very simple classes (further simplified for this example): public class Item { public string Name { get; private set; } public double ...
6
votes
2answers
227 views

Should HTTP Request/Response objects be immutable?

I think it's safe to say that most web applications are based on the request/response paradigm. PHP has never had a formal abstraction of these objects. One group is trying to change this: ...
4
votes
1answer
104 views

Parking Simulation Software Design

I've been requested to develop a quite well known problem for a job interview. The Parking Simulation which an example can be found here. I came up with some ideas for which design pattern should I ...
4
votes
1answer
132 views

Should I always throw the most specific or should I try to generalize exception types?

Say you normally have FooException. /** * @throw FooException If Foo is invalid for searching. */ public bool exists(Foo a) But at some point you need to have two more specific exceptions for ...
3
votes
2answers
104 views

What kind of base for Decorator: interface, abstract class, non-abstract

What should be at the top of inheritance tree of Decorator design pattern? I mean the base for both components and decorators non-abstract class: has data fields, implements methods abstract class: ...
1
vote
3answers
169 views

Avoid opt(options) in javascript [closed]

A lot of frameworks, most like jQuery plugins uses the "optional" parameter. Basically a dictionary (or key/value structure) with a bunch of additional parameters instead of send in the parameter's ...
2
votes
2answers
101 views

Too specific of namespacing/packaging

I'm about to start building a C# library for English and French morphology as a side project. The library will be later merged with other linguistic aspects (phonology, sentence parsing, etc). for ...
1
vote
1answer
92 views

How to evaluate the performance of a Data Access Layer b/w two ORM's?

I am currently working on a project where I am going to replace the Data Access Layer from a custom ORM to Entity Framework.(The product is almost complete and mostly any changes that will follow ...
1
vote
1answer
140 views

How to decide if object should request or receive data?

Deciding whether an object should request data (by calling a function) or receive data (by having a function called from another object) is probably dependent on the exact situation. So how do I ...
1
vote
1answer
143 views

Domain Driven Design - designing Aggregate Roots

Imagine you're designing an application for organizing Workshops. Workshop itself is quite complicated - it acts as a state machine with multiple possible states and transitions between them. We're ...
3
votes
2answers
65 views

Changing a design later down the track seems time consuming for its value

(For those who don't code, don't be intimidated by the code snippets in this question, they question is about approach to changing a design rather than the code design itself). Recently I put ...
3
votes
3answers
76 views

Approach to designing a workflow web app that contains some automation

I have been tasked with creating a web application which will provide end-users with a self help workflow, asking them questions and skipping to another part of the workflow depending upon the ...
0
votes
3answers
371 views

Who should write the Technical Design Document? The BA or the Developer? [closed]

I work as a Snr. BA in a large Manufacturing company and I've just implemented a new Requirements Management Process. We have a large range of internal developers who in the past have never been ...
1
vote
1answer
39 views

Clojure NameSpace Design

I am new to Clojure and trying to get a handle on organizing a project's namespaces. I am working on a solver for the knapsack problem. Currently, I have broken the modules into files, but everything ...
2
votes
1answer
322 views

How should I handle database failures in a web application? [duplicate]

I'm developing a simple RESTful API using Go's Goji framework (although this question is language-agnostic), in which parameters from the URL are queried against a PostgreSQL database. Here's how it ...
2
votes
1answer
191 views

When designing a data structure, should I implement very inefficient operations for convenience?

(I've added the .NET tags because the data structures are for .NET, and this question should be considered in the context of the conventions for that platform.) I'm writing a library of immutable and ...
2
votes
1answer
46 views

Converting a one-to-many xml design to a many-to-many

I have an xml file format that looks something like this: <topLevelTag> <category name="foo"> <item attrib="value">ItemName</item> <item ...
0
votes
0answers
53 views

Abstracting the data in a relational database. [duplicate]

While working with data, which is in a relational database I came up with this issue. At first, I was just writing helper functions to retrieve A SPECIFIC data I needed for the current problem but it ...
0
votes
1answer
56 views

Program design - how to improve it and how to avoid coupling (Python)?

In the Python program structure below there are two modules with functions. Problem description: Functions are used inside other functions all over the place. Strong coupling (dependency). For ...
1
vote
1answer
63 views

Is it okay to expose implementation components in a library?

I'm writing a library for general consumption (It's free software and open source). Is it okay to have a visible namespace (e.g. Library.Implementation) for implementation-only components that remain ...
1
vote
3answers
106 views

What is the best way to store and use an application level runtime parameter? [closed]

I have to design a java console application which accepts a runtime parameter as an argument to the main method. The application will be eventually used by multiple scripts. I would prefer to avoid ...
2
votes
2answers
88 views

Function naming design in a C Library

I'm writing a C (c99) library that operates on strings. I'm having a design problem writing functions that will perform in different modes. For example; the Find function can search for: the ...
0
votes
1answer
32 views

Include system timer in use case diagram

Here in my use case diagram, an sms will be sent to a referenced person by the applicant automatically by the system when an applicant fills up and submits a form. Here as the SMS sending is ...
1
vote
2answers
84 views

Class design for JSON serialization

I've been stuck for some time on a circular reference issue with JSON serialization. I have a card game that I'm pickling to a redis store. As I retrieve the Game state from redis I'm trying to ...
1
vote
3answers
54 views

Representing a “Belongs to” relationship in an API endpoint

Consider the following pseudo code models: class Post int Id string Title int CategoryId Category Category class Category int Id string Name Note that Post belongs to ...
-1
votes
1answer
84 views

Are there any problems with implementing deleted usernames this way? [closed]

I have a requirement to implement usernames for an application for login purposes. The requirement specifies that the registry associated with the user/username in the database must not be deleted. ...
2
votes
2answers
70 views

Optional Member Data

I am creating a strong binding of an XML specification and I am essentially trying to "flatten" the specification as much as possible, so that it won't feel like you are manipulating an XML tree. ...
3
votes
4answers
199 views

Filling the gap between Conception and Unit Test

I am stuck trying to do TDD. I'd rather seek the counsel of others who have gone before rather than waste time with trial and error. QUESTION: What diagrams / exercises / development processes can ...
6
votes
4answers
181 views

Best way to analyse a large class before refactoring it into smaller classes?

Foreword I'm not looking for a way to refactor a large spaghetti code class, that topic has been covered in other questions. Question I'm looking for techniques to begin to understand a class file ...