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

learn more… | top users | synonyms (1)

2
votes
0answers
180 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 ...
0
votes
0answers
54 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
746 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
160 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
194 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
393 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
110 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
2answers
71 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
97 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
296 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
35 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
64 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
124 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
135 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
118 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
147 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
123 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
152 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
105 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
134 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
47 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
40 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
65 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
235 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 ...
1
vote
1answer
68 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
87 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
59 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
200 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
128 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
374 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
89 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
138 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 ...
4
votes
2answers
112 views

Applying composition over inheritance to Vehicle classes

I have a car maintenance garage program that has an abstract Vehicle class that has several derived classes like Car MotorCycle, etc. Each of those derived vehicles in turn is either a fuel or an ...
1
vote
1answer
109 views

Should I actually be using encapsulation here?

Problem Statement I am going to write a library to control a whole bunch of relays, and I am just trying to think conceptually right now. Here are my design constraints: We have an exact number of ...
1
vote
1answer
103 views

Standalone library for error logging?

Background Here is how I currently log any exceptions that occur in my code: Pass each object instance the path to a file where I want all of the logging to happen. Each of the objects have their ...
4
votes
2answers
189 views

Ubiquitous language and maturity level in REST API?

According to Richardson Maturity Model there are several levels of maturity in REST approach. http://martinfowler.com/articles/richardsonMaturityModel.html Since DDD uses ubiquitous language, I am ...
1
vote
1answer
99 views

System for scheduling parallel tasks/callbacks

I am looking for a system for building state machines with timed/scheduled transitions, and with events that happen periodically during a given state. I can implement it myself, though I feel like ...
2
votes
0answers
52 views

Drawing sequence diagram for user-forget-password functionality

I'm trying to draw a sequence diagram of the functionality of user retrieving their password when they forget it and its procedure could be illustrated in this activity diagram. As you can see, ...
2
votes
0answers
104 views

What are the benefits of an input/output component design?

For the company I work at, all of our projects, including a new one started last year, are written in C89. We write for vxWorks (a real time embedded operation system). Our software runs multi-...
0
votes
1answer
32 views

Sdk building, declare dependencies inside the assembly or use external?

At my company, we're building an SDK consisting of a number of assemblies. For example, we deliver an assembly called Company.Platform.Security that contains the implementation of our authorization ...
2
votes
1answer
199 views

Why support cyclic dependencies at all? Are there valid use cases?

Background Time ago I learnt something about package design, in particular about loose coupling: The Acyclic Dependencies Principle The dependency structure between packages must be a ...