Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

extending or modifying Data class??

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Group,
I'M through with my assignment, I have modified the Data class, but now i'm unable put any valid reasons for my choice in Design choice document.
can some body suggest me something in this regard!!
[ December 25, 2002: Message edited by: Chandu onwards ]
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simplicity.
 
Chandu onwards
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Don Liu,
Thanks for your continuous and timely response.
Thanks,
Chandu
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My pleasure! Good luck with your assignment!
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Don Liu:
Simplicity.

One of the attributes of a well-designed class is "coherence". An incoherent class does a number of different things that are loosely releated at best. A coherent class does exactly one thing and does it well.
To get coherent classes, it makes sense to look at them in terms of "responsibility". What does the class do? What is it responsible for? Anything that falls within that responsibility should go into the class; other tasks should go somewhere else. You keep on moving code around, splitting classes and reformulating your understanding of a class' responsibilities until each class has a single responsibility which doesn't overlap with any of the other classes (although such a responsibility may well decompose into multiple smaller responsibilities, e.g. the class that has the responsibility for providing access to a remote database may delegate some work to a different class that has the responsibility for managing record locks; these responsibilities are formulated at completely different levels and correspondingly these classes work at different levels).
Once you're clear about what Data is responsible for, you can decide where, say, a new method such as criteriaFind() goes.
- Peter
 
Not so fast naughty spawn! I want you to know about
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic