Questions tagged [refactoring]

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
31 views

Decoupling redux reducer tests from state shape

Recently I have been refactoring state shape in a fairly large redux application, and I have found that one of the obstacles to doing to is that the tests for my reducers clearly have a lot of "...
3
votes
0answers
164 views

Are there downsides to writing PDO/mysqli statements into my code directly vs using my own redirect wrapper methods?

TL;DR: To access DB functionality in my codebase I currently use a custom layer throughout the code. The layer needs an upgrade in order to begin accepting prepared statements, which it currently ...
3
votes
0answers
614 views

Refactoring to avoid circular references

I'm working on an ASP.NET MVC solution that has two projects, WebUI and DAL. WebUI references DAL. DAL has the repository and context, while WebUI contains Authentication and Authorization classes. ...
2
votes
0answers
75 views

How to separate a serialization code from application in a large c++ project

I'm working on a fairly large c++ project which uses boost's serialization. The issue that I have with the way it is currently organized is that serialization is weaved into the main source code on ...
1
vote
0answers
145 views

How to decouple a message broker and its message handlers?

Project description: I have a nodejs project where I try to build a bluetooth mesh like network, each node consists roughly of 4 parts the frontend part, the message broker, a bluetooth client and a ...
1
vote
0answers
70 views

How to better factor classes that switch on type code

We have a persistence backed object, and it has a version field in the database. Assume there's lots of unrelated code in this class. # # We're branching on this "version" field, and we return one # ...
1
vote
0answers
139 views

Having a globally static cached list without breaking encapsulation?

I have a couple wrappers around third party APIs that allow me to retrieve information from certain web services. Querying these services can be rather time intensive, so in my older version of my ...
0
votes
0answers
42 views

CK Metrics - Lower Complexity by Refactoring

I'm suppose to identify 3 CK metrics and the most appropriate class to refactor so as to increase encapsulation, modularity and reduce the complexity of the following project According to my ...
0
votes
0answers
25 views

Gateway aggregation is only for microservices?

I started to work in an existing Angular app that consumes a monolithic Web API writen with .NET CORE. This API has dozens of controllers(routes). In one of the main screens, when one specific event ...
0
votes
1answer
87 views

How to factor apache httpd configuration?

I have a php application my_application, that needs to be ran in three specific ways (namely, dev, test, and prod) by httpd. That very application is deployed many times, one for each client (with ...
0
votes
0answers
67 views

Creating a common ancestor form in Visual Studio

I have 5 forms which in hindsight should have an ancestor descended from Form. Unfortunately, the common elements of the forms is a splitContainer and a listbox in one of the containers. Each form ...
0
votes
0answers
169 views

Refactoring expansive message architecture

I am currently working with a system that acts like a message bus. A message comes in to the service (WCF Windows Service hosted). The system then uses a service locator pattern to look up which ...
-1
votes
1answer
191 views

How to split my product into multiple variants

I have a product which is a combination of mobile apps and webapi . I am working web API. The webapi part created earlier and it build with layered model. Even thought this does not have a business ...
-1
votes
3answers
288 views

Refactoring - Resolve dependencies between legacy code used by third parties

I am developing two libraries in .Net Firs one it's a library with core functionality (named it Library.Core.dll) Let's focus in User class public class User { //set of constructors and ...