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

learn more… | top users | synonyms (1)

2
votes
2answers
32 views

Model relationships with DDD (or with sense)?

Here is a simplified requirement: User can create a Question with multiple Answers. Question must have at least one Answer. I am trying to model this simple example so to 1) match the real life ...
2
votes
3answers
122 views

Refactoring web pages with user controls

Is it good design to use many user controls to help refactor a web application? In my case, it's a VB.NET Webforms ASP.NET website. All our pages are organized into sections that, while related and ...
1
vote
3answers
250 views

Application qos involving priority and bandwidth

Our manager wants us to do applicaiton qos which is quite different from the well-known system qos. We have many services of three types, they have priorites, the manager wants to suspend low priority ...
-1
votes
1answer
32 views

Inheritance vs Association in this example

I'm designing a very simple fixed asset management system in Java. The system consists of the following entities as displayed in the following ER diagram. My problem is the design approach to be ...
49
votes
9answers
4k views

“Everything is a Map”, am I doing this right?

I watched Stuart Sierra's talk "Thinking In Data" and took one of the ideas from it as a design principle in this game I'm making. The difference is he's working in Clojure and I'm working in ...
5
votes
2answers
433 views

Design of high performance file processing web application

I'm trying to design a web app with ability to scale but can't wrap my heads around few concepts. I want to design it right but im not a experienced programmer, i have more of a system engineering ...
1
vote
0answers
59 views

Handle an error system in RESTful API [on hold]

Given a RESTful API, that receive parameters, send them to the business tier, and return the result the user. Suppose an error occurred in the request (parameters error or logic error etc.). The ...
1
vote
2answers
97 views

Which design pattern for a single class accessing an object representing a data structure?

Which design pattern should I use when I have a class representing a data structure (aka C-style struct) and I wish to have only a single class to be able to access it. I was thinking of simply ...
0
votes
1answer
114 views

Ensuring non conflicting components in a modular system

So lets say we are creating a simple "modular system" framework. The bare bones might be the user management. But we want things like the Page Manager, the Blog, the Image Gallery to all be ...
2
votes
2answers
98 views

Designing an API with access tokens, how to handle GET requests?

I am building an API that will utilize access tokens so that I can track usage among various departments and for access control. My plan is to utilize the HTTP verbs appropriately - GET will retrieve ...
3
votes
3answers
201 views

Best approach for tracking dependent state

Let's pretend I work on a project tracking application. The application is a database backed, server hosted, web application. In this application there are Projects which have many Activities which ...
2
votes
1answer
130 views

Implementation Coupling

This question is regarding Interface Segregation Principle Best-Practices. I use abstract examples below, but the question arises from actual code I've seen that performs what I can only call ...
2
votes
1answer
43 views

Design Question - System Integration

Guidance on good application architecture / design is not in short supply however most of the examples focus on some business object, like Customer and its behaviour and persistence. There is little ...
25
votes
7answers
6k views

When writing object-oriented code, should I always be following a design pattern?

Is there a conceivable design pattern for any object-oriented program? I ask this because recently I saw an implementation of a Door class with a Lock. It was part of a test and the answer said that ...
1
vote
1answer
63 views

Tell, Don't Ask and Immutability in a non-directional network

I'm working on a small project in which I'm attempting to practice relatively strict adherence to two ideas: Tell, don't ask (TDA) Immutability The main concept in this project is a Map (as in a ...
0
votes
2answers
182 views

MVC pattern synchronisation

I am facing a problem in synchronizing my model and view threads I have a view which is table. In it, user can select a few rows. I update the view as soon as the user clicks on any row since I don't ...
1
vote
1answer
167 views

Designing the bridge between REST layer to service layer

I am working on a project and would like to expose some rest services. The technologies used are RestEasy, EJB and JPA/Hibernate. I have structured my app so that there is a clear delimitation ...
0
votes
0answers
61 views

Separating UI from logic

I'm trying to develop a little game and for this I'd like to separate the UI from the game logic. So I'm thinking of using an "Animator" class that will be responsible for rendering the objects, but ...
-4
votes
0answers
18 views

How to architect a python application to be scalable based on plugins [on hold]

I need to create a helpdesk application and i choose python that is my favorite language. I need that my app be scalable (support add new functionalities based on plugins). So, what is a good design ...
1
vote
3answers
197 views

Designs for outputting to a spreadsheet

I'm working on a project where we are tasked to gather and output various data to a spreadsheet. We are having tons of problems with the file that holds the code to write the spreadsheet. The cell ...
-3
votes
2answers
42 views

How to perform deferred tasks in backend [on hold]

Actually the problem is very common. Let me describe this by example. Imagine you have a web service where users register and pay for some gold status. There is expiration date. The question is how to ...
0
votes
2answers
88 views

Software desing suggestion - In case we need to set a property of a class within a scope and dispose it when the parent scopes completes [on hold]

