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

learn more… | top users | synonyms (1)

1
vote
2answers
288 views

What is a useful pattern to maintaining an object state in a one to many relationship?

I am looking for a design for my application, here are the players(classes) involved. struct Transform { // Uses a matrix to transform the position. // Also acts acts as the state of a ...
10
votes
5answers
289 views

Should I incorporate exit cost into choosing a solution

I'm currently choosing between two viable software designs/solutions. Solution 1 is easy to implement, but will lock some data in a proprietary format, and will be hard to change later. Solution 2 is ...
1
vote
1answer
1k views

How to structure a XML-based order form using ASP.NET

First question here; please help me if I'm doing something wrong. I'm a graphic designer who's trying to teach himself ASP.NET/C#. My server-side background is PHP/WordPress and some ASP Classic, and ...
3
votes
2answers
1k views

Alternative to “inheritance versus composition?” [duplicate]

Possible Duplicate: Where does this concept of “favor composition over inheritance” come from? I have colleagues at work who claim that "Inheritance is an anti-pattern" and want to use ...
3
votes
5answers
309 views

Using 'new' in a projection?

I wish to project a collection from one type (Something) to another type (SomethingElse). Yes, this is a very open-eneded question, but which of the two options below do you prefer? Creating a new ...
7
votes
5answers
1k views

Is having 'Util' classes a cause for concern? [closed]

I sometimes create 'Util' classes which primarily serve to hold methods and values that don't really seem to belong elsewhere. But every time I create one of these classes, I think "uh-oh, I'm gonna ...
2
votes
3answers
197 views

What is the best approach to solve a factory method problem which has to be an instance?

I have to add new funcionality in a web service legacy project and I'm thinking what is the best approach for a concrete situation. The web service is simple: It receives a XML file, unmarshalling, ...
2
votes
1answer
428 views

Why is it said that V-model introduces QA?

In several articles and books I learnt that "V-model introduced QA into SW development". I would like to understand the point of such statement, as from my understanding, V model activities ...
5
votes
2answers
2k views

Constant values in the interface

Some time ago I have read two different books and each of them gives totally different answer for the question if it is a good pattern to define constant values in the interface (in java). So I am ...
5
votes
1answer
408 views

Music Notation Editor - Refactoring view creation logic elsewhere

Let me preface by saying that knowing some elementary music theory and music notation may be helpful in grasping the problem at hand. I'm currently building a Music Notation and Tablature Editor (in ...
5
votes
1answer
315 views

DDD: service contains two repository

Does it correct way to have two repository inside one service and will it be an application or domain service? Suppose I have a Passenger object that should contains Passport (government id) object. ...
3
votes
2answers
619 views

Need advice on framework design: how to make extending easy

I'm creating a framework/library for a rather specific use-case (data type). It uses diverse spring components, including spring-data. The library has a set of entity classes properly set up and ...
15
votes
5answers
2k views

What is considered third party code?

Inspired by this question Using third-party libraries - always use a wrapper? I wanted to know what people actually consider as third-party libraries. Example from PHP: If I'm building an application ...
6
votes
1answer
884 views

Is wrapping a third party code the only solution to unit test its consumers?

I'm doing unit testing and in one of my classes I need to send a mail from one of the methods, so using constructor injection I inject an instance of Zend_Mail class which is in Zend framework. Now ...
2
votes
2answers
242 views

how to model this relationship ? in ERD

I have three entities : Technician Vehicle Repair The question is how to model this in ERD? Knowing that a technician can repair multiple cars, and the same car can be repaired by one and only one ...
-2
votes
2answers
163 views

Design for a plugin based application [closed]

I am working on application, details of which I cannot discuss here. We have core framework and the rest is designed as plug in. In the core framework we have a domain object. This domain object is ...
0
votes
2answers
273 views

Creating a Application in Winrt that requires Internet

I am making a paid App for Windows 8, c#. I am wondering which is better? If my application doesn't need internet connection normally but does requires internet connection for the first time to ...
19
votes
7answers
15k views

What is the difference between “data hiding” and “encapsulation”?

I'm reading "Java concurrency in practice" and there is said: "Fortunately, the same object-oriented techniques that help you write well-organized, maintainable classes - such as encapsulation and ...
5
votes
3answers
3k views

Manager/Container class vs static class methods

Suppose I have a Widget class that is part of a framework used independently by many applications. I create Widget instances in many situations and their lifetimes vary. In addition to Widget's ...
8
votes
4answers
6k views

How to make creating viewmodels at runtime less painful

I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below In the MVC world, things are straightforward. The Model has state, the View ...
6
votes
1answer
147 views

Is it possible to build a single game to run in Facebook & Google+?

I was asked by my customer to build a Facebook game. The game would be something similar to Mafiawars.com where the game is hosted on a server and run through a frame on Facebook. The thing is after ...
0
votes
2answers
185 views

How would I implement this application idea? [closed]

I am a D&D gamer and a developer that has mostly worked with ASP.NET applications professionally. I have written some chat bots in Node.js and I have only played a little with PHP but wrote ...
14
votes
6answers
1k views

How can I improve my skills while working on actual projects, in the absence of more experienced developers?

I'm the lead developer at a small company, working with C# and ASP.Net. Our team is small, 2-3 people, without much experience in development and design. I don't have the opportunity to learn from ...
4
votes
3answers
120 views

Designing exceptions for conversion failures

Suppose there are some methods to convert from "X" to "Y" and vice versa; the conversion may fail in some cases, and exceptions are used to signal conversion errors in those cases. Which would be the ...
1
vote
3answers
217 views

How can I get non-programmer colleagues on board with bespoke software rather than Dynamics CRM + Sharepoint?

I am working with a company which designs and builds one-off machines. They have been 'dabbling' with hosted Dynamics CRM and Sharepoint (on different servers!) in an attempt to centralise their data ...
5
votes
1answer
1k views

Why doesn't Java's BigInteger class have a constructor capable of taking a numeric literal? [closed]

Why doesn't Java's BigInteger class have a constructor capable of taking a numeric literal? Every single time I use BigIntegers, and many times I merely think about them, I wonder this. What reason ...
5
votes
3answers
5k views

How to handle monetary values in PHP and MySql?

I've inherited a huge pile of legacy code written in PHP on top of a MySQL database. The thing I noticed is that the application uses doubles for storage and manipulation of data. Now I came across ...
5
votes
5answers
3k views

Are nested classes under-rated?

I'm not trying to say I know something everyone else doesn't but I've been solving more and more designs with the use of nested classes, so I'm curious to get a feeling for the acceptablilty of using ...
2
votes
2answers
546 views

design a model for a system of dependent variables

I'm dealing with a modeling system (financial) that has dozens of variables. Some of the variables are independent, and function as inputs to the system; most of them are calculated from other ...
2
votes
1answer
262 views

Steps to manage a large project [closed]

Software development is an area where parallel development to its fullest form is very difficult to achieve, although you could get reasonably close with the right design. This is especially true for ...
6
votes
3answers
244 views

Approach for developing software that will need to be ported to multiple mobile platforms in the future

I am currently doing the preliminary design for a new product my company will be pushing out soon. We will start on Android, but then we will need to quickly develop the IPhone, IPad.... and then the ...
6
votes
2answers
210 views

Considerations when designing a file type

I'm about to start writing a process for saving some data structure from code in to a file of some proprietary, as-yet-undefined type. However, I've never designed a file type or structure before. ...
4
votes
1answer
314 views

Object oriented wrapper around a dll

So, I'm writing a C# managed wrapper around a native dll. The dll contains several hundred functions. In most cases, the first argument to each function is an opaque handle to a type internal to the ...
3
votes
3answers
176 views

Library Organization in .NET

I've written a .NET bitwise operations library as part of my projects (stuff ranging from get MSB set to some more complicated bitwise transformations) and I mean to release it as free software. I'm a ...
2
votes
2answers
175 views

Best approach for saving highlighted areas on geographical map

I am designing an application that allow users to highlight areas of a geographical map using a tool that is like brush or a pen. The tool basically draw a circle with a single click and continue ...
15
votes
8answers
2k views

Is perfectionism a newbie's friend or enemy? [duplicate]

Possible Duplicate: Where do you draw the line for your perfectionism? I see that the development community is very focused on doing things the right way and personally I would like to do ...
1
vote
1answer
145 views

How to implement string matching based on a pattern

I was asked to build a tool that can identify if a string match a pattern. Example: {1:20} stuff t(x) {a,b,c} would match: 1 stuff tx a 20 stuff t c It is a sort of regex but with a ...
2
votes
1answer
229 views

Is it correct to add booleans in order to count the number of true values in a vector?

Is it conceptually correct to sum a vector of booleans? From a mathematical point of view, I would argue it's not: True + True != 2. But it's quite practical to do so still! Example using the ...
3
votes
1answer
77 views

Event system architecture for networking when performance is concerned

How should I design a system for an action game (think in Golden Axe) where events can happen remotely? I'm using TCP for this because the client is in flash. There's so many options, I can make a ...
3
votes
5answers
451 views

Developing web sites that imitate desktop apps. How to fight that paradigm? [closed]

Supposse there's a company where web sites/apps are designed to resemble desktop apps. They struggle to add: Splash screens Drop-down menus Tab-pages Pages that don't grow downward with content, ...
3
votes
1answer
160 views

Minimize useless tweaking of a numeric app

I'm developing a numeric application (nonlinear optimizer), with a zillion knobs to tweak and rising. It's not my first foray into this domain, but this time there are even more variables in the code ...
3
votes
7answers
550 views

Should I try to write simple key-value storage by myself? [closed]

I need a key-value storage in a simplest form we can think of. Keys should be some fixed-length strings, values should be some texts. This key-value storage should have an HTTP-backed API. That's ...
18
votes
8answers
2k views

What can go wrong if the Liskov substitution principle is violated?

I was following this highly voted question on possible violation of Liskov Substitution principle. I know what the Liskov Substitution principle is, but what is still not clear in my mind is what ...
11
votes
1answer
714 views

How to verify the Liskov substitution principle in an inheritance hierarchy?

Inspired by this answer: Liskov Substitution Principle requires that Preconditions cannot be strengthened in a subtype. Postconditions cannot be weakened in a subtype. Invariants ...
0
votes
1answer
111 views

Map Library: Client-side or Server-side?

As I have already asked here, I have to implement a Multi-Platform Map application. Now I have Mapstraction as an option which uses Javascript to implement the desired functionality. My question is, ...
74
votes
7answers
6k views

Is this a violation of the Liskov Substitution Principle?

Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure ...
53
votes
10answers
3k views

My proposed design is usually worse than my colleague's - how do I get better? [closed]

I have been programming for couple of years and am generally good when it comes to fixing problems and creating small-to-medium scripts, however, I'm generally not good at designing large scale ...
12
votes
2answers
396 views

Looking for some OO design advice

I'm developing an app that will be used to open and close valves in an industrial environment, and was thinking of something simple like this:- public static void ValveController { public static ...
3
votes
6answers
432 views

How to visualize the design of a program in order to communicate it to others

I am (re-)designing some packages for R, and I am currently working out the necessary functions, objects, both internal and for the interface with the user. I have documented the individual functions ...
2
votes
2answers
246 views

Returning a mock object from a mock object

I'm trying to return an object when mocking a parser class. This is the test code using PHPUnit 3.7 //set up the result object that I want to be returned from the call to parse method ...