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

Initial Data class design for Urlybird 1.3.2

 
Nicely Brown
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I purchase the SCJD assignment just before Xmas last year, and because of work commitments have only just started looking at the problem.
Initially I thought I would abstract the RandomAccessFile (database) with a custom DataFile object, which would be a Singleton, therefore preventing threading issues.

This DataFile object would get the fields, magic cookie data, bytes[] etc from the RAF.

The Data.java would then use a reference to this object to get to the underlying data. My thinking behind this was that it would encapsulate the database file - so that Data.java would have no knowledge of the underlying code, it could in theory just plug into any data source.

Is this a bad design? Is my RAF abstraction object unnecessary? Should the Data.java access the RAF directly? Basically I am trying to encapsulate my database access code, but I am unsure whether application specific data (field lengths, location of delete flags within the RAF) should be known by Data.java or a seperate DataFile object?

- Nicely.
 
Thirumurugan Mylrajan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO, you can add a lot of stuff you want.. But its better to stick with the Sun's bare requirements.

I did lot of unwanted things mostly on the client side like MDI windows, Delete operation, checkout, update.. I ended up with almost 20 classes/interfaces.

Now when I think the examiner is not only going to look at the end product (the working software) but also the tons of code, it gives me creeps..

Better not to do more than what is required, as far is SCJD is concerned..
In real world its different...

Thanks.
[ July 06, 2006: Message edited by: Thirumurugan Mylrajan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic