• 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

Type safe objects, or just String[]?

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

Are you guys (+ girls ) just passing String[] back and forth or do you have a Type safe object, i.e. a value object call Record, or Row with a getName, getLocation etc.

My initial reaction was to have a type safe object, but I cannot really justify it.

What are you lot doing?

Thanks,

Col
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Colin,

In the interface I used String[] of course, because that was required.

In my Data layer I had a Record class that wrapped around the String data.
In my Business layer I had a Contractor class (my assignment was Bodgitt&Scarper), which indeed featured methods like getName, getLocation etc.

Frans.
 
Colin Yates
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And may I ask what was your "justification"? The examiners didn't mark you down for this?

It is my natural instinct to do this, but I cannot justify why
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also thought it is just good practice. I didn't even occur to me that I would have to justify this.

If you feel that you must, you can probably connect it with the 'must' that your code should be readable for junior programmers.

Frans.
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic