vendredi 3 août 2018

UML for smart home application

I'm trying create a basic, general UML Class Diagram for a smart home controlling application. I'd like to follow the OOP and SOLID principles so that the system could be broadened in the future.

The system has:

  • devices: these can be controlled through the system (like the heating could be lowered/increased)
  • sensors: they send some data to the main system (like a motion sensor)

So basically its an IoT system where the connected devices could be controlled and the sensor data would be collected and displayed/analyzed. To be honest I'm a bit lost on how to go about this. I started looking into programming design patterns. I was thinking about using:

  • Facade pattern: for the main component of the app that would control the subsystems (devices, sensors)
  • Command and/or Strategy pattern: for controlling the devices
  • Observer pattern: so the sensors can send their data to the system when they sense changes

I mainly want to define my interfaces, abstract classes and maybe some concrete classes. I was wondering if these patterns are really suitable and If I'm on the right track or I need other patterns.

Aucun commentaire:

Enregistrer un commentaire