| Author |
Adding methods to DBMain
|
Sean Beecroft
Greenhorn
Joined: Dec 28, 2007
Posts: 26
|
|
|
For the purpose of making the code cleaner, I was thinking about deprecating methods in DBMain and then adding new ones that are more object oriented. I know I could be adding scope, but there are requirements to "be nice" to Junior developers and make the code easy to understand. Anyone have any ideas?
|
SCJA | SCJP | SCJD | SCMAD | SCEA(Underway...)
|
 |
William Smith II
Ranch Hand
Joined: Apr 26, 2007
Posts: 39
|
|
|
I wouldn't do it. Sun asked you to implement DBMain, so you do so. Besides, it's likely that the examinor will put your Data class through a set of tests (may include load tests), and if you deprecate methods, then the examinor will get results that weren't what he/she was expecting.
|
 |
Sean Beecroft
Greenhorn
Joined: Dec 28, 2007
Posts: 26
|
|
|
I choose not to alter the DBMain but instead to deprecate Data class. It still has the same functionality, it is just deprecated. Also I haven't changed the interface. My code looks 10x cleaner and easier to read now.
|
 |
William Smith II
Ranch Hand
Joined: Apr 26, 2007
Posts: 39
|
|
My assignment stated "Your data access class must be called "Data.java"" So in my opinion, you are not meeting the "must" requirement. Or I don't understand what you're doing.
|
 |
Sean Beecroft
Greenhorn
Joined: Dec 28, 2007
Posts: 26
|
|
That is a good point. Mine says the same thing. I will have to think about that. I have a bunch of JUnit tests that still can pass. I've just done a OO wrapper with classes like Database Record Key Field Metadata and so on. I did this to AID me during the next phase of the development. It is not a ton of code, but it makes the application so much easier to write / read / expand / use. As I understand it we get points for General considerations (100). Deprecating Data may be incorrect. I'll have to re-examine it I guess.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
"yogi yogi", please check your private messages.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Adding methods to DBMain
|
|
|