Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > Object-Oriented Design and Patterns > abstaction in extreme. Is right?
  Last Thread   Next Thread
Thread Post New Thread    Post A Reply
Junior Member

Registered: Oct 2004
Posts: 1

abstaction in extreme. Is right?

I've got a problem with my design of 'value objects layer' in my j2ee-application.

Exist two posibilities: One option is create an abstact class called 'element' and derivate other classes called 'elementA', 'elementB' and so on. Show this:
/ \
/ \
elementA elementB

elementA and elementB are a generalization of element. Fixed-fields in 'element' are common in elementA and elementB.

In the order hand, only a class is defined, and instead of fixed fields, I define hashmap (in Java) to store pairs {name, value}.

The layer is reduced to unique class but I think object oriented concept is lost. Although if you change a class field (add a field), you have not to modify code-class, the hashmap is in charge on this.

What option do you choose?


Report this post to a moderator | IP: Logged

Old Post 10-05-2004 07:14 AM
KikeLG is offline Click Here to See the Profile for KikeLG Click here to Send KikeLG a Private Message Find more posts by KikeLG Add KikeLG to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:16 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2018, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.