Code Fragmentation

CodeFragmentation refers to the comprehensibility problems that can result from:

Mitigating techniques include reorganizing the code into a more reasonable hierarchy of well-named containers (namespaces, packages/classes, etc.).

CodeFragmentation can be a result of OverArchitecting?, or inappropriate use of LotsOfShortMethods. It a consequence of violating the principles of YAGNI (in terms of creating unneeded abstractions) and DoTheSimplestThingThatCouldPossiblyWork.

- NaimRu

Would you mind posting an example of class(es) that you feel suffer from CodeFragmentation? --

[Not the page author:] EJBs are one example that comes to my mind - Bean, Local/Remote Interfaces, Home Interface, Deployment Descriptor... a single concept spread out over half a dozen files. The wish to mitigating the mental overhead that comes from such fragmentation probably contributes to the popularity of tools such as XDoclet, which put the fragments back together again ("defragmentation"?).


EditText of this page (last edited April 25, 2004) or FindPage with title or text search