Originally posted by Daniel Simpson:
My Data class is roughly around 650-700 lines of code for all of the DB interface methods that I implemented (including comments, class variables). I also have methods to read in the schema, cache records, test record validity by reading the cache. Is this wrong? Or should I think about having a class that only reads the schema. A class that Caches records? What do you think?
Should I read that as 650-700 for the entire source file, or "650-700 for the DB interface methods" (and some more for everything else)?
It's not "wrong" per se, but if the file is overly long you might lose some points in in the categories code clarity and OO design, which would be a shame. That's not for me to judge. In my opinion it would be safer to split up the class, e.g. into seperate classes for MetaData, Record, Validation, LockManager, CacheManager -- but the decisions are up to you.
SCJP 1.4, SCJD 1.4, SCWCD 1.3, ICSD:Websphere 5.1