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

learn more… | top users | synonyms (1)

0
votes
0answers
31 views

Thoughts on switching from Qt's QNetworkManager to lubcurl [on hold]

I have an app that I've been working on for a few years. It runs on OSX and Windows and has been on the AppStore for a couple years now. The idea of the app is pretty simple, it's basically Outlook ...
3
votes
2answers
79 views

RESTful service and DAO: deciding on responses

I am developing a RESTful API and I am using DAOs to serve data to the service. I am having trouble deciding where certain responsibilities should fall, whether in the service or in the DAO contract. ...
7
votes
3answers
430 views

Should a DAO be singleton or not?

I am developing a RESTful API and I think it is convenient to use DAOs for my resources because although I plan on just using memory to store them, I don't want to close a door to whoever is using my ...
0
votes
1answer
31 views

Creating a facet filtering using Elasticsearch

I have been asked to create a filtering functionality for e-commerce application written in PHP. Since the app is using MySQL database, I made the decision to use Elasticsearch with Logstash and ...
4
votes
2answers
177 views

Organizing maven modules and spring profiles

I'm facing a design problem with Spring's profile and Maven multimodule project from which i'm building a product, as a web as application that can be customized for differents clients. For this i ...
5
votes
1answer
80 views

Designing a flexible API with support for Callbacks

I am writing a Java library that needs to make http GET && POST requests. There will be two types of users of this library: Those with understanding of callbacks and know how to use them. ...
1
vote
1answer
93 views

What Graph Theory approaches or algorithms are useful for designing a House?

I have a set of data about a family, and I want the software to find a house design that fits the data (which includes stuff like preferences and whether they want a pool. The current way I am going ...
0
votes
0answers
36 views

How do I build a policy in ASP.NET MVC 5 (or 6) with AuthorizationPolicyBuilder that incorporates an IP address?

I have been studying this, https://leastprivilege.com/2015/10/12/the-state-of-security-in-asp-net-5-and-mvc-6-authorization/ and on that page, public class Startup { public void ...
2
votes
1answer
68 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 ...
2
votes
0answers
82 views
+100

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 ...
0
votes
0answers
40 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 ...
8
votes
2answers
733 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
1answer
137 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
171 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. ...
4
votes
4answers
336 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. ...
4
votes
2answers
104 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
45 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; ...
0
votes
1answer
91 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 ...
2
votes
2answers
284 views

Onion architecture design question

I recently 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 ...
0
votes
1answer
81 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
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 ...
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
58 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 ...
2
votes
1answer
120 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. ...
2
votes
2answers
134 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 ...
2
votes
0answers
45 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 ...
3
votes
1answer
114 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 ...
0
votes
1answer
109 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 ...
0
votes
3answers
109 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 ...
3
votes
2answers
121 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 ...
4
votes
2answers
147 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
104 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 ...
2
votes
3answers
129 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. ...
0
votes
0answers
42 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: ...
1
vote
1answer
27 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 (...
0
votes
1answer
61 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
226 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 ...
0
votes
0answers
48 views

GUI - engine data exchange, design with C, getters or struct pointers passing?

Having quite big codebase and external libraries, in C application, what would be pros and cons of two approaches (or suggest other): (assume that there are NONE api provided calls for this) Edit ...
0
votes
1answer
69 views

Is it bad practice to simplify constructor dependencies using a simple container when the class represents the entry point for a sub system?

I have a System which depends on Transactions, and a few other things. This list can become very long. Transactions can be (and will be) implemented in two ways or more, so every transaction is an ...
1
vote
3answers
99 views

Xml Messages: One Type to Rule Them All?

My job involves a project that has a lot of different pieces that all need to communicate via XML messages. There are two schools of thought on how these messages should be organized. In reality ...
0
votes
1answer
62 views

Is it good practice to encapsulate communication with web service?

I'm working on a ASP.NET application that is required to communicate with a Flask web service. My initial thought was to include the communication with web service directly into the aspx file, ...
1
vote
2answers
98 views

Better way of providing access to a single “backend” class to the whole application

My application is growing in complexity. Currently, I have a collection of classes that make up a "Backend", this contains a DataInterface that talks to a database and returns POCO classes, a ...
2
votes
0answers
83 views

Architecture design for Web API with single endpoint

Scenario: I have a situation where I need to refactor a Web service with a single API endpoint that uses complex logic to insert, update and fetch data from a database. The clients use one call, and ...
0
votes
0answers
81 views

What is a good design to couple/relate methods and references?

I am implementing a trigger system. There are objects that take the role of observers (this is not strictly an observer pattern because the observers are inter-dependent, see my question here). They ...
0
votes
3answers
56 views

Different pages for mobile?

I'm attempting to migrate some of my already existing pages over to bootstrap 3, and I'm wondering the best design to do this. On the non-mobile devices, I display a list of items on the left. If ...
5
votes
4answers
191 views

Idiomatic pattern matching equivalent in Java

I'm building a simulator which parses some events from STDIN and "runs" them. My background is mostly functional programming these days, so it seemed natural to do something like this: datatype Event ...
2
votes
1answer
127 views

Fine tuning details in C++ function for different customers

The company I work for follows a business model where a core product exists (originally written in C, now in C++) with some default implementation but details are tailor-made for each customer (there ...
5
votes
1answer
373 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 ...
0
votes
0answers
77 views

Repository Pattern: How to structure repositories with nested tables?

I'm working on an API and I always seem to run into this thought debate. When designing the code structure that interacts with the database (repositories, data providers ect..) how do I structure the ...
4
votes
2answers
131 views

Calling different library functions based on parameter

I am writing a rather large class where the user can specify at runtime whether she wants to use algorithm A or B of an third party library e. Basically there is only one function call different in ...