[[!taglink AntiPattern]]
- methods operate on groups of objects
- only one instance of an object would ever exist
- procedural code is frequently easier to write
- object-oriented code is more difficult to understand
- operations on primitives are more efficient
- global methods are easy to invoke
- object instantiation is expensive for a single method call
- make all methods static (i.e., global)
When all methods are static, unit testing is difficult, since all classes are tightly coupled. There is no seam for dependency injection, so all validations must test the system as a whole.
Polymorphism is impossible, since static methods cannot be overridden. This makes it difficult to handle duplication and special cases cleanly.
Code reuse is more trouble than it's worth, because all code reuse is [[PasteDrivenDevelopment]].
- [[MonolithicServiceClass]]
- [[MonolithicTestFactory]]
- [[CommandPattern]]
- [[EncapsulateCollection]]
- [[ExtractClass]]
- [[IntroduceParameterObject]]
- [[MoveMethod]]