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

learn more… | top users | synonyms (1)

0
votes
0answers
45 views

Handle an error system in RESTful API

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 ...
2
votes
2answers
91 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 ...
1
vote
1answer
61 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 ...
-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 ...
0
votes
0answers
59 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 ...
2
votes
1answer
41 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 ...
-3
votes
2answers
41 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
205 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 ...
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
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
1answer
196 views

Designing classes the right way [on hold]

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
1answer
84 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 ...
0
votes
0answers
36 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 ...
0
votes
1answer
65 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 Winforms ASP.NET website. All our pages are organized into sections that, while related and ...
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, ...
-3
votes
1answer
137 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 ...
1
vote
2answers
91 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. ...
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 ...
4
votes
1answer
371 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
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) ...
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 ...
-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 ...
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 ...
0
votes
1answer
113 views

Common Methods for communication between Offline Software and Web Application?

The purpose/s of this question is to discover what are some of the most reliable methods of achieving communication between existing offline software and a web application. (Example) Scenario: A ...
4
votes
1answer
76 views

Handling interface segregation in C++

I'm designing a "view" handling system for a game. The goal is to be able to have different "views" that can be shown in sequence or stacked on-top of each other. For example, the initial splash ...
0
votes
0answers
61 views

Database-like structure in memory

I need a database-like structure that will wrap this: data MsgPackDB = MsgPackDB { dim :: !(V.Vector Int) , rows :: !([DBRow]) } data DBRow = ...
3
votes
4answers
445 views

How to force “program to an interface” without using a java Interface in java 1.6

In java 1.8 they have wonderful new "default interface methods". In 1.6 how close can we come? The goal: keep clients (using code) from being able to tell that a class is not a java interface. If ...
0
votes
1answer
100 views

Static methods vs Interface implementation

Here is my problem: I stared to create a e-commerce web sites info collector. So i created a parser for each site. The parser class is state less. got methods like: getItemPrice(WebElement page) ...
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
118 views

Progress in PHP web application design [closed]

I have created an easy database-driven web application (with PHP+MySQL). It's written procedurally with a few controllers (index.php) in a few directories and a few template files and one stylesheet. ...
0
votes
1answer
100 views

translating a list of words (word1, word2 and word3) [closed]

We are trying to globalize an application and we have run into a situation where I'm not sure how (of if) we would go about formatting the string for globalization. It's a paragraph explaining ...
3
votes
3answers
362 views

Separating Code into Smaller Files in C

I am in the process of cleaning up my code and making it easier to maintain. I am doing this by turning my 5000+ line file into separate smaller files. I have successfully created separate source and ...
2
votes
2answers
136 views

Decision making and maintenance

I'm trying to find an elegant way to implement a decision making algorithm that allow easy maintenance because the conditions for the decision making might change often. I'm going to try and be more ...
1
vote
1answer
79 views

When is it acceptable for business logic to be exposed on distributed applications?

When developing applications (for simplicity, use a client-server model) intended to be deployed on customer systems, when it is acceptable to expose business logic outside of compiled code (for ...
-1
votes
0answers
39 views

Clearly defining an Implementation detail [duplicate]

In what way could I, when designing my API, framework or whatever decide what is and what is not an implementation detail? What questions do I ask in order to correctly answer: "Is that something my ...
18
votes
4answers
2k views

Is there a good reason to make pure functions non-public?

I had a little debate going on with a coworker. Simply put, is there a good reason to hide/encapsulate functions that are pure? By "pure" I mean the wikipedia definition: Always returns the same ...
0
votes
1answer
72 views

Strategy vs Publiser-subscriber pattern

Let's say I have a channel endpoint where I receive messages. Because I want to process messages in a different way depending on its Header property, rather than create a massive switch I create ...
0
votes
0answers
59 views

Am I following a good design thought process? Is the Abp framework overkill?

As I finish one project and start another, I have a small time window to come up with an architecture for the new. I am coming from the following design: Web applicationReceives domain models & ...
1
vote
1answer
231 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 ...
0
votes
0answers
58 views

Is one of these the more “Angular” way of communicating with a directive?

I am working on a project where I would like to encapsulate a directive library and distribute it to other developers to use. I would like to keep the changes to the model within this encapsulated ...
2
votes
3answers
282 views

Which approach is right doing use case first or classes first ? why? [duplicate]

There are people who prefer to do use cases first and then do the classes, but there are also some who prefer to do class diagram first and then use cases. So is it personal choice for convenience? ...
1
vote
1answer
102 views

Java Modal Object Design

This question is not about a specific program. This is about design - the UML phase of the project. I am supervising a Java project. It will contain a lot of modal popup dialogs. From a C/C++ ...
-1
votes
0answers
37 views

Where should commands be issued from a CQRS application?

Let's say I have a very simple CQRS application for communicating with some Suppliers. I'll upload some Orders to each Supplier's FTP account. I decided for 2 bounded contexts. One for managing ...
1
vote
1answer
255 views

When creating a library, is there a way to make certain classes entirely internal to the library, and not exposed to the user of the library? [duplicate]

Suppose you were designing a Java library for other people to use. You compile the library into a JAR that they can import into their projects and use. Needless to say, you intend for the library to ...
1
vote
1answer
132 views

Why does `SortedDictionary` not implement `IReadOnlyDictionary`?

The .NET type SortedDictionary<TKey, TValue> does not implement the interface IReadOnlyDictionary<TKey, TValue>, although Dictionary<TKey, TValue> does. It is trivial to make ...
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 ...