Questions tagged [patterns-and-practices]

Design patterns (repeatable solutions to commonly occurring problems) and best practices in software engineering

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
102 views

Object attributes as special parameter objects in python

I am writing a library that can be used with some GUI and would like to be able to build an interface where user can see and/or change most of the object's parameters, and also write some of these ...
2
votes
0answers
72 views

Performance: Creating duplicate file

I have a Web server (Local) and File server(Remote). I need to create a duplicate of an xml file in the same location with different file name in the File server. The size of the file is random, but ...
2
votes
0answers
162 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
0answers
65 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
0answers
245 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
0answers
206 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
0answers
28 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 ...
1
vote
0answers
28 views

Doing operation on entity or dto

I use jpa and spring. I have facade where I convert habitually entity to dto. In the service layer, I call method to repository to get entity. For display, I need to do some operation on data. Is it ...
1
vote
0answers
123 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 ...
1
vote
0answers
111 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
0answers
443 views

Create account flow in microservices architecture with different services for account and auth

I'm developing an application based on microservices architecture. Currently my goal is to implement 'Create user' flow. But I'm not sure quite sure what is the right way to do it. My problem is as ...
1
vote
0answers
79 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
0answers
122 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
0answers
190 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
0answers
39 views

Implementing N-tier with Entity framework and repo pattern

I'm trying to clean up this code but can't figure out the best way to go about it. The UI will access the business layer and shouldn't know about EFContext in doing this I end up with an almost ...
0
votes
0answers
40 views

Internal design of Android app

I have an Android app which stores data in a file system. This file system synchronizes with a server when there is an internet connection available (but is designed to work without a network ...
0
votes
0answers
31 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
2answers
154 views

Design pattern for wrapping multiple apis into single api

I have 3 different libraries that provide depth data as well as gesture information. I need to wrap these libraries into a single simpler to use for user api. The apis I am trying to wrap provide a ...
0
votes
0answers
71 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
2answers
42 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 ...