Tagged Questions
1
vote
5answers
192 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
48 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
137 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
218 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
101 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
253 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
28 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
180 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 ...
2
votes
1answer
120 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
41 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
164 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
131 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
60 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
139 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
112 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
106 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
95 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
164 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
167 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
268 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
603 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:
...
4
votes
1answer
274 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
849 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 ...
2
votes
1answer
183 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
399 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
703 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
145 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
225 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
402 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
433 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
400 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
324 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 ...
9
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 ...
1
vote
0answers
196 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
143 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
101 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
625 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
231 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
337 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 ...
0
votes
0answers
69 views
What are the pros and cons of running multiple instances of an app per marketplace?
One app to rule them all, and in the darkness, bind them.
I'm speccing out a client app at the moment.
The same service is to be delivered to two separate counties and the the content within: users, ...
1
vote
1answer
441 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
144 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
190 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 ...
47
votes
9answers
4k views
“Everything is a Map”, am I doing this right?
I watched Stuart Sierra's talk "Thinking In Data" and took one of the ideas from it as a design principle in this game I'm making. The difference is he's working in Clojure and I'm working in ...
3
votes
3answers
376 views
Alternative inheritance paradigms in object-oriented design
My apologies if a variation of this question has been asked before, but due to its nature it is hard to search for.
I am having a discussion with a colleague about object-oriented design, and it ...
3
votes
1answer
219 views
Patterns for Integrating search (ex. Lucene) into a .NET desktop application
I am making a .NET desktop application (WinForms+Local PostgreSQL Server) for managing sales in a small store.
I wish to integrate Lucene search facilities into the 'Product Search' module of my ...
4
votes
3answers
2k views
How to handle complex views (consisting of several parts) in MVC web application
Lets say I am writing a blog web application using MVC pattern. Typical layout for the main page of the blog application is - some kind of a post index in the main part, and aside there are some ...
1
vote
2answers
438 views
Very-Loose Coupling and Dependency Injection for Database Management
I'm currently setting up a MongoDB database for a web-app. I'm running node.js and using Mongoose to help manage mapping, validation ect.
I'm wondering if it's a good idea to really decouple MongoDB ...
2
votes
1answer
930 views
DI / IoC Abstract Factory Galore
Given a project architecture as follows, where each box represents an assembly (all are class libraries), and each arrow stands for a dependency:
Might be worth nothing that this project is massive ...