• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

B&S: Data class vs BodgittScarperData class

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello fellow ranchers,

Here is my question. I have been reading a couple posts where you ranchers mention the Data and the BodgittScarperData class. Now as of right now I only have a Data class implementing the DB class. Where does this BodgitScarperData class fit in? Is this supposed to be the class that does the reading from the file and population of a collection class with all the Contractor records from the db flatfile? I am quite confused right now. Any thoughts would help me out a lot. I am able to get the UI showing the records on when there is no network connection. I think I am missing something fundamental that would enable me to fix the RMI stuff as well.

Cheers,
Surya
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Surya,

I think the BodgittScarperData class has mainly been mentioned as a way of illustrating a point (that business logic should not be in the Data class). I don't think that that the BodgittScarperData is something that is being regularly implemented, or that there is common functionality in such a class by those who do coincidentally have such a class.

The BodgittScarperData usually comes up in a discussion similar to:
  • person A: should my Data class' update method check whether the owner field is already in use
  • person B: whoa there - it sounds like you are making a Data class that is specific to Bodgitt and Scarper (or URLyBird), and not a generic Data class. Consider the supplied methods of the interface you have been given - nothing in them is specific to the assignment: you could use the same interface for a data file containing addresses or a data file containing billing details or .... If you include the check on the owner field in the Data class' update method then you are making a Data class that can only handle Bodgitt and Scarper data - in effect a BodgittScarperData class.
  • Person A: oh!
  • Of course, I could be wrong about the way it is described - there are undoubtably people who are creating a BodgittScarperData class that wraps Data class and ensures business logic requirements are met (possibly only exposing business logic methods). But I dont think that the BodgittScarperData class is commonly used, and if you don't need it, don't implement it.

    Regards, Andrew
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic