Qs about OO design 
Author Message
 Qs about OO design

Hi

[Using VB6]

I still making the transition from functional to OO programming and struggle
with the program design.

A scenario

I have an app which needs to select one or more person. I have a form
similar to the Outlook addressee form where I can select 1 or many people.
The selected persons will end up in a list box, the contents of which need
to be used elsewhere in my app.

I therefore created a collection class called CPersons (made up of the
CPerson class) which can hold the people selected if necessary.

Q1     Do I need both the collection and the listbox - am I not duplicating
the data. I tended to think that with OO you'd use a collection to hold data
selected and pass that around rather than pass around the list box.

Q2    Should the form driven from within the class (so I'd have a.Select
method which would then open the form) or is the class instantiated from
within the form ( so that the form would handle the populating of the
collection). This seems a bit like a chicken and egg situation

What's the solution ?

Thanks for your thoughts

Simon



Tue, 26 Feb 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB Design - None OO design Approach

2. 3 (4) tier Design / OO-Design

3. OO-Design Recommendation

4. OO Class Design

5. Designing a good oo program

6. **Job opening - OO Design and Arch

7. Implement an OO design in VB3...?

8. Architecture / OO Design

9. Beginner Question: OO or not OO?

10. OO for the non-OO programmer

11. DESIGN / CONCEPT QUESTION: Reconcile OO design with convenience of data-bound controls?

12. DESIGN / CONCEPT QUESTION: Reconcile OO design with convenience of data-bound controls?

 

 
Powered by phpBB® Forum Software