Re: Implementing a folder object?
From: Dave Veeneman (davidv_at_nospam.com)
Date: 04/03/04
- Next message: Jon Skeet [C# MVP]: "Re: Is C# 2.0 syntax of Properties closed?"
- Previous message: BMermuys: "Re: Wrapping WinPCap"
- In reply to: Dave Veeneman: "Implementing a folder object?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 3 Apr 2004 05:20:13 -0600
One final note-- I tried short-cutting the implementation of the GoF
Composite pattern by simply slapping a Children property onto my Apples and
Oranges classes. I ended up needing a lot of tangled code to keep straight
whether I was dealing with a folder or an item. So, I've gone back and
refactored to implement the pattern as suggested by the GoF in both classes.
The lesson I learned: The GoF patterns are held in high esteem for a reason.
They really are time-tested solutions to recurring problems. Short-cutting
them can easily lead to more refactoring down the road.
-- Dave Veeneman Chicago
- Next message: Jon Skeet [C# MVP]: "Re: Is C# 2.0 syntax of Properties closed?"
- Previous message: BMermuys: "Re: Wrapping WinPCap"
- In reply to: Dave Veeneman: "Implementing a folder object?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|