Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: What functions to submit

 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the contractors project and as most of you know you have
to provide delete, update, new and find in you data class even though they do not appear on the gui. For testing purposes I placed buttons on the gui and made them (delete, update...) fully functional (so in other words they were part of my DBClient interface and my gui controller has these methods). Now, I know I should remove the buttons from the gui, but should I take out the methods in my DBClient interface class and my Controller class and have them only in the Data class. Or should I
leave them in?
 
Adrian Muscalu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
I would leave the methods in. Part of my requirement states that the "interface should be designed with the expectation of future functionality enhancements [...]". I'd go as far as keeping the buttons on the interface and throwing a checked exception to specify that the feature is not implemented yet. This way, when the feature becomes available there is no need to re-compile the client code. It just gets activated.
It's a crazy idea, I'm not even sure I'd implement it but we are discussing possibilities...
Adrian
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO, I dont think the buttons should be on the interface. If the logic behind the button is not to be used, then I don't think they should be there. Think how confusing that would be to a user. But should the code
behind them remain everywhere else? Thats my big concern.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
But should the code behind them remain everywhere else? Thats my big concern.

I would'nt keep the unused code. I you do, you'll have to document it. Moreover, you've still the risk that something is wrong with it.
Best,
Phil.
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I would'nt keep the unused code. I you do, you'll have to document it. Moreover, you've still the risk that something is wrong with it.

Yes I thought of this but I have tested them from the gui extensively and
have put a lot of time to make sure my gui controller and DBAdapter
can handle them. Plus, I don't think they will ever use them but
it least shows I am thinking about future upgrades. On the downside
its more code that a "novice programmer" has to hash through.
What do you think?
 
Paul Tongyoo
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
Just noticed you added temporary GUI buttons to your app to test the "unused" create/delete operations of the DB object-- have you tried using the JUnit framework to write test cases for these operations instead? Helps you create confidence-building tests while keeping them out of your main codebase, so you can just leave the test code out at the end when you make your final distribution.

Paul
[ November 03, 2003: Message edited by: Paul Tongyoo ]
[ November 03, 2003: Message edited by: Paul Tongyoo ]
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I have done that. But even JUnit has some wholes in it in regards
to taking an action all the way through from GUI, to Controllre, to Adapter
and finally Data. I think I have decided I will leave the functions in
and place them at the bottom of each class that uses them and document
why they are still there. This way they are out of the way of the main
code but there are they are there to show I took serious consideration
into future upgrades.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
It looks like a good tradeoff.
Best,
Phil.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic