While making a minor update to the snews_pub module I noticed the encapsulation of the main data class SNEWSTiersPublisher is not enforced well. There are several utility classes in snews_pt_utils and snews_format_checker that must know all about the internal structure of SNEWSTiersPublisher. For example, the format checker includes lengthy conditional statements that depend on the published message type, which strongly couples the submodules and breaks the usual OOP design patterns. I foresee this becoming a potential maintenance headache.
This can be fixed with some refactoring and potentially use of an inheritance hierarchy for different message types, where each type knows how to internally check it's own message format for consistency. I have some thoughts but we should discuss if this is a good use of limited time.
While making a minor update to the
snews_pub
module I noticed the encapsulation of the main data classSNEWSTiersPublisher
is not enforced well. There are several utility classes insnews_pt_utils
andsnews_format_checker
that must know all about the internal structure ofSNEWSTiersPublisher
. For example, the format checker includes lengthy conditional statements that depend on the published message type, which strongly couples the submodules and breaks the usual OOP design patterns. I foresee this becoming a potential maintenance headache.This can be fixed with some refactoring and potentially use of an inheritance hierarchy for different message types, where each type knows how to internally check it's own message format for consistency. I have some thoughts but we should discuss if this is a good use of limited time.