Question

I'm developing GUI for controlling and testing hardware device.

The GUI consists of many basic controls like textboxes and radio buttons which are mostly independent of each other - each control sends a command to device to read or write a parameter. And a couple of timer-based monitors querying the device for status every couple of seconds.

It was initially written as a WinForms application without any separation between view, data and communication layers.

There are no performance/scalability requirements. I'm looking for a better way to build something open for future modification for similar devices.

Which architectural pattern would be recommended for re-organizing such an application?

Edit: adding to helb's answer, I found this SO answer helpful in explaining different GUI architectures.

Was it helpful?

Solution

It seems that you are free to rewrite the entire software from scratch. I will assume so because you are asking for an architectural choice and not for refactoring tips.

Choose the architectutre which matches the problem best.

Start with the user needs, functional requirements and non-functional requirements. Especially non-functional requirements such as quality attributes (usability, maintainability, performance, scalability, etc.) play an important role when defining an architecture.

Only if all options are considered, a good architecture can result. Maybe your WinForms application should better be a web application hosted on the hardware itself or a set of automated tests. Just keep an open mind.

If, after careful consideration, you still conclude that an application with GUI is the best solution, consider refactoring the existing application with a strict MVC pattern in place or rewrite the application as a WPF application using a strict MVVM pattern.

Licensed under: CC-BY-SA with attribution
scroll top