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

learn more… | top users | synonyms (1)

8
votes
3answers
447 views

How does one keep argument counts low and still keep third party dependencies separate?

I use a third party library. They pass me a POJO that, for our intents and purposes, is probably implemented like this: public class OurData { private String foo; private String bar; private ...
4
votes
1answer
171 views

Derive from a base class but not include a condition in the base class's method

The current code looks like this: public class Details { Public void Populate() { WriteChapterDetails(); } public void WriteChapterDetails() { if ( ...
0
votes
2answers
61 views

How to store users' info in network app?

I'm currently working on a school project that aims at creating a P2P chat client for users on the same network. For now, it will only be used by users on the same LAN network. But hopefully,I will to ...
0
votes
1answer
74 views

Abstracted better? Data driven string creation

I am trying to post this question neutral of programming language so it helps the widest audience. But for those who must know, I am using Objective-C and iOS frameworks. The background: I have a ...
0
votes
1answer
17 views

Merging user activities into one stream with a common representation

My social network website currently has forum threads and posts gallery pictures albums on the users' profiles group discussions classifieds I would like to create one "stream" of activity. It ...
0
votes
1answer
52 views

Application with really dynamic data structure

Well, I'm on the verge of this project that really puzzled me. The situation is, in our office, we have a department that collect data about the corporate performance indicators from all across the ...
3
votes
3answers
320 views

Why do python generators and functions share the “def” keyword?

Consider the following: def some_function(): return 1 def some_generator(): yield 1 In the code above, some_function is a function, while some_generator is a generator. They look quite ...
1
vote
2answers
133 views

Software release question: do you refactor pre or post-release?

I work in finance and we have some calculators that I support. I can come up with programming solutions, but I don't have a lot of software design or release management experience. I was recently ...
2
votes
1answer
67 views

How to design database tables for a Factory class?

How can I design database table structure for a class that varies in its core parameters, when it is created by a factory method? I have a Factory like this: class ProductFactory { public ...
4
votes
3answers
94 views

Pattern for checking online service availability

I'm not sure that this is entirely on-topic, but I'll try to make it so. I have an online service (API) and an Android application that uses it for all actions in the app. At the current moment, ...
1
vote
2answers
34 views

Using many Resource URI to create a Record and handling failure

Hi Guys, I have a decision to make to solve a problem, I’m describing the problem below. Application Overview I have an ASP.NET MVC 4 webApp which uses Rest Api for almost all the tasks, from Login ...
0
votes
2answers
68 views

Is it common/reasonable to build and manage a stack for each client? [on hold]

I am trying to design a service that will sync with various clients databases and then serve that data to users. It is all time sensitive data, so it needs to sync very quickly and users will expect ...
8
votes
1answer
299 views

How to avoid chatty interfaces

Background: I am designing a server application and creating separate dll's for different subsystems. To simplify things, let's say I have two subsystems: 1) Users 2) Projects Users's public ...
-2
votes
1answer
54 views

How do we design a good website, not graphical? [on hold]

I always created an application without proper design before creating it and having a very hard to manage code which I don't want to touch it again. I understand to create a system we have these ...
3
votes
2answers
98 views

Strategies for parameter wrapping

Methods with many parameters are often sometimes unavoidable. In my own experience I often find this is the case for program entry points and complex mathematical procedures - where refactoring is ...
-3
votes
0answers
31 views

Design a system for real time events delivery [closed]

Please share your thoughts over this designing question (If you need any more info, pls. do let me know): GIVEN: Let's say we have a popular eCommerce site with lots of sellers and millions of ...
6
votes
3answers
262 views

Designing a REST api by URI vs query string

Let's say I have three resources that are related like so: Grandparent (collection) -> Parent (collection) -> and Child (collection) The above depicts the relationship among these resources ...
0
votes
3answers
77 views

Heuristics on when should one subclass and when not [closed]

Are there any good tips, when one should subclass and when should not? It's clear that we should not subclass when we want to reuse a single method of some class we override all methods, changing ...
1
vote
0answers
49 views

Maximizing reuse out of a function primitive in CUDA

I'm working on the implementation of a few related algorithms in CUDA, all of which require a primitive that we'll call f(). The related algorithms can't simply call f though, as they require f to ...
0
votes
0answers
37 views

JSON or protocol buffer to replace the custom TCP message

Originally, We have two applications communication with TCP/IP, and both of them are implemented by C++. The messages between them are custom message type. Now the client program will be changed to ...
0
votes
1answer
79 views

Category tree, is it worth it?

I need some insight on how to design my database regarding categories. My site allows the users to post several different types of things for example, recipes, articles, products etc and there will ...
1
vote
1answer
75 views

MVC URL structure with URI parameters

When creating routes for your MVC web application I have seen two possible ways to pass variables to a controller method: With the first approach the variable is passed to a parameter of the ...
0
votes
2answers
59 views

Architecture for process that can be invoked to return errors as well as silently

I'm looking for some high level design/architectural input for the following. I have "some business process" I am writing in code (the importing of data from various CSVs into a database. There is ...
0
votes
0answers
25 views

Improve communication between controller and trackers in a Twitter fetcher tool using RabbitMQ or Apache Flume

I've been working for a time with some researches developing a tool to fetch tweets from Twitter and process them in some way. The first prototype "worked" but became a pain as we used sockets to ...
-2
votes
0answers
56 views

Best framework for Enterprise solution in ASP.NET web page application [closed]

I work on VS2012 C# asp.net web page application. In the default model for ASP.NET Web pages, the user interacts with a page and clicks a button or performs some other action that results in a ...
1
vote
0answers
29 views

Individual methods or parameters for Google Analytics abstraction on Android

A coworker and I are having a discussion around the best way to build our abstraction on top of Google Analytics for an Android application. A couple of data points. We have auto-tracking enabled ...
2
votes
2answers
141 views

When testing is it OK to use a method of the subject to test another method of the subject? [duplicate]

I have two methods in the same helper class one that creates an image (method A) and one that compares two images (method B). I want to check the return of method A against an existing image. To do ...
2
votes
2answers
115 views

Should I use a large if statement inside a view or create a different view entirely?

I'm using the MVC architecture Laravel 4.2 to create a relatively complex web application. This application consists of a website which is very heavily based on whether an event has occurred or will ...
2
votes
3answers
333 views

Multiple users using the same script for their websites

I'm working on a project, I have a question regarding the architecture: Say I have a many python scripts on my server and there's main.py which contains all the classes. And there's a script called ...
1
vote
3answers
147 views

Is my auto-update standard reasonable?

I'm looking to come up with a standard for how to implement a system that will automatically update software. As such, there is no actual programming (yet), but I still want to make sure my standard ...
2
votes
1answer
56 views

Integration between services in a SOA

Assume we have a Bounded Context for Inventory (InventoryBC) and another one for Shipments (ShipmentsBC). These 2 BCs need to communicate together. They are hosted on 2 different services on different ...
0
votes
4answers
207 views

How should nodes in a chain be connected?

Suppose you were building a system that receives data on one end and sends filtered data on the other end. The system is a chain of nodes, each receiving data from the node before and sending ...
0
votes
1answer
40 views

Implement a virtual tag on the database level

I have a set of objects, for which users manually applied tags, whatever they invented. I'd like to implement a task engine, where each task might be applied to objects from a tag. For convenience, ...
1
vote
4answers
161 views

Options for constructing an object that is not logically initialized until all fields are set

I am working on a Pokemon game at the moment, and am running into some design concerns. The easiest example is as follows: Each Species of Pokemon has several traits that are required before it is ...
0
votes
1answer
117 views

Global state of games(or other). Example : Waiting,Betting,Battling in gambling game

So I'm making a IRC betting bot. Basically the game/bot has three states of taking-in chat. State 1 : Betting If anyone says "!bet team money" parse it and record. State 2 : Battling Take nothing ...
0
votes
1answer
138 views

How would a modern website like Reddit divide up its website into Django apps? [closed]

Django uses apps to divide projects into manageable and reusable chunks. All examples in tutorials use polls or articles in unrelatable circumstances. In a modern example like Reddit (or even Amazon ...
2
votes
2answers
88 views

Entry point constructor vs init(),run() etc

Lets suppose we have some Js Widget, that includes three objects view, controller, model. var MyWidget=function(){ this.setModel(new Model()); this.setView(new View()); this.setController(new ...
51
votes
11answers
5k views

How do I avoid cascading refactorings?

I've got a project. In this project I wished to refactor it to add a feature, and I refactored the project to add the feature. The problem is that when I was done, it turned out that I needed to make ...
1
vote
1answer
120 views

Special parameters for behaviour, good or bad practice?

I really was questioning to myself where to ask this, as I could not decide myself. This is more of a software design question. Context I currently maintain a small Node.js module on NPM which ...
-1
votes
1answer
82 views

What differences are between “play-by-play”, design and implementation of an OS? [closed]

From two books' review Daniel Bovet and Marco Cesati. Understanding the Linux Kernel (2nd Edition or newer): Note: this book has some tendency to function as a play-by-play of what happens ...
0
votes
1answer
79 views

How should I structure an application containing business logic and display?

I'm working on a simple board game that will run in the browser. I'm thinking how to structure the program and I'd like to hear your opinions. The program will consist of the user interface part (the ...
0
votes
0answers
121 views

JavaScript program design: to what degree should I separate logic and display?

Consider you wanting to implement a simple game of checkers. There would be a rectangular game board and the player would able to move the pieces around according to a particular set of rules. ...
1
vote
0answers
124 views

How to separate out below tightly coupled classes

I have two classes which are somewhat tightly coupled to one another. Lets call them A and B. A derives from C and B derives from D. B is the class whose instance is created by the system and then B ...
0
votes
1answer
28 views

Scoping template variables in “has-a” (compositional) relationships

I'm developing a new templating language for PHP, and one of the features is an object-oriented approach to nested child templates. For example, I can declare an object of type HtmlBuilder like this: ...
1
vote
1answer
106 views

Repository pattern without entity framework?

Is it possible to implement the Repository pattern without using entity framework? I am working on a small dev team of 3 on a small scale (for now) ASP.NET MVC solution. I told my manager that I ...
1
vote
1answer
87 views

Are there any design pattern to data binding in event driven architecture?

I develop a browser based game with node.js in back and HTML5 canvas in front-end. It use WebSockets for communication. My plan is to generate business events in client side, e.g.: "finishJob". ...
0
votes
2answers
154 views

How can I (in general) program a website for mobile devices?

I really tried searching about this in the internet but came upon diverse search results which barely specified what must be done specifficaly. I'm now running ubuntu and php5 through nginx, amongst ...
0
votes
1answer
129 views

Suggestions on refactoring a poorly written ASP.Net MVC web application [closed]

I have recently "inherited" a project written in ASP.Net MVC which has quite a few issues and I'm looking for suggestions on how to go about refactoring the code. The technical issues found so far ...
3
votes
1answer
106 views

Deciding How To Split Up Architecture Using If Blocks

I'm having trouble deciding the best way to handle splitting up if block checks for different architectures. I may be handling the scenario completely wrong, so let me know if that is the case, or if ...
2
votes
4answers
237 views

Two classes that behave identically yet are semantically different

I am writing a program which is a similar to Ruby's Active Record Migrations, in which that every migration has both an "Up" and "Down" in terms of creating a change to the database, "Up" meaning ...