This is a software design related question. Lets say we have the following class: Public MyClassA { private int x; Private Student _student; Public Student { get ...
4
votes
1answer
218 views

What is RESTful way of action confirmation?

Some of my API actions require SMS confirmation due to security reasons, like creation of payment and CRUD for scheduled payments. Right now I just return an entity with AwaitingSMSConfirmation state ...
-3
votes
0answers
36 views

Building up an interactive website - which technology should i use? [on hold]

So here are the requirements for now: Data feed client side My Data feed is from existing web pages - for that i created a chrome ext using JQuery to pull the information from the DOM and send it to ...
23
votes
4answers
1k views

How to explain why design choices are good?

As I've become a better developer, I find that much of my design skill comes more from intuition than mechanical analysis. This is great. It lets me read code and get a feel for it quicker. It lets me ...
1
vote
1answer
198 views

Designing classes the right way [closed]

I am trying to design my classes in the optimal way for the following scenario. A city has metro lines covering a number of stations.There are 4 lines represented by 4 colors.The user has to enter ...
0
votes
3answers
208 views

Business Logic vs Presentation/View Logic

I often question myself of where to put the logic that organize the data to a view that is not necessarily a business logic in a 3-layered architecture (DAO, Business, View). I'll put an example to ...
-2
votes
0answers
55 views

What are some ways to make bugs incredibly obvious and easy to spot? [closed]

Besides using asserts and unit testing. What are some ways to make bugs incredibly easy to spot and find?
1
vote
2answers
351 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
0
votes
1answer
85 views

Hexagonal architecure - handle multiple returns from domain logic

I'm looking at using hexagonal/ports & adapters design in some code I'm working on and for the most part I'm happy but there is one part that I'm struggling with which how to handle the need for ...
-4
votes
0answers
51 views

Efficient Code Design For Pattern Search - Part 2 [closed]

As stated previously, I wish to build code for detecting patterns in streaming data. I wish to have clean code that is easily extensible, and easily maintainable. I have refactored my previous code ...
-3
votes
1answer
138 views

Efficient Code Design for Pattern Search

I wish to build code for detecting patterns in streaming data. I wish to have clean code that is easily extensible, and easily maintainable. My current code design is below but, to my knowledge, I ...
2
votes
2answers
139 views

Design - Parser.hasInfo(MyClass) vs MyClass.hasInfo()

I'm working on a document processing system. I feel confident with a Document class which represents each document being processed. The issue: Each Document can have a CoverSheet, and if it does, ...
0
votes
0answers
37 views

WCF Client Data model best practices

Hi I am building a WCF Client Application (not web) for a service I have virtually no control of (different BU) and would like to separate the service consumption from the application business logic ...
-3
votes
0answers
141 views

Knowledge of Multiple Languages--A Hindrance or an Asset in Software Design? [closed]

Based on your experience, how would knowing multiple programming languages affect a software developer's (or your) ability to design programs? Would it aid in or be detrimental to one's ability as a ...
2
votes
4answers
476 views

When should something be a class? And are my chosen classes good OO design?

My background: I am new to programming. Python is my only programming knowledge. I program as a hobby, and I'm teaching myself by reading copious amounts of books. I understand enough about OOP to ...
2
votes
2answers
127 views

How do you solve issue of consistency in concurrent and distributed application (built around Bankers Dilemma)?

This is a classic problem which I'm sure has been solved many times by many different people. I don't have any formal training (I've not studied computer science or any other such academic subject) ...
1
vote
2answers
97 views

Naming conventions DAL, BAL, and UI Layer [closed]

I am developing a typical Web Application with the following layers UI Layer (MVC) Business Logic Layer (BAL) Data Access Layer (DAL) Each layer has its own DTO object including the BAL and DAL. ...
4
votes
1answer
372 views

avoiding multiple calls to SQL while being modular

I have a BusinessLayer.dll which calls DataAccessLayer.dll which ultimately makes the tcp connection to the SQL server. Each business layer method has a corresponding method in the data access layer ...
2
votes
1answer
113 views

Efficient Code Design for Pattern Search Using a Singleton Pattern

I am having difficulty figuring out an efficient (thread-safe) code design for the following problem. I have been at it for some time now and would really appreciate some advice and input on how best ...
1
vote
1answer
212 views

How does a search functionality fit in DDD with CQRS?

In Vaughn Vernon's book Implementing domain driven design and the accompanying sample application I found that he implemented a CQRS approach to the iddd_collaboration bounded context. He presents ...
1
vote
3answers
1k views

Compiler/OS Design - Where to start [closed]

I have a fairly strong background in C and Assembly and I am starting to look into basic compiler and operating systems design, but my biggest problem is where I should really start, seeing as both ...
54
votes
5answers
3k views

Why were Java collections implemented with “optional methods” in the interface?

During my first implementation extending the Java collection framework, I was quite surprised to see that the collection interface contains methods declared as optional. The implementer is expected ...
1
vote
1answer
203 views

Should ORM data access methods be wrapped or used directly?

We're using an internally-built ORM. Each table is represented by a Model class, which inherits from a base model class that has a handful of methods like GetAll, GetWhere (to get rows with specified ...
0
votes
0answers
21 views

Designing Document class for Doc Imaging - optional fields

I'm working on a project that processes many Documents. A Document CAN have a Cover Sheet (if the first page is one) A Document CAN have a Stub (if Document is large) It matters whether or not a ...
1
vote
1answer
173 views

Exceptions: What to handle, what to throw

I have a custom configuration reader which performs various functions on top of .NET's CloudConfigurationManager and ConfigurationManager implementations, such as caching, type conversion, etc. The ...
42
votes
9answers
34k views

Why use partial classes?

In my understanding, the partial keyword does nothing but allow a class to be split between several source files. Is there any reason to do this other than for code organization? I've seen it used for ...
1
vote
1answer
233 views

Erlang chat app design?

I have a chat app made in node/socket.io. Scalability factors have made us choose Erlang/Ejabberd/xmpp and it will replace node/socket. I have a few questions: Currently using MySql for chat ...
36
votes
5answers
1k views

What's the right way to work with a graphic designer?

Recently, we worked with a graphic designer (arranged by the client) to provide the skin for a Django+Bootstrap application we had built. The designer provided a series of static images of the new ...
0
votes
1answer
62 views

Logic based on modified fields of a Hibernate entity

I have a Hibernate entity object MyObject with several attributes and a service MyObjectService containing business logic dealing with MyObject. I also have a view model dealing with user input/output ...