• 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

Re-design of data-handling system

 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eheh, here I go again. It will be the third time I redesign things. And the problem is - I try to make things more complex than they should be to pass the exam.

My new design makes use of pre-defined java exceptions; I do not define any of my own. I also have only four classes for handing io, caching and locking. Here they are:

Schema - defines and validates data-file schema.
IOStream - provides reading, writing, conversion methods for records
Cache - contains cache of active and deleted records.
Locker - contains locked records

I am still thinking of abolishing both Cache and Locker and going with static Maps in my Data class.

What do you guys think? Is it good enough? Could something be improved? I mean, for me writing the data-management system is the difficult part. I am doing it the third time: both two first times were too complex. Overcomplicating things is the bane of this assignment.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anton Golovin:

Schema - defines and validates data-file schema.
IOStream - provides reading, writing, conversion methods for records
Cache - contains cache of active and deleted records.
Locker - contains locked records

I am still thinking of abolishing both Cache and Locker and going with static Maps in my Data class.

... Overcomplicating things is the bane of this assignment.



Yeah, be careful with overcomplicating!

1. Why do you have a cache of objects?
2. Why would you make it (and Locker) static maps, as opposed to instance variables?
 
What a show! What atmosphere! What fun! What a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic