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

learn more… | top users | synonyms (1)

6
votes
2answers
296 views

How to do unit tests on a method that takes the elapsed time into account?

I'm currently in the middle of refactoring an important method in a legacy-system. There were almost zero test until I've started working on it, and I've added quite a lot to ensure the correct work ...
4
votes
3answers
1k views

A design pattern for data binding an object (with subclasses) to asp.net user control

I have an abstract class called Address and I am deriving three classes ; HomeAddress, Work Address, NextOfKin address. My idea is to bind this to a usercontrol and based on the type of Address it ...
13
votes
3answers
4k views

How to avoid “managers” in my code

I'm currently re-designing my Entity System, for C++, and I have a lot of Managers. In my design, I have these classes, in order to tie my library together. I've heard a lot of bad things when it ...
6
votes
4answers
451 views

Applying DRY to an inheritance hierarchy

I'm working on refactoring a legacy application where I implemented the State pattern successfully as shown in the following diagram: As you see there is a common behavior between the 3 states, so ...
2
votes
1answer
395 views

User Stories - How should it be defined for complex changes involving multiple applications

This is one of the definitions that I asw for user stories - When the time has come for creating user stories, one of the developers (or the product owner in Scrum) gets together with a customer ...
3
votes
1answer
130 views

Most secure method of asynchronous exchange of randomized loot in a strictly offline ARPG

I'm interested in the conceptual (programming language agnostic problem) process of sending a game object to another player of the game in exchange for another game object without a face-to-face ...
4
votes
3answers
2k views

var args constructors/methods vs lists

In the long debate of using arrays vs lists in the public API of Java classes, I tend to prefer lists in most situations. However, I also found convenient to use var arguments in many constructors and ...
1
vote
2answers
241 views

Would it be bad design to abstract a graphics library and wrap it in a single class? [duplicate]

I'm starting a game project in C++ using the SFML. It provides various classes for handling graphics, input, etc, but I would like to wrap it all up in a single Media class. I believe that by doing ...
1
vote
1answer
148 views

Possible Designs for code block editor

I have started a project where I need to design an application that will work as a code-block editor, much like lego mindstorms and this google project. http://code.google.com/p/blockly/ What are the ...
1
vote
3answers
243 views

About classes and their valid states

I get stuck each time I need to write a constructor for any class I design. The reason is that I am not sure what should go into a constructor and what should not. On googling for this, I got the ...
4
votes
2answers
609 views

In MVP, should presenters instantiate and control other presenters?

I've implemented an application using MVP with GWT, which is working out very nicely for views that have a single purpose. Now, it has evolved into views that are achieving multiple purposes in a ...
-2
votes
1answer
321 views

Should a programmer always be able to do everything a user could do? [closed]

Should a programmer be able to perform all operations programmatically on a object that a user could do? By way of example, I'm working with a list selection object. To populate the list ...
4
votes
4answers
562 views

Should we validate a state transition before attempting it in the State Pattern?

