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

learn more… | top users | synonyms (1)

0
votes
3answers
108 views

Should simple tasks be divided into separate functions? [duplicate]

If I have to write a simple program (25-35 lines), should I divide it even further, in functions which have a few lines and get executed max. 2 times, or to put it all im one? e.g. if I need to add ...
0
votes
0answers
14 views

Design architecture and software for webapp integrating with few other endpoints (Email Server, Jira, CRM system)

In my upcoming project, I need to integrate a webapp with few other endpoints. Main duty of the webapp will be some kind of thin-client for inner JIRA system for company. Moreover, I'll need to ...
0
votes
2answers
148 views

Bad Practice using Auto Generated Classes for Data Access

I've seen this before but haven't found concrete reasons. When you add Entities to your EF model, EF auto generates classes for these entities. In terms of DataAccess, why is it preferred to not ...
3
votes
2answers
247 views

Should an object load itself?

although I'm programming in C++ for some time now, I'm always faced with design decisions (probably due to the language's flexibility). One such problem is deciding if a method should be part of the ...
15
votes
8answers
2k views

Is it normal for a programmer to not have 100% clarity over their own code at times? [on hold]

I'm not an expert programmer so this may be why, but I've come to notice that whenever I create complex code (like a Chess game I recently made), I am able to write the correct code to get the program ...
0
votes
0answers
39 views

Async properties in interfaces to cater for the possibility of expensive first-time evaluation: Is this a good idea?

First of all, sorry if this post is too long. I'll start with the… Short version: Is it generally advisable or a good idea to design an interface property as asynchronous simply because we cannot be ...
1
vote
0answers
52 views

Long-term strategy for implementing a plot auction system

I am currently working on an auction system. It works as follows: A business places a bid on a plot for a house. many houses make up a single plot e.g. plot 7 corresponds to a number of houses in a ...
0
votes
1answer
55 views

How to determine which service to call

I have modeled my application using multiple 'user' domain objects. Candidate Recruiter Administrator Each entity extends from an AbstractUser implementing UserInterface. interface UserInterface ...
0
votes
3answers
100 views

Communicating between unrelated components/objects

Imagine that I have a game, with Monsters, Missions, Vehicles, and of course their controllers and such, so a Monster class, Mission Controller class, Vehicle Controller class and so on. Suppose that ...
1
vote
2answers
73 views

How to solicit new product recommendations from existing clients?

My company is working on developing a new product that is similar (but larger in scope) than our existing, primary application. It will incorporate most of the functionality of our current application ...
0
votes
1answer
59 views

Using entityManager/repository Class/session factory directly in controller

I wonder what is your approach on following subject: let's say we have MVC structure with entities, repositories, controllers and service layer. My approach to use above was pretty clear for me: ...
1
vote
0answers
58 views

Need to refactor file downloader and post processing utility [duplicate]

Not sure whether this is the right forum to ask this but here goes. Using this solution - http://stackoverflow.com/questions/26571351/replacing-if-else-logic-with-state-strategy-pattern I was able to ...
1
vote
1answer
80 views

Inheritance, Composition and Protocols

I'm reading a book on general object oriented concepts to try and gain a solid understanding of everything. One thing that is throwing me off is the difference between Inheritance and Composition. I ...
7
votes
1answer
167 views

Null Object Pattern and Input validation - copy real implementation or silently accept everything?

I have a WifiComponent in my Camera in my client application. It's responsible for handling the Wifi-related functionality of the Camera. The Camera represents a real world camera. This WifiComponent ...
1
vote
1answer
145 views

Should we use data object (or the data transfer object) for sharing data between these three classes?

I found an article by Martin Fowler that has made me doubt my design choices, particularly about data objects. Martin Fowler has written an article about what he thinks is a code smell. In this ...
0
votes
0answers
45 views

OO Design Question - Library/Objects for API which includes id references

Public api: getClients / getClientById - returns a json object like: { clientid: 1, name: "Client1" } getProjects / getProjectById - returns a json object like { projectid: 5, name: ...
0
votes
0answers
13 views

Can a standalone app be made to work as a Wordpress plugin? [migrated]

I just developed a tool for web site owners. This works as a standalone app with its own user and routes system and other custom elements. Now it seems Wordpress is getting more and more popular and ...
0
votes
0answers
25 views

Status updates design review [migrated]

I need help identifying any significant design issues with some code I have generated to track status updates. I have a big task A which contains multiple small tasks and each of these small tasks ...
1
vote
1answer
201 views

How do you keep control in a large software project? [duplicate]

I've a large-ish software project that I'm the sole developer for (~80KLOCS and counting - I know there are much larger projects out there, but it's an order of magnitude larger than I've ever had to ...
1
vote
0answers
73 views

The Python module-as-singleton hack

I've seen (and once used) this idiom a few times in Python: # At the end of a module: if __name__ == '__main__': main() # or whatever your entry point looks like, this line isn't important else: ...
0
votes
0answers
44 views

Accessing a stateful managed object from native code via a static variable [migrated]

I need to create a native C++ DLL that will be an interface/wrapper over a C# class. I've never done anything like this before, but my design is basically the same as this. In other words: I have a ...
0
votes
2answers
90 views

Mocking the context of application

We have a context of the application which is a static class named Holder containing several static properties initialized by objects that are used throughout the application. All over the unit tests ...
3
votes
2answers
106 views

OOP CLI menu structure organization?

This problem has kept me from pursuing a project I'm working on because it influences the entire structure of the application. This question has been briefly touched on here, but I feel that it wasn't ...
0
votes
3answers
151 views

Store an object's name in the object or externally?

I'm in the process of building an application which needs extensive logging of points in time at which certain events happen. For example when it renders a sequence of different shapes to the screen ...
0
votes
1answer
43 views

Software to access GSM Terminal, sending and receiving AT commands, validating results

I am currently implementing a software that uses a GSM terminal to perform actions. Actions can be sending messages, checking balance, receiving status report messages, setting the pin, ... The ...
0
votes
0answers
38 views

How to clean composition root from anything other than object construction?

I'm doing poor man's DI (manual injection) in my application. My (pseudo-) composition root looks something like this: var connectionSettings = new Settings(SqlParameters) var dataLoader = new ...
0
votes
1answer
68 views

Cleanest choice for symmetric operations

I have a need to do some processing from a format A to a format B and from B to A. The job in one direction is very similar to its counterpart. Both formats are represented with an interface Msg. In ...
5
votes
1answer
375 views

Having many versions of an application [duplicate]

Basically the scenario is this: There is one main version of an application but it is modified for each client. The development is usually through the version that is currently worked on All the ...
2
votes
2answers
104 views

Designing a system to archive databases with referential integrity

I have a very large Oracle database, with many many tables and millions of rows. I need to delete some of the rows end-to-end. By end-to-end, I mean, if I want to delete a row from a table then I must ...
-2
votes
1answer
61 views

Naming of classes [closed]

I am creating an Email sending client. My POJO domain model conssts of 2 string fields, userName and userId. My thought process around designing the classes was to club these 2 fields into a domain ...
0
votes
0answers
23 views

Managing allocation calendars for an employee set [duplicate]

IN view of creating a MIS (Management Information System) one architectural/design issue that's confronting us is managing allocation for set of employees. Scenario: Employees get allocated to ...
0
votes
0answers
123 views

How to design multiplayer online game with a battlefield?

I'm designing a simple game where all players use one battlefield via browser. I'm using websockets. So I'm wondering should I always send all data about battlefield to every user when smth is being ...
0
votes
1answer
134 views

How can I write these services using SOLID and keep them easy to test?

I am trying to write a couple of classes using SOLID principles and having some trouble. The problem is quite simple. I have an application that tracks leads. Leads are created when events are raised ...
1
vote
2answers
356 views

Generics in low level languages

I'm developing a language like Vala and OOC that compiles back to C. This means that, eventually, every feature needs to be adoptable to C code in some way or another. Generics is one of the features ...
7
votes
2answers
189 views

Autoreleasing objects in Reference Counting Systems

I'm experimenting a bit in C and I'm trying to implement my own Reference Counting System. I've mainly worked with Objective-C in the past but AFAIK autoreleasing objects is something that is unique ...
0
votes
2answers
62 views

What is the term (“metric”) for the degree of unstructuredness due to many changes? [closed]

Is there a specific term (name of a "metric") that represents the growing level of unstructuredness (or just plain badness) of a s/w component that is caused by too many changes, by too many people, ...
0
votes
1answer
65 views

how will my api interact with Ejabberd?

I am working on backend of chat application that provides services to Android,iOS and Web application. To keep everything central,I have created web services which allows apps to read and write data. ...
0
votes
0answers
36 views

Software design guidance - Local and Global Nhibernate session in Orchard

I'm trying to find a better approach with my design for some software that works with Orchard CMS framework and NHibernate sessions. The code below serves the purpose for a single session per HTTP ...
-4
votes
1answer
92 views

Creating n tier application [closed]

I am new to design patterns. I want to learn constructing 3 tier architecture. I have searched but confused at some points. In this article ...
2
votes
3answers
405 views

Should one value simpler code over performance when returning multiple values?

I'm too often facing situations where I need to get several types of information from a method. I usually think long and hard to circumvent these situations but I'm thinking it's pointless work that ...
0
votes
0answers
41 views

Developing a “time scheduler” app [duplicate]

I need to develop an application to generate, given a set of preferences and constraints, a time schedule for employees. These tables can really get complex and they might need to take into account ...
6
votes
4answers
375 views

Heterogeneous Associations - Data Modeling When an Object that Must Relate to One of Many Classes

Suppose you have 3 classes: ClassA, ClassB and ClassC. Now suppose you have a class Message. You want a one-to-many relationship between each one of those three classes and the Message. The goal is ...
0
votes
0answers
28 views

CQRS atop of SOAP component

I'm trying to adapt CQRS in my application. I really like how it simplifies domain model. There is a component with some part of a business logic which is accessible through SOAP. Commands and queries ...
0
votes
1answer
127 views

How does the consumer-producer solution work?

I'm only a beginner, and my book doesn't cover this subject. I have researched my problem and found that an implementation of the consumer-producer pattern is the ideal solution, and have Googled it, ...
1
vote
0answers
94 views

Design for an application framework that will allow each implementation to customize parts of the UI

I am tasked with designing an application framework that will allow each implementation to customize parts of the user interface. One such example would be that the implementation (let's call it ...
0
votes
0answers
41 views

Should I inject a data dependency into an Angular Directive?

I am currently implementing an AngularJS directive. It is fundamentally a reusable widget comprised of a select box and a table which populates based on the item in the select box. My point of ...
5
votes
3answers
240 views

Model relationships with DDD (or with sense)?

Here is a simplified requirement: User creates a Question with multiple Answers. Question must have at least one Answer. Clarification: think Question and Answer as in a test: there is one ...
-1
votes
1answer
62 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 ...
2
votes
2answers
119 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
77 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 ...