70,000 Trees

1 view
Skip to first unread message

Eric Phetteplace

unread,
Apr 19, 2008, 7:42:01 AM4/19/08
to TRINUG Exam 70-536 Study Group
Hello,

In class we were discussing having a program with "70,000" tree
objects in it.

The design pattern that makes your program efficient is the Flyweight
pattern.

Here's a URL to an explanation and some code:
http://dofactory.com/Patterns/PatternFlyweight.aspx

If you don't want to go through the hassle, make your Tree class as
bare as possible (unique features only, like age, size, etc) and put
all of the methods in a separate class.

Eric

Rafe

unread,
Apr 20, 2008, 7:45:37 AM4/20/08
to TRINUG Exam 70-536 Study Group
>The design pattern that makes your program efficient is the Flyweight pattern.

Does this flyweight pattern essentially provide you with a highly
efficient data structure in which you can keep track of your objects?
I don't quite understand what is going on in that pattern.

Rafe
Reply all
Reply to author
Forward
0 new messages