Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

B&S: Data class vs BodgittScarperData class  RSS feed

Posts: 28
  • Mark post as helpful
  • send pies
  • 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.

author and jackaroo
Marshal Commander
Posts: 12218
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!