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

learn more… | top users | synonyms (1)

4
votes
4answers
307 views

How to select drawing system when requirements not yet known?

We're developping an application for 2D data processing and display. At the moment data is displayed by converting each point to a color depending on intensity, so in rather low level code. This works ...
-3
votes
1answer
397 views

Different kinds of safety [closed]

Programming languages and programs (as wells as individual functions, objects, etc.) are often described as being "safe" in one way or another. For example, they could be "type safe", "memory safe", ...
5
votes
13answers
1k views

Limitations of Polymorphism in statically typed languages

I program mostly in statically typed languages, like C++ and Java. A common strategy employed in languages like these to handle dealing with collections of objects which are related, but which need ...
2
votes
1answer
971 views

Extend functionallity of a class: inheritance or java's dynamic proxy

Currently I have three classes and respective interfaces and respective builders: Tree: the data structure (implemented in SimpleTree) ProbabilityTree: is a Tree with added functionality to randomly ...
24
votes
9answers
3k views

How do you organize highly customized software?

I'm working on a large software project which is highly customized for various customers arround the world. This means that we have maybe 80% code which is common between the various customers, but ...
17
votes
5answers
1k views

Is it OK for a function to modify a parameter

We have a data layer that wraps Linq To SQL. In this datalayer we have this method (simplified) int InsertReport(Report report) { db.Reports.InsertOnSubmit(report); db.SubmitChanges(); ...
3
votes
3answers
392 views

When you won't need a language anymore, should you still use it? [closed]

My first main language was Java. However, over the years I've dropped Java in favor for Python, JavaScript, bash, etc. I still have advanced reading knowledge of Java, but since I haven't coded in ...
3
votes
2answers
6k views

URL parameters in RESTful web services

I'm wondering about the appropriateness of URL parameters in RESTful resource creation. First, here's some context. I'm working on an API that will remotely update the software on embedded devices ...
4
votes
1answer
182 views

How to implement a simulation pattern for a repository?

Let's say I have a repository of functions. These functions work with business objects within a database, CMS or other third party API. For example, my repository interacts with virtual files and ...
2
votes
4answers
300 views

Class design for internationalized object

I'm looking for some pointers on class design for a global application. Let's say I have to make a class structure to manage products, and the products are sold in different countries. Some of the ...
8
votes
6answers
1k views

What are the practical ways to implement the SRP?

Simply what are the practical techniques people use to check if a class violates the single responsibility principle? I know that a class should have only one reason to change, but that sentence is ...
27
votes
5answers
3k views

Pass ID or Object?

When providing a business logic method to get a domain entity, should the parameter accept an object or an ID? For example, should we do this: public Foo GetItem(int id) {} or this: public Foo ...
3
votes
3answers
797 views

Extreme Programming - documenting implementation?

In extreme programming methodology, what artifacts/ can be used to document the implementation? I have used an activity diagram to document the design steps for each activity. I have read that for ...
0
votes
3answers
287 views

Which programming designs leads to more problems?

As a fresh programmer, one of the first thing for me to learn was to learn language and its syntax. Now my next training issue is to design my code heirarchy in such a way it is simple to maintain ...
2
votes
1answer
180 views

How should common interfaces be shared across source control repositories?

I have code that represents the interface for a library that is used by a variety of internal clients. How should that interface code be exposed to these internal clients that live in different source ...
2
votes
2answers
177 views

design for supporting entities with images

I have multiple entities like Hotels, Destination Cities etc which can contain images. The way I have my system setup right now is, I think of all the images belonging to this universal set (a table ...
1
vote
3answers
117 views

Efficient Summary calculation method or approach?

I have an object hierarchy with a number of leaf nodes that will contribute to summary values for the parent object (specifically: project cost and square footage). What's the most efficient way to ...
8
votes
3answers
2k views

Using business objects in view models

When using reusable business objects, what is considered best practice when building view models? We use an object we call Builder to build our view models. One builder for each logical unit of views ...
3
votes
3answers
1k views

Patterns for Handling Changing Property Sets in C++

I have a bunch "Property Sets" (which are simple structs containing POD members). I'd like to modify these property sets (eg: add a new member) at run time so that the definition of the property sets ...
12
votes
2answers
11k views

best practices for NoSQL database design

I have just started using a NoSQL document based database (MongoDB) and i'm curious about the best practices for designing databases. I presume the architecture should be different from relational ...
10
votes
6answers
16k views

Pros and Cons of holding all the business logic in stored procedures in web application [duplicate]

In some organization I worked for web applications are developed basing all the business logic in Database stored procedures. For example, use html for view and servlet as controllers to divert the ...
6
votes
6answers
2k views

Can the Strategy pattern be implemented without significant branching?

The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every ...
1
vote
1answer
166 views

What is “toolkit design”?

What does "toolkit design" mean and what are the basic steps to design a toolkit for a specific task/project? It appears in a task description which says: "This task deals with the design of ...
0
votes
2answers
880 views

How to handle frequent ajax requests in shopping cart

Is it common and/or acceptable to have Ajax requests every time a button is clicked on a shopping cart page? This is not a high traffic site. It will only have a few users at a time, like 5 max. I'm ...
4
votes
2answers
2k views

Equivalent of Domain Driven Design for functional programming languages

I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
4
votes
3answers
700 views

Clojure state and persistence

I'm learning Clojure to see if it's something I can leverage at my current job, and more importantly, how I can convince my bosses that Clojure has a 'killer feature' over java that makes it worth the ...
30
votes
15answers
2k views

What can programmers learn from the construction industry? [closed]

When talking with colleagues about software design and development principles, I've noticed one of the most common sources for analogies is the construction industry. We build software and we ...
0
votes
2answers
2k views

GUI advice for a responsive touchscreen

I am tasked with building a piece of software that interfaces with a MySQL database, in order to allow the user to pick songs to play and que using a touch screen, and then they are shown ...
3
votes
2answers
96 views

Handling fast growing multi-function services

My team has been developing a web business application for more than a year. It started quite small, but now it is growing bigger and bigger. I think it's time for refactoring. Looking at the code, I ...
0
votes
2answers
1k views

Is it reasonable to use POCO's that inherit from DTO's?

I'm designing a tiered .NET application, and I want to use the Code First approach. I'm new to this, so I'm struggling to envision how it ought to be designed. Would the following be a reasonable ...
-1
votes
1answer
137 views

Are there any valid ways of eliminating/reducing state?

For definitions and examples of "state", see: http://en.wikipedia.org/wiki/Program_state , http://en.wikipedia.org/wiki/Finite_state_machine , http://en.wikipedia.org/wiki/State_diagram A diagram ...
1
vote
3answers
329 views

Materials on structural languages design? [closed]

There is plenty of material about designing software for object oriented programming. Do you know of any good materials for pure structural programming? I am working purely in C and while I can use ...
3
votes
2answers
868 views

God Files versus Ravioli Code

Recently I asked a question about whether or not I should refactor my code. the responses I received were most definitely in the camp of going through with the refactoring due to the presence of a God ...
4
votes
2answers
689 views

Multi-threaded application design

I'm currently planning a Windows service. It will be a multi-threaded application which will continuously check for database records and process them. My first thoughts were to set a number of max ...
7
votes
3answers
922 views

When designing a job queue, what should determine the scope of a job?

We've got a job queue system that'll cheerfully process any kind of job given to it. We intend to use it to process jobs that each contain 2 tasks: Job (Pass information from one server to another) ...
3
votes
1answer
331 views

Alternative to XML / XSLT for artifact generation?

The scenario: A system needs to produce a variety of artifacts to present to end-users during the normal course of business. Examples of these artifacts would be permits, invoices, or receipts -- ...
3
votes
1answer
631 views

Composition vs. Inheritance [duplicate]

Here's what is given: public interface Request {} // there are 20 subclasses of Request public class CreateUserRequest implements Request { @NotEmpty public String userName; } // request ...
2
votes
2answers
1k views

Design Pattern for Skipping Steps in a Wizard

I'm designing a flexible Wizard system that presents a number of screens to complete a task. Some screens may need to be skipped based on answers to prompts on one or more previous screens. The ...
2
votes
3answers
327 views

Writing selenium tests, should I just get it done or get it right?

I'm attempting to drive my user interface (heavy on javascript) through selenium. I've already tested the rest of my ajax interaction with selenium successfully. However, this one particular method ...
0
votes
8answers
4k views

I need an approach to the problem of preventing inserting duplicate records into the database

A webservice that I call returns a list of data. The data from the webservice is updated periodically, so a call to the webservice done in one hour could return the same data as a call done in an ...
1
vote
2answers
2k views

Designing complex query builders in java/jpa/hibernate

I need to build complex sql queries programatically, based on large filter conditions. For example, below are few sample/hypothitical filter conditions, based on which i need to fetch users Country: ...
3
votes
1answer
116 views

How should I write new code when the old codebase and the environment uses lots of globals in PHP

I'm working in the Wordpress environment which itself heavily relies on globals and the codebase I'm maintaining introduces some more. I want this to change and so I'm trying to think how should I ...
-2
votes
3answers
176 views

Sorting months with pre-defined order?

I want to sort the months of the year starting at any month, but January needs to show up after December if January isn't the starting point. Can I do that in an array or do I need a special data ...
0
votes
1answer
367 views

Building a template engine - starting point

We're building a Django-based project with a template/generator component. This component will be separate from the project as such and can be Django/Python, Node, Java or whatever works. The idea is ...
3
votes
1answer
941 views

How to refactor a method which breaks “The law of Demeter” principle?

I often find myself breaking this principle (not intentially, just through bad design). However recently I've seen a bit of code that I'm not sure of the best approach. I have a number of classes. ...
1
vote
1answer
192 views

Best practice for writing a service

We currently have a C++ socket server used by a java client. All of the socket code in both C++ and java is stick-built at a low-level with messages passed via JSON strings. Are there cots packages ...
1
vote
1answer
231 views

Should programmers prefer making wide libraries or thin libraries?

For classes and functions, it is clear cut: each should do only one thing. For libraries though, this is less clear. If you have a library with collections, it might have multiple collections. It ...
1
vote
4answers
455 views

Where should I insert data into the database?

I am making a pretty standard PHP sign up form that will validate the data the user entered and then redirect to a page with a success message. I would like to store this data in a database. Should I ...
6
votes
1answer
193 views

What is the best way to approach visualization projects?

I work on several areas related to information visualization, linked data, computer vision and other stuff, so mainly front-end. I am not really happy with the fact that visualizations take lots of ...
27
votes
8answers
4k views

Can manager classes be a sign of bad architecture?

Lately I've begun to think that having lots of manager classes in your design is a bad thing. The idea hasn't matured enough for me to make a compelling argument, but here's a few general points: I ...