✅ Separating WinForms & Backend
Recently I've been put on a project for a company working on a windows desktop application. The app is made using winforms and C#. It works alright but the main problem is that all of the code is one homogenous blob. If you want to work on a part of the backend, there are front end components in the same file... This makes it very difficult to work with, and makes doing things like serializing classes to JSON basically impossible due to all of the winforms components within any given class.
I've started trying to separate the objects from the front end bits but its a lot and the more I separate the more convoluted it gets.
Am I doing this in vein, and if not are there any tools or strategies that could help? (no, I can not use AI due to this being NDA)
16 Replies
Also I was going to try and use class designer to assist, but havent been able to do that yet
U could try the model-view-presenter architecture
Hello..I can do this and how about working withme?
that would violate my NDA, sorry
thats what I was hoping to achieve, but I wasnt sure if there were tools that existed to make splitting the code easier
There are some frameworks, but i would impl. it myself to learn how this works. A link how to do it: https://stackoverflow.com/questions/6874262/mvp-framework-for-winforms
Stack Overflow
MVP Framework for winforms
i'm working in a new project and i want to implement MVP pattern. There is a framework for winforms that use this pattern? I checked CAB but my project isn't complex to implement it, i search for
the most useful tool you can use is testing, to know if you you're breaking stuff while refactoring
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
thank you!
it is a net9 project
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
I appreciate the advice, I will keep that in mind
thank you
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
very small, fully local app.
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
little to no people currently, deployment & updates will be handled by client after they get the app
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
I appreciate the concern, but that doesn't really apply in this case
There is no server, apis, etc. involved. I know it sounds nuts but the distribution of this app is not our concern as it is mostly just a rough draft of a proper application to come in the future
My point being the app can be refactored without breaking anything