Exforsys

Online Training

Exposing the object structure from a list

This is a discussion on Exposing the object structure from a list within the Software Patterns forums, part of the Testing category; Hello, I want to use well known patterns for a problem I need to solve. I am finding trouble with ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-28-2004, 03:49 PM
fabiogr
Guest
 
Posts: n/a
Exposing the object structure from a list

Hello,

I want to use well known patterns for a problem I need to solve. I am
finding trouble with applying if in the moment - I am fairly new to
this, so please bear with me.

I need to design a class structure that looks like this at the moment


Client -------------------> List ---------------> External
Classes
| ^
| |
| |
--------------+---------------- |
| | | | | |
Obj Obj Obj Obj Obj------------+


That is, List is something of an iterator to an array. The List and/or
Objects have interfaces with external subsystems (to retrieve Object
properties) I do not want to expose. The Client is not capable of
adding or removing objects to the list, just modifying some properties
of each object. Now my question is, should I return the Object to the
client when it requests access, or use a "facade-like" structure in
which the List class controls access like this

List::SetCurrentObject(index)
List::GetObjProperty()
List::NextObject()

Or perhaps I should redesign Object so it does not have external
dependencies (keep the dependencies in the List class) and return a
reference to the Object to the client (and simplify List structure)??

Thanks for your help

Fabio
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 07:56 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.