0

We have a classic wpf line of business software at work. Put in a lot of data, save it, calculate some things, put out some useful data etc.

Visually we have a dockable pane setup, like visual studio or any modern software.

So of the top of my head, to create a new pane where you have simple data entry for a couple of fields you have to:

Create the entity, create the model, create the viewmodel, create the repository, register everything in the DI container, register viewmodels in viewmodellocator, wire up our setup to join pane/window/viewmodel, create/handle the permissions in about 5 places, create the validator, configure automapper mappings, create the menu entries. I probably forgot some, not many though.

At this point, you have not actually written any code specific for your pane / your task.

Is this a bad sign? Im conflicted, on one hand it seems overkill and every time i do it for a small pane it feels really silly. 2 hours to create basically 4 text fields.

On the other hand, there kind of is a lot happening. I designed a new entity, im able to map between entity and model, i'm able to persist it, validate it, everything gets displayed appropriately, all the permissions are handled etc. Everything always works and looks the same which makes things really easy to develop and really easy on the eyes. And the wiring takes the same amount of time for a screen with 4 text fields and a screen with 50 fields and complex calculations...

4
  • @gnat: The question is pretty specific. I work in WPF, and there are indeed a lot of moving parts, including wiring up things. Jul 13, 2020 at 21:45
  • 1
    I don't think anyone will be able to answer your question without having a deep knowledge of your code base. However, as someone who works a lot with WPF, I can tell you from my own experience that WPF makes it very easy (and sometimes even forces you) to write lots of boilerplate code and have quite a few abstractions. Take bindings as an example, with all its ICommands and PropertyChanged stuff.
    – Aleksander
    Jul 14, 2020 at 1:29
  • 2
    At this point, you have not actually written any code specific for your pane/task Really? Your entity, model, and viewmodel aren't specific to the task? Why did you create them then?
    – John Wu
    Jul 14, 2020 at 6:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.