- when you use a static you couple to an implementation and not an interface. You can not change the implementation without changing all dependencies.
- your statics are essentially global. Use of globals should be discouraged for the reason of intellectual manageability of your code. Strive to minimize the scope.
- using statics do not follow tenets of Object Orientation. Fine for your functional programming style but not OO.
- statics leads to all or nothing testing. Testing a single unit is much harder if not impossible.
Of course this crazy talk will eventually lead you to Ioc. See you when you get there.
No comments:
Post a Comment