When applying the State Pattern illegal transitions should result in an exception being thrown (or at least that's what I understood from the pattern) I know exceptions are for "unexpected behavior" ...
2
votes
2answers
522 views

Web application (Spring, JSF) forks, how to reuse existing code for subprojects?

my question is going to be somewhat philosophical and "architectural oriented" so bear with me. Right now we have existing Java web application built on top of Spring and JSF(facelets) with maven. ...
6
votes
3answers
383 views

How should I go about “overhauling” a large legacy application? [duplicate]

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? For my next project, I've been tasked with "overhauling" a large legacy web application with many parts. It is a ...
7
votes
6answers
887 views

Design guidelines for this scenario in C#?

I have to create a validation system(I don't want to use Data Annotation or any other system) for my C# application using .Net Compact Framework, where I have an object which contains many other ...
2
votes
1answer
415 views

Shift Javascript framework - What pattern is this? MVP, MVC or something else

I have created a very tiny framework to be able to get away from all the clutter while developing. The point of the framework is not to replace any library of choice but simply segregate the code to ...
0
votes
4answers
227 views

Effective design analysis [closed]

Our team redesigns the legacy software and there are a lot of design meetings going on. Many of them are not very effective and lack good analysis of the proposed design. Is there any formal way to ...
-1
votes
3answers
1k views

Are there any existing standard software design guidelines?

My team of about 70 programmers is developing C and C++ code for embedded, multiprocessor, image-processing project. We have a coding standard, and hold design and code reviews. The problem is that we ...
3
votes
0answers
96 views

Bridge Design Pattern - I still don't get it [duplicate]

Possible Duplicate: Understanding the bridge design pattern I have read lots of material about the bridge design pattern: ...
2
votes
3answers
153 views

Abstracting out a module or using the Module Singleton directly?

I am working on a module which is dependent on other module for some functionality. Now the dependent module provides a lot of functionality and I need only few of them, hence got the idea to create ...
43
votes
6answers
3k views

How safe are hidden AJAX requests that fake performance?

What is a hidden AJAX request? I've noticed an increase in the usage of hidden AJAX requests designed to make a user's action appear to happen immediately. I'll refer to this type of AJAX request as ...
3
votes
2answers
292 views

Under which area of Artificial Intelligence is my knowledge store?

I've a maturing idea regarding a knowledge store. For the purposes of this question, the store would be used by a police force for the recording and querying of crimes. I believe that ...
4
votes
3answers
481 views

Why is it so difficult to know where to use interfaces,generics in program design?

I am attempting to learn c# from the head first series, in addition i also consult other books such as Pro C# by Andrew Tolson. Now the thing is that i perfectly understand the interface,generics ...
3
votes
6answers
1k views

Why is an interface in Java not allowed to have state? [closed]

There must be a good reason why Java designers didn't allow any state to be defined in interfaces . Can you please throw some light on this aspect of design decision ?
2
votes
3answers
367 views

RESTful Design: Multiple Relationships Between the Same 2 Entities

I am in the process of designing RESTful web services and got stuck at one point. The design is very simple with 3 entities: - Project - Status - Employee The part I am having trouble with is ...
3
votes
1answer
754 views

Can Objective C categories serve the same purpose as Traits do in Scala?

The statement of the question seems little abstract to me, so please read the details below. Since the time when C++ was the first choice Object Oriented Language for almost anything, we had a big ...
3
votes
2answers
326 views

Overcoming circular reference

I am working on an asp.net MVC web application which contains several projects. One is BusinessObjects, which contains business logic / processes. Another is EmailGeneration which is used to send ...
4
votes
2answers
306 views

Ensuring conceptual integrity in Python project with multiple programmers

One objection that I have often heard raised against Python that it is difficult to synchronize a team of many programmers on large Python project. Note: that synchronization is possible in such a ...
1
vote
1answer
489 views

How to structure our Javascript so that it is easily editable, testable, and can make calls to render a view without knowing specifics about the view

I am working on a web app that displays some data and uses javascript. Right now, we are serving up parts of our js (to display certain types of information, ie "Render a View") via our server which ...
11
votes
1answer
3k views

Are we using the repository pattern right?

We are using a bunch of separate classes suffixed with -repository to retrieve the data from the database; for each table its own repository. We have for instance a customerrepository class which has ...
3
votes
2answers
332 views

Can I apply SOLID concepts to entire solution designs rather than just the internal components?

So maybe the quick answer is 'Yes' absolutely (or no I suppose), but let me explain my question angle to get a better derived answer. We all commonly use SOLID design principals when making up the ...
4
votes
3answers
832 views

Is there a design pattern to solve this problem?

I've been struggling with a design so I figured I'd ask here and see if anyone's able to help :) High level overview I'm designing an app to gamify exercise by creating mini competitions (ex. Who ...
8
votes
3answers
2k views

How do you handle multiple users editing the same piece of data in a webapp?

There's a project I'm working on that is looking to produce a web application that will manage a task list between multiple users. This is a master task list whose task items get distributed by an ...
4
votes
3answers
369 views

How to refactor “nested” view classes to avoid deep method calls?

Lets say I'm displaying a bunch of data (model) using a View class for rendering. However, a lot of the data has sub-data (models) complicated enough to require separate rendering classes. In my ...
9
votes
8answers
12k views

OO Design related questions in technical interviews [closed]

I've been attending quite a few interviews recently and have been asked by companies to answer "design a [insert model]" questions more than a few times. Is this normal in the industry nowadays? ...
2
votes
2answers
1k views

Thoughts on a custom data structure for a node/chain implementation

I am designing a simple GUI that will allow a user to create a GPX route by clicking repeatedly on a map panel. I am faced with a design dilemma for how to represent the nodes and route. This ...
12
votes
4answers
707 views

What are the Advantages of a “Combined” Getter/Setter VS Individual Methods?

This is what I call a "combined" getter/setter method (from jQuery): var foo = $("<div>This is my HTML</div>"), myText; myText = foo.text(); // myHTML now equals "This is my HTML" ...
0
votes
3answers
160 views

What will be the better way to access information from another object

I have a page Object, which has Paragraph and Image object Collections And each paragraph has only image_id(s) that are assigned to a paragraph. All other information about image is stored in ...
3
votes
1answer
460 views

Can an entire software infrastructure stack be built entirely from source in-house? Is it practical and sustainable?

I'm a big fan of using open source software but I mostly use community binary releases for the job. I'm wondering about companies that go the extra degree and build everything they use in their ...
0
votes
2answers
298 views

php - auto populate the model member variable from database table

I am stuck with a very old large website which I need to do some modifications. I can't use or integrate a new MVC framework due to current site is outdated with some custom coding done long time ago. ...
4
votes
3answers
261 views

Establishing an API to provide end-user apps/scripts access to multiple types of databases

Question and Context I am currently working on a project where the main question is, how do we insert an API between the database and end-users who may develop applications/scripts of their own that ...
16
votes
3answers
1k views

Does the state Pattern violate Liskov Substitution Principle?

This image is taken from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET This is the class diagram for the State Pattern where a SalesOrder can have different states during ...
8
votes
2answers
2k views

What are the cons of using XML for GUI development? [closed]

I'm hoping this question fits within the scope of Programmers SE and that it's not too open ended. I've always hated GUI design. I don't mean to offend anyone, but I've hated CSS/HTML, I've hated ...
5
votes
3answers
581 views

How can I create and manage permissions more dynamically?

I want to implement a security system into my web-based Intranet application which allows security administrators to 'fine-tune' exactly what type of access a user/role has to an object. For example, ...
2
votes
4answers
119 views

Feature organization / authentication? [closed]

Let's say I have a product that has different features, or different feature access depending on things (i.e Premium User, Beta, Demo, Logged-in User, etc..). What's the best way to organize a system ...
1
vote
1answer
270 views

Why does Java MessageDigest.getInstance() have a String as a parameter?

I presume it's that way so it could be extended with custom algorithms, but wouldn't it be more convenient to apply, let's say, factory method pattern here and avoid the whole NoSuchAlgorithmException ...
9
votes
8answers
698 views

Past If statements Arrays, loops… Now what?

I gave up on programming a little over a year ago when I kept hitting this wall. I am revisiting the subject because I want to create basic Android application. But I feel that my limited knowledge ...
4
votes
1answer
687 views

DB schema for packaging products/services together under a single price/offer

I’m trying to “conceive” the business logic of this website that has many activities, that the users can build their “combo” and get discounts depending on their choices and how long they are willing ...
-1
votes
3answers
1k views

Is software design important to programmers? [closed]

I am studying software engineering, just finished the requirements course and going for more. I don't know how important software design is (in real world and actual projects) in later SDLC phases. ...