View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000022 | KafkaEsque | Improvement | public | 2019-03-17 10:11 | 2019-05-24 16:56 |
Reporter | Oliver G. | Assigned To | |||
Priority | high | Severity | tweak | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 0.12.0 | ||||
Target Version | Fixed in Version | ||||
Summary | 0000022: Separate Responsibilities of the Controller | ||||
Description | The Controller class has too many responsibilities and it would be desirable to separate these responsibilities into separate classes: 1., Configuration Management (configHandler): inject the configHandler singleton whereever it is needed and try to remove/extract those parts of the code that have Feature Envy (e.g. when configHandler is used in connection with TopicMessageTypeConfig): 2., Kafka Service Layer: e.g. Number of Runnables executed by runInDaemonThread need only singletons like consumerHandlers injected, but probably do not need to be part of the JavaFx Controller 3., EventHandlers passed as parameter in setOnAction can be very likely extracted. Be aware that these EventHandlers will also benefit from 1., and 2., I will give prio high to this issue, since it can dramatically increase the speed of future develepmoent tasks. | ||||
Tags | No tags attached. | ||||
Please check my "cleanercode" branch for possible way, how the refactoring could look like. I introduced the concept of the BackgroundRunnable and extracted TopicsForCluster as an example. At the end of the day the BackGroundTaskHolder will probably turn into some kind of BackgroundTaskManager taking this responsibility completely from the Controller. Please give me feedback to this approach. (unfortunately this commit contains a little refactoring from the develop branch, too, sorry) |
|
In order to have the ability to split the Controller class, it could be very helpful to have the KafkaesqueAdminClient injectable. Therefore I continued development on my cleanercode branch. Please check my latest changes as well: https://github.com/grofoli/KafkaEsque/commit/169b1d503b55768cff21afe62fe47d8796f61e4f |
|