2

Problem:

  • Winform app for servicing different types of devices (approx. 10 types).
  • Some devices have more settings similar (or same) then the others.
  • Each device could also has software and hardware versions which could change the number of settings.
  • Every device has big number of settings divided into pages (tabs) and those settings could have different nature (bool, int, float, string, ...).

Question:
My question is how to solve this on design level (how to create objects and also GUI). Are there some patterns or best practises for app like this?

For example I could create the GUI separately for every device type, but some of them have the same "blocks" of settings so it should be best to create UserControl for this. But in this "block" there also could be some variations based on the device software versions.

EDIT:
I want to explain more clearly, what app I would like to create and I think that I found an analogy that is good enough:
Imagine that it is an app for setting cars control unit. Car mechanic can install this app on their laptop and then select car model from list of supported models and connect to any control unit they want and they can set everything in that unit. It does not matter if it is Mercedes CLA 180, Fiat 500 or Mustang GT. They can connect to it and the app will show them only the appropriate settings for specific car (and even specific firmware version installed on connected unit).

  • 1
    What do you mean by 'devices'? Are they all desktop based PC applications? – richzilla Apr 6 '18 at 13:29
  • Devices are real physical devices connected to the PC (Ethernet, COM, USB, ...). The app connects to these devices, downloads settings, allows edit settings and then sends settings back to devices. – Artholl Apr 6 '18 at 13:36
2

As i understand it, each device supports a range of features, and features may be common to more than one device? If this is the case, your software architecture should reflect this.

You can split your software into individual modules that support a given feature. Each of these can effectively be developed as a standalone piece of software with its own logic and UI.

Your main application then only needs to serve as a shell that only loads the features relevant to your particular device, and contains functionality common to all of your features (communications, logging etc.)

Visual studio is an example of this. The 'core' visual studio doesnt do much on its own, but you can add extra features depending on the workflow you want to support (you can see these during installation).

  • Yes, this is something I wanted to create and it is relatively simple for some features (like communication for example). But some "features" are consists from set of few values (one or two) and not all devices (or devices versions) use all these settings. Where is the line where I should create another whole feature or "just hide some controls"? – Artholl Apr 6 '18 at 14:09
1

Your question is not completely clear. But I will try my best to understand and answer it. I agree with @richzilla's answer. I can also think of another scenario.

Solution: You need to make a list of functionality that can be common (works everywhere) and different (Changes you need to make for different devices). Probably you will have an installation wizard for you software to install. When Installation wizard executes - that where you can define according to what version or what type of device, which functionality should be installed on machine. You may also define some values in your web.config while installing and your software will use these values throughout its life time.

Your basic installation will provide the common functionality that is required and different functionality can be optional (user gets to pick while installing), or type of devices the software is getting installed.

Important: You may have to consider all that situation and design to all the functionality. You can read about Dependency Injection for more information. That what you can use to integrate different functionality. If I understand correctly what you are designing and developing is very complex.

  • Thank you. I updated the question and I hope that it make it more clearer. – Artholl Apr 7 '18 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.