File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Large Java Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Large Java Class" Watch "Large Java Class" New topic
Author

Large Java Class

Michael Feathers
author
Greenhorn

Joined: Aug 24, 2004
Posts: 24
Originally posted by Bert Bates:
My project is right at the "alpha" stage. Just a little bit more proof of concept and it will be time to do some refactoring. I've been having debates with my local OO guru about the size of classes. From a pure OO perspective, it seems like class size shouldn't be a concern, and one should worry only about concepts like cohesion and coupling. However, from a maintenance perspective I find that it's often easier to deal with a few smaller classes that work together than with one humongous class. If for no other reason than that I can have each class in its own window and see lots of stuff at once.

So, what do all you OO gurus do about this dilemma?


One of the things I think is neat is that when you look at the internal dependency structure of classes, often there's obvious partitioning. Sometimes it's worth doing an extract class and at other times it isn't.

I've posted some Feature Diagrams that I generated recently with a little tool I wrote.

The diagrams are of FIT, which is a very nice set of small elegant classes. I'll post some large awkward ones in a little while.


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0131177052/ref=jranch-20" target="_blank" rel="nofollow">Working Effectively with Legacy Code</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Large Java Class
 
Similar Threads
calling a batch file in java
Running Batch Files
NX: Modifying DBMain (but slightly)
Code size
Hibernate, Inheritance and storing as file