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

learn more… | top users | synonyms (1)

0
votes
0answers
9 views

Designing Storage for Different Time Systems

I've been considering doing some kind of application that allows users to track events in mythical settings. However, not all mythical settings allow for normal times. What if one user wants star ...
0
votes
0answers
9 views

Symfony2 - Best aproach for a plugin system

Symfony2 is handling all its things in bundles in /app or in /vendor. This is fine, if you are handling and managing all by yourself or Ops that handle all needed things. But I haven't found a good ...
4
votes
2answers
389 views

Why aren't all method virtual or why doesn't have each class at least one interface?

This is more philosophical question, which address .NET platform, but maybe it is useful also for other languages. I'm doing lot of Unit Testing and especially when I'm using third-party components I ...
0
votes
0answers
16 views

Should fragments register directly to an event bus or should only activites do so?

Please correct me if I'm wrong about any of the following. I understand that if a fragment wants to make a network call it tells it's activity then the activity makes the call and returns the answer ...
-2
votes
0answers
41 views

How to chose a framework? [on hold]

I am an amateur Web Dev. I love working with javascript and frameworks and tools. I am here to seek advice because I am coming across new framework and tools everyday like Angular JS , jQuery , ...
4
votes
1answer
258 views

Reuse already fetched data for request

I have action that fetches user model from db to check access. Then I have method that in some cases requires same model. function checkAccess(req, res, next) { var data = ...
0
votes
1answer
108 views

What kind of data structure should be used to store components in an electrical schematic program?

Is there a specific data structure, object oriented programming methodology, and/or approach for achieving what programs like LT Spice, Altium Designer, and Cadence Virtuoso use to manage ...
0
votes
1answer
40 views

How to calculate new property for old records efficiently?

Let's say we have classes something like this: public class Item1{ public Guid Id {get; set;} public string Name {get; set;} public decimal Price {get; set;} public int Quantity {get; ...
1
vote
3answers
173 views

Are there any alternatives to dependency injection for stateless classes?

I am working on an application whereby I have designed classes to fit into several groups: Immutable: initialised through constructors, uses copy-and-swap idiom (inc. move), can deep copy (i.e. ...
0
votes
0answers
44 views

Onion architecture vs 3 layered architecture

I see only benefits to the onion architecture over the 3 layered architecture where the BL had responsibility to call methods on DAL (or an interface of DAL) to do CRUD. The onion has better ...
6
votes
1answer
126 views

Where to store SQLite Database file?

I'm writing an application for learning foreign words of exactly one language (english at the moment), which has currently an ineffective design. I use Java and SQLite-jdbc for saving the words. ...
-1
votes
0answers
26 views

Text script to .net code [on hold]

I have a set of text files which contain the keywords. I need to generate C# code / C# classes by reading these files using C#. Each text file is meant for a class. The keywords map to methods in the ...
4
votes
2answers
100 views

Layered architectures and modular software

I have built a server-side Java application of about 10k lines of code and on a code review a colleague made me notice that when developing a new business feature , I have to touch several files. My ...
0
votes
1answer
82 views

What are the consequences of eliminating the ORM/ODM in a NoSQL based system?

In Martin Fowler's article OrmHate, he states the following: If you have an application problem that maps well to a NoSQL data model - such as aggregates or graphs - then you can avoid the ...
30
votes
6answers
15k views

Why avoid Java Inheritance “Extends”

Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object using ...
4
votes
3answers
535 views

Database design, how to handle freelancers

The context I'm modeling a database for a small ERP system. However I've recently hit a difficult spot that I'm having a hard time wrapping my head around. The logic of it involves a few special ...
2
votes
1answer
110 views

Onion architecture design question

I recentlly started working on a new project where the team was considering use onion architecture, which I was not very familiar with, so I started reading about it. The application is a simple 3D ...
3
votes
2answers
119 views

Designing a centralised command api

I'm working on a personal project that has a fairly complex UI. As much as possible I would like to remove mouse interaction. To help with that I am working on a kind of in app command line, where you ...
0
votes
1answer
75 views

Need help with figuring out a better method of my application layout, please

I am working as the sole .Net developer at a company and I have been tasked with a very large and complex project, an internal intranet site for inventory and time tracking. I have built a project ...
1
vote
1answer
596 views

How do we structure our JavaScript so that it is easily editable, testable, and can make calls to render a view without knowing specifics about it?

I am working on a web application that displays some data and uses JavaScript. Right now, we are serving up parts of our JavaScript code (to display certain types of information, that is, "Render a ...
1
vote
1answer
60 views

When designing a URL router, is there a reason why some frameworks choose a configuration file vs. a naming convention?

I'm confused about routing. In some systems I've seen only naming conventions. In other's I've seen configuration, and in some I've seen both options (like in ASP.NET MVC5). In the naming ...
5
votes
1answer
368 views

Software design: too many static objects?

About the subject I hesitated for a while between using singletons objects or plain static ones. After having read a lot of different opinions, I made mine: If you don't need to prevent ...
1
vote
5answers
248 views

Making an automotive system more 'modular' in terms of software?

I am working on an automotive project that we are supposed to make more modular. I am a software specialist and I have very little knowledge of automotive hardware. I don't have any requirements or ...
2
votes
2answers
125 views

Placing preconditions in the right place

I am trying to figure out the best way to define the responsibility of checking preconditions. Let's consider the following case: we have an Event class representing a sports event and a Matchup ...
1
vote
2answers
125 views

Designing validation classes

This is a follow-up of this question. I decided to implement what the accepted answer suggests, however, I realized I also needed individual public methods for each member the entity to be validated ...
0
votes
0answers
34 views

Suggestions for dataloading - semi dynamic data

I have a very old Perl based system that is used for CAD drawing searches, where each drawing has many metadata fields associated with it. Currently, the 'old' system has a database schema that has ...
1
vote
1answer
47 views

Data Storage Architecture: Storing Hierarchical Data (JSON/BSON)

Say you have the hierarchical storage concept of "Foo." "Foo" holds an id, various values, and zero to many "Foo." Obviously, in turn, the child elements can hold zero to many Foos. The data is purely ...
0
votes
3answers
230 views

Simple React application design

I have a very simple app that lets you log in and then displays a dashboard. The design process with React and Redux is very simple : I have two React components : Login and Dashboard I store a ...
2
votes
1answer
107 views

What functionality to expose in a database abstraction layer?

I'm trying to design a simple way of abstracting away data persistence behind an interface, but I'm having a hard time figuring out how much fine grained control should be exposed to higher layers. ...
1
vote
2answers
74 views

Implementing an event scheduler for animations

The basic idea is to have some animated widgets that sit in a container, quite similar to Qt (the only actual difference is that my widgets are animated). The animation is in some cases dependent on ...
3
votes
1answer
111 views

I feel like the more I improve the structure of my program I am writing a DSL [closed]

My project started out as spaghetti code. The more DRY and extensible I make my code, the more it looks like configuration files and code than runs them. Is that a good thing or does that mean I am ...
2
votes
0answers
43 views

Most efficient way of allocating participants to conference tracks

I am redesigning a system by which conference participants can choose which track they want to attend. Participants express their track preferences arranging them in order and submitting them at a ...
0
votes
1answer
100 views

Why do most payment gateways use synchronous integration?

This question comes to my mind having just lost some money while ordering Pizza. Most internet merchants (atleast in India) use synchronous page redirection for integration with Banks and payment ...
7
votes
6answers
389 views

Should instance of Employee contain a reference to instance of Office, or should Office contain an array of Employee?

Title is an abstraction of what I am actually doing, but in essence the same. The main entity I will be dealing with are the Employees themselves; "Send package to employee John Doe". In order to ...
0
votes
3answers
84 views

Cyclic dependency in this project design

I have 2 modules (containing multiple classes). Let's call them Module A and Module B. Module B has a dependency on Module A: Module B -> Module A. Now, I have created an utility class C, which A ...
-1
votes
0answers
28 views

RSS feed topic categorization

I'm trying to make my own news feed from CNN's RSS feed (among a dozen other news sources). However, I've come across a problem that is actually quite complex, at least that's what I think. One of ...
2
votes
4answers
6k views

Exporting huge data into XLS in a web application [closed]

I am developing a web application in Java/J2EE, in which I have export functionality. I have used Jasper for the same. The issue is when trying to export a huge set of data it is consuming a lot of ...
2
votes
3answers
125 views

Correct RESTfull way to refresh a resource

Imagine we have resources like reports. We have a collection because every report contains its own settings to build some data. Every report calculates its values on regular basis but not to often. ...
4
votes
2answers
137 views

Passing readonly structs in C++

In this particular problem I am having, I am not sure of the proper way to deal with readonly structs, passed to class constructors as a parameter when I want to store the data in the struct, in the ...
2
votes
1answer
92 views

Is it better to pull all data immediately or as needed?

I have a program that needs information from a database but it doesn't need all of the information at once, although it WILL need it at some point. Would it be better to pull all of the information ...
3
votes
1answer
259 views

On Developing Web Services with Global State

I'm new to web programming. I'm more experienced and comfortable with client-side code. Recently, I've been dabbling in web programming through Python's Google App Engine. I ran into some difficulty ...
0
votes
0answers
39 views

Modeling a cookbook recipe with django

I'm trying to model recipes in a cookbook. Here's what I have so far: class Recipe(models.Model): title = models.CharField(max_length=255) class Ingredient(models.Model): class Meta: ...
0
votes
3answers
210 views

DDD Request Validation Handling

I stuck somewhere that I can't find a solution! There are plenty of validation questions here, but as far as I see, most of them were asking about entity validation. But what about request validation? ...
1
vote
2answers
89 views

Single Class to Serve as View Model as well as Container for Submitted Form

I see the following design in the code which is part of the default web application project in visual studio: A single data model class in constructed and decorated with various data validation ...
1
vote
1answer
21 views

Redesigning schedule value hierarchy

I have a couple of schedule value classes that represent the value a schedule holds for a specific slot. First, there's the ScheduleValue class for schedules with two dimensions, where the first one ...
2
votes
3answers
265 views

Design periodic batch notification system

Problem: I am trying to design a system which takes requests from customers in real time and log them in a database. For example - request to purchase an item. The customer then gets a unique ...
2
votes
2answers
109 views

Should we add an extra class to this code sample

I have a shopping website which allows users to place orders. In my web application when the users click 'Create Order' i call an OrderService class which looks like the below: public class ...
0
votes
1answer
57 views

Architecture of badge system similar to StackExchange?

I want to implement gamification in my education mobile application. I have a database with user activity and I want to analyze it and give badges to a user. There will be many badges with totally ...
7
votes
4answers
214 views

Code design: Duplicate code or good implementation

I'm working on application in C#, where I need to serialize and deserialize some classes into/from XML. This operations will be implemented in Class Library. I chose XMLSerialization class to ...
2
votes
1answer
51 views

Getting instances without using the Spring context

I'm writing a small game of life implementation with Spring, but trying to avoid referencing the Spring context within my code. I have two interfaces, Board and Cell. In each implementation of Board ...