I’m working on a small application, written in C#. The GUI is composed in XAML/WPF.
There’s nothing fancy about it. A user enters some settings, presses a button and waits for stuff to happen. However as the application has grown alot in the past weeks, the code is getting terrible. Really terrible. Fixups in places I feel they don’t belong. It’s slowly becoming a maintainability hell. And the application will still grow a lot in the near future.
I would very much like to refactor this in to more mature, maintainable code. If not for anything than to how to code and design an application better.
Since the user has no real way of knowing stuff is actually happening, I’m planning to add a status bar displaying some important stuff, so the user at least has some idea what’s happening.
Now, how should I go about doing this. My gui instantiates some object, which in turn instantiate other objects. I could just pass a reference to the gui-window through the application, but that’s just dirty. What do you guys recommend?
I’ve been looking into MVVM for a bit, but I’m not sure if that’s what I need. Any help?
For sure you need MVVM to put everything in order but what you’re facing is the common learning process.
Read as much as you can about MVVM and OOP (focus on OOP if you don’t master it a lot) and work with it until you feel REALLY comfortable with the code you wrote (you probably need some years to get to that level).
You have an amazing path in front of you.