Questions tagged [patterns-and-practices]
Design patterns (repeatable solutions to commonly occurring problems) and best practices in software engineering
21
questions with no upvoted or accepted answers
3
votes
0
answers
81
views
Should my application call statsd directly or should I call statsd based off logs?
I'm planning on incrementing counters in statsd based of various events within my application. I have logging in place for these events. So, from my viewpoint I have two options:
Update the ...
2
votes
0
answers
202
views
Managing application versions using Conan and RPM
I have a shared object that I developed. This shared object is packaged in two forms, a Conan package, and an RPM. It is a Qt project, so it has a .pro file associated with it. Up until now, we ...
2
votes
0
answers
381
views
What Design Pattern to use to render PDF pages for a PDF Proposal?
I want to create a set of patterns to use for rendering a PDF Proposal (a set of PDF pages). I have made a good start, but not clear on how to proceed when more complexity is involved.
I am using ...
2
votes
0
answers
174
views
Proper pattern to use when sharing large amounts of code and a similar control flow?
So I'm currently building an application that allows a user to fill out paperwork digitally, and then that information is taken in by the server and a PDF is populated and returned to the user.
The ...
2
votes
0
answers
268
views
Callback pattern handling exceptions - Best practices in .NET 3.5
I am looking to implement the callback pattern with error handling such that error is caught and pass to the callback code with the response. Since I am using .NET 3.5, I cant use Task (TAP) pattern ...
2
votes
0
answers
214
views
Pattern or solution for using classes with different interface the same way
What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
1
vote
0
answers
110
views
Reuse and sharing with primitives
I am having trouble naming and thus searching for the right keywords for a pattern I am seeing in my web applications and their associated difficulties. Here are some examples of the pattern I mean:
...
1
vote
0
answers
74
views
Composing objects: how can I enforce an interface upon each component?
My goal was to be able to create an object which is composed by other objects without having to know beforehand what these objects were, then do checks to see if they actually exist, then add them to ...
1
vote
0
answers
340
views
When "cloning" an object in javascript should the clone behave as the original?
I'm using the webgl framework three.js.
Most of the classes can be "cloned" via a .clone() method.
Wikipedia seems to be very strict when it defines "cloning".
In computer science, cloning ...
1
vote
0
answers
84
views
Making variables public in MVC pattern
In the MVC pattern, is it good programming practice to make all instance variables in the view(GUI) public so that the controller has easier access?
I started to make setters and getters for ...
1
vote
0
answers
135
views
Relying on file hash for data synchronisation across mobile and server
Imagine a client-server app that lets user upload images/documents etc. to server and then lets users who have access, retrieve and view them later on their
respective mobile devices.
So the flow is ...
1
vote
0
answers
208
views
Decreasing MongoDB Load
I have some stream workers. They are listening to twitter stream and save into mongodb. I need to aggregate saved tweets for intermediate analyze result. I have analyzer workers. They are periodically ...
0
votes
0
answers
130
views
Pattern for Nuget Package (Abstractions, DepedencyInjections, etc.)
I've been interested in following what other successful libraries are doing with their nuget packages. Unfortunately, I can't seem to find any materials to read online and I don't even know what to ...
0
votes
0
answers
75
views
Can someone suggest what pattern I used mistakenly and is it correct in this situation. Any alternative?
Client_1 uses --> IService_1 and thus Service1_impl
public interface IService_1
{
void DoTask_1();
}
public class Service1_impl : IService_1
{
private readonly IDepService_1_v1 ...
0
votes
0
answers
56
views
What best practices/principles could help me improve my routine call placement?
I'm trying to change my module's outline since I feel I'm blocking some reuse possibilities, but I don't know how to justify it under the lens of good practices/design principles. Keep in mind this is ...
0
votes
0
answers
51
views
Patterns for handling a Multi Responsibility Response string
We have an off shore group that is responsible for a SOAP service.
The service has a method that returns a key as a string, when everything goes correctly. When it doesn't the key is an error string. ...
0
votes
0
answers
42
views
Packaging for distribution: include CI config and other files the end user doesn't need in the package?
(Disclaimers: I have checked on Google and this site. I have read this answer, which is the only related one I could find here. Additionally, that answer is from 2017, and I wonder if things have ...
0
votes
0
answers
74
views
What should I do with too much interfaces needed for a dialog
Let me start by doing a small summary of the changes we did in our code in the last year. We have a software (VERY big) that is used to visualize multiples underground networks, enter data in the ...
-1
votes
1
answer
79
views
Is there any benefit/viability to sharing models across API versions that have differing schemas
I have been asked to get involved with a Team that is currently having delivery issues for various reasons. During my review I came across an acceptance criteria on a user story;
If you call v1 of ...
-1
votes
1
answer
107
views
How to reconcile CD with major architectural changes?
(This question is inspired by the SO blog entry Fulfilling the promise of CI/CD and this old question of mine: Why is it wrong to comment out code and then gradually remove it to keep track of what I'...
-1
votes
2
answers
44
views
Logic to create/update values while maintaining their uniqueness (in a multi-threaded environment)
Assume I have a dumb repository which stores numbers (for sake of this example). It is dumb because it may only create new record, update specified record and list all the existing records - no other ...