Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 171

Comment by Filip Milovanović on By creating an architecture, it is better to have many classes that handles different scenarios, or a single one that handles all?

$
0
0
I'd lean on the side of many classes with narrow, well defined responsibilities, with equally narrow interfaces (by which I just mean the set of public members). This doesn't mean that a class cannot facilitate "multiple things" to happen by delegating to contained classes (or even to virtual methods of child classes), it's just that the responsibility of that class is to "orchestrate" a process - the pitfall there is if you try and make the orchestrator class have a "pass through" interface, exposing "for convenience" the underlying stuff (doing that defeats its purpose).

Viewing all articles
Browse latest Browse all 171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>