Exforsys

Online Training

Implementation of association class?

This is a discussion on Implementation of association class? within the Software Patterns forums, part of the Testing category; Implementation of association class? I'd like some views on best practises for implementing association classes in OOPL code. Regards, // ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-25-2003, 06:23 AM
Martin R-L
Guest
 
Posts: n/a
Implementation of association class?

Implementation of association class?

I'd like some views on best practises for implementing association classes
in OOPL code.

Regards,
// Martin R-L
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-07-2003, 08:23 PM
panu
Guest
 
Posts: n/a
Re: Implementation of association class?

Martin R-L wrote:

>I'd like some views on best practises for implementing association classes
> in OOPL code.


Interestingly Smalltalk already has a class called Association.

This has two fields 'key' and 'value'. Associations can be
combined to form a Dictionary (a hash-table) which allows
you to access the values by the key.

If you want bi-directional associations, I would simply
add methods for creating and returning the reverse
dictionary, possibly with caching if the dictionaries
are big.

-Panu Viljamaa


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.