3
votes
1answer
66 views

Difference between patterns: Specification, Guarding, Conditions, Monads, Validation,

I'm currently trying to get my head around a few patterns (especially the ones mentioned in the title above) that are made to address different problems and are being used in different parts of the ...
0
votes
4answers
337 views

which pattern is most intuitive for a calculator app?

The title says it all. I'm trying to build a calculator application (for self-learning purposes). The application is going to have a very common UI, with plus(+), minus(-), multiply(*) and a divide(/) ...
1
vote
1answer
120 views

Are CRUD operations intended to be used with collections?

CRUD operations, by definition are... interfaces that permit users to create, remove, modify or retrieve data Implementations of CRUD interfaces can come in various shapes and sometimes they are ...
1
vote
0answers
159 views

Client side web application architecture - best practice & patterns [duplicate]

I'm inheriting some code that takes a rather different approach to architecture than I'd have chosen myself. It consists of a HTML page, some javascript library imports and a single DIV tag. This ...
2
votes
1answer
66 views

Queue of jobs in a different states and with different services around

I need to design a 'queue' of jobs (in a a very much UI oriented application) that can be run by a user and I need some other thoughts to pick optimal approach from ground up. My jobs can be in a ...
0
votes
1answer
116 views

Observing progress of a distributed system

For a distributed system, there is a requirement of observing the progress of smaller applications on distributed computers (runtime 5 - 20 minutes). There is a web fronted, which right now only ...
0
votes
1answer
246 views

Onion Architecture Structure

I am looking to understand and implement the Onion Architecture and have a vague idea on how to structure everything but need help to clear up some of my confusion. Based on different examples and ...
1
vote
5answers
212 views

Coupling business logic with class definitions

Perhaps it is my scripting background, but my perspective is that the purpose of an object should be to contain data. Classes are necessary in that they provide templates and standard ways to classify ...
3
votes
1answer
124 views

Pattern to use to relate multiple data sources to different user data widgets

I have an client x server intranet application the basically gets data from the server, format it and send that data to the client for display. At the server we are using ASP.NET C# running on IIS ...
0
votes
1answer
146 views

Why is the “app” folder now a (more) common pattern in web projects?

It might be related to the Yeoman project, or they might have adopted this from somewhere else, but it seems to be the default for all of their generators. Aside from Yeoman generators I've also ...
9
votes
2answers
226 views

Using packages (gems, eggs, etc.) to create decoupled architectures

The main issue Seeing the good support most modern programming platforms have for package management (think gem, npm, pip, etc), does it make sense to design an application or system be composed of ...
7
votes
1answer
121 views

Restructuring a large Chrome Extension/WebApp

I have a very complex Chrome Extension that has gotten too large to maintain in its current format. I'd like to restructure it, but I'm 15 and this is the first webapp or extension of it's type I've ...
0
votes
2answers
370 views

Why don't we completely de-couple frontend JS frameworks and backend APIs? [closed]

Whenever we implement a frontend framework in the likes of Backbone, AngularJS etc. there's an integration process involved with the backend technologies like NodeJS, Rails, Yii etc. (like setting up ...
0
votes
0answers
45 views

Organizing an image processing pipeline for on-the-fly video analysis

I'm trying to design a system that performs image analysis on video streams from the internet. I have a few rudimentary ideas for how to organize such a system, and I was hoping you guys could ...
0
votes
2answers
201 views

What is the Loopback Pattern? [closed]

I was reading this blog post about Hexagonal architecture and at the bottom it says: The Loopback pattern is an explicit pattern for creating an internal replacement for an external device. When ...
3
votes
1answer
136 views

Where do utility libraries fit in a layered architecture?

Consider this mock-up of a software stack designed with layered architecture in mind : Every application layer is decoupled through API calls, but a memory handling library is used throughout. All ...
0
votes
0answers
52 views

Modelling network and persistent entity representations

I have an app where I need to synchronize some entities (simply download latest versions of entities from server to client). Entity has bunch of text properties and bunch of resource links (referenced ...
1
vote
1answer
173 views

How to make my code decide which class to instantiate based on a parameter?

I have a system in which I will perform queries to a database. I want Query1, Query2 and Query3 to use the same methods in their way to the data source layer. To do that I would like to make ...
2
votes
2answers
132 views

Refactoring sought for replacing shared data types in .NET component

I am in charge with updating a software product that is made up of two components the Controller process and the UI process. The Controller and the UI communicate via XML messages. Furthermore, the ...
35
votes
11answers
4k views

Ensure that each class has only one responsibility, why?

According to Microsoft documentation, the Wikipedia SOLID principe article, or most IT architects we must ensure that each class has only one responsibility. I would like to know why, because if ...
0
votes
1answer
61 views

Contradiction of layered design and global data access for analytics reporting

While developing an application (mobile app for Android), our team always strives to use best development practices such as interfaces, layering and separation of concerns. When it comes to reporting ...
0
votes
3answers
141 views

Question/Answer for multiple Users - How should I design it?

I'm wondering about a good way to deal with a Question/Answer - Model for multiple Users. My goal is to have an efficient and readable model where all the results of my users are stored. Every user ...
0
votes
1answer
157 views

How to design a scriptable communication emulator?

Requirement: We need a tool that simulates a hardware device that communicates via RS232 or TCP/IP to allow us to test our main application which will communicate with the device. Current flow: ...
-1
votes
1answer
115 views

Should We Use Surrogate Primary Keys for Every Table? [duplicate]

We are developing a data model for a marketing database that will import transaction, customer, inventory, etc. files and the directive is ONE process that works for every client. We have been told ...
1
vote
2answers
121 views

How to build configurable forms?

I'm working on two separate projects now that are essentially just CMSs -- a bunch of forms for recording various bits of information. Each project is built to serve many clients, and each client ...
3
votes
2answers
169 views

Is it an acceptable practice to Get a property, that involve parsing binary, that might throw an exception?

I have a property that is loaded lazily, any time after the ctor is called. It is possible that the binary that my property relies on is invalid. If invalid I might have to throw an exception. ...
0
votes
3answers
217 views

“Property Container” design-pattern in-depth definition

Could anybody, please, explain what is a Property Container or at least where can I get information about that pattern on the Internet? I've found that it exists as one of the Fundamental patterns in ...
0
votes
3answers
285 views

Software architecture which allows for growth, real life situation [closed]

I know of Interfaces, Abstract classes that serve as Base class, I've been reading up on loose coupling, ... But I can't come up with a decent solution when a property of a class changes, and the new ...
1
vote
2answers
882 views

Why does java.util.Calendar use static factory methods?

It is considered better to have a separate factory class than having static methods in same class. See this question. But the standard API uses both approaches. Separate factory: ...
3
votes
1answer
372 views

Loose Coupling Presenter to View in MVP

We work in a Java shop here and our web application uses an implementation of the MVP architectural pattern. Our manager comes from a .NET world, where he has been exposed to the MVVM design pattern. ...
1
vote
2answers
1k views

Why separate class CommandHandler with Handle() instead of handling method in Command itself

I have a part of CQRS pattern implemented using S#arp Architecture like this: public class MyCommand { public CustomerId { get; set; } // some other fields } public class ...
1
vote
1answer
200 views

Recommended architecture for an interactive table widget with multiple behaviors in Javascript / jQuery

Use case: For an administration UI, I want an interactive table widget with a number of behaviors: Collapse / expand (yes, this means the rows are a hierarchy) Update of data in a child cell based ...
5
votes
2answers
425 views

Game server code design

I'm designing a multiplayer game server where the players are in rooms. Right now I have classes to take care of the client, networking, etc. I'm struggling however to find a design for this Room ...
0
votes
2answers
901 views

Model-View-Controller — Where does a factory class go?

I'm working (slowly) on a small Flask project. One of my models is a class called Post, which is a lightweight namedtuple. Post objects are created by a PostFactory, because creating a Post involves ...
0
votes
1answer
151 views

Several interdependent models, each with several data sources — how to avoid hell and nightmare

I'm currently working on a project that requires a complicated model structure and I'm struggling with picking the right architecture. First of all, there are several interdependent models. Change in ...
4
votes
1answer
250 views

Game development design patterns and architectures? [closed]

Some friends and me wish to develop a 2D game just for the experience of learning this paradigm. We are all software engineers with experience in business apps, but we are unsure if the typical design ...
0
votes
1answer
406 views

Procedural programming? [closed]

I'm about to set off on a journey to create a new report-generator for our in-house software. Our old generator is made in VB6, remotes Word, and pixelpushes images. And its slower than a sloth on a ...
0
votes
2answers
533 views

Can Dependency Injection used as an alternative to Reflection for creating instances

There is a piece of .net C# code which use Reflection to create an instance using Activator.CreateInstance(). This is an old piece of code and runs on the top of Enterprise Library. Is it a better ...
1
vote
3answers
527 views

MVC is a GUI Architecture or a Architecture to GUI and Domain?

Fowler refers to the MVC, as a GUI architecture: There have been many different ways to organize the code for a rich client system. Here I discuss a selection of those that I feel have been the ...
3
votes
4answers
331 views

How to avoid code duplication for a system which has logic that may change year wise?

What would be the way to design a system which has logic that may change year wise? There is an application which conducts online exams. There are five questions for a particular subject. The ...
8
votes
10answers
1k views

Is there really anything to gain with complex design?

I've been working for a consulting firm for some time, with clients of various sizes, and I've seen web applications ranging in complexity from really simple: MVC Service Layer EF DB To really ...
0
votes
0answers
254 views

Is Pure Fabrication (GRASP) only about 'behaviour' , is it the 'representational gap', or is it about actual 'reality'?

Does Pure Fabrication refer to the increased representational gap only in terms of behavioural responsibilities i.e. the software classes added to the domain model to handle ONLY behaviour, or does it ...
2
votes
1answer
153 views

Data Transformation Pipeline

I have create some kind of data pipeline to transform coordinate data into more useful information. Here is the shell of pipeline: public class PositionPipeline { protected ...
1
vote
1answer
111 views

Discovering functionality from parallel class hierarchy

I have an abstract syntax tree which I want to compile down to different representations. I am now struggling to arrange the classes in a way that new representations can be added easily. The easiest ...
3
votes
2answers
785 views

Validation and data persistence in a domain model

My (first and current) workplace (a .NET shop) suffers from an over-abundance of anemic domain models, to the extent that I don't really know how validation and data persistence should be handled in a ...
1
vote
1answer
256 views

Task Consumer/Processor architecture

PROBLEM We have various tasks in our system which can take up to 20 minutes. These tasks are generally started from the web interface and run on a new thread. This is obviously a terrible solution ...
1
vote
2answers
345 views

A better alternative to incompatible implementations for the same interface?

I am working on a piece of code which performs a set task in several parallel environments where the behaviour of the different components in the task are similar but quite different. This means that ...
1
vote
1answer
567 views

Where to validate domain model rules that depend on database content?

I'm working on a system that allows Administrators to define Forms that contain Fields. The defined Forms are then used to enter data to the system. Sometimes the Forms are filled by a human via a ...
0
votes
1answer
154 views

Geographically Distributed (Data & App) Architecture

Is there any design patterns (or best practices) for implementing a geographically distributed system (mostly a database)? Description: There is a network of warehouses and a central office. Now I ...
0
votes
1answer
210 views

Architecting Domain Layer and other modules with dependency injection in mind

I am currently new to Dependency Injection pattern. I am influenced by link by Mark Seemann. I have a confusion regarding whether an interface for an agent class of some agent module should be ...