You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With commit 1ce80fa I implemented a callback system in order to be able to:
automatically get data (also on updates) from envControlDataService to module hardwareIrTrans
be able to update data from hardwareIrTrans to envControlDataService which eventually saves the data to file via ARE.
So in the end a two-way communication between envControlDataService and hardwareIrTrans is needed.
However it is not possible to just include the modules with angularJS dependency injection because it will result in a circular dependency circle, which leads to an angularJS error.
The current implementation is not the prettiest and in the end the architecture should be refactored in this way:
there is one dataService which is responsible only for storing data to ARE and notify other modules about updated data.
retrieving and saving data to this service will be done with public service methods
notifications about changes of the saved data will be done by a subscriber system. So all modules that want to be updated about data updates have to register to updates with a callback. Maybe the observer pattern would fit for this purpose: https://en.wikipedia.org/wiki/Observer_pattern
Currently the dependencies look about like this:
The text was updated successfully, but these errors were encountered:
With commit 1ce80fa I implemented a callback system in order to be able to:
envControlDataService
to modulehardwareIrTrans
hardwareIrTrans
toenvControlDataService
which eventually saves the data to file viaARE
.So in the end a two-way communication between
envControlDataService
andhardwareIrTrans
is needed.However it is not possible to just include the modules with angularJS dependency injection because it will result in a circular dependency circle, which leads to an angularJS error.
The current implementation is not the prettiest and in the end the architecture should be refactored in this way:
dataService
which is responsible only for storing data toARE
and notify other modules about updated data.Currently the dependencies look about like this:
The text was updated successfully, but these errors were encountered: