As i read in Effective java
Bloated class hierarchies can lead to bloated classes containing many methods that differ only in the type of their arguments, as there are no types in the class hierarchy to capture common behaviors.
and in Link
A bloated class often has many special cases: attributes or behavior valid for some instances but not others. Often programmers attempt to deal with special cases by introducing type tags.
and similarity is there between Tagged class to bloated class as in Effective java
it is mentioned that:
a class whose instances come in two or more flavors and contain a tag field indicating the flavor of the instance. instances are burdened with irrelevant fields belonging to other flavors.
so concluding both classes might have Tag Types/Fields and both classes are having so many implementations (so many features simulated in one class).
i got confused to these terminologies and i want to know that ,what is the difference between these two Bloated class and Tagged class??
"Bloated" is (somewhat) subjective, "tagged" is trivial to identify. "Bloat" can refer to many things; poor separation of concerns, missing encapsulation, differing levels of abstractions, and so on.
"Tagged" is less subjective, because there will be a field that defines the separation of functionality, abstraction, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With