Did anyone ever implemented flyweight design pattern?
-
I'm curious about... :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Could you, please, detail your experience? For instance, what are (1) The kind of project requirements that made appealing that pattern. (2) The design issues you faced. Thank you in advance. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Could you, please, detail your experience? For instance, what are (1) The kind of project requirements that made appealing that pattern. (2) The design issues you faced. Thank you in advance. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CPallini wrote:
(1) The kind of project requirements that made appealing that pattern.
Not normally a requirements based reason. All things are (or should be) traceable back to a requirement but the flyweight pattern is mainly about optimizing memory/resource usage, which is not a requirement that a software developer should need. A generalization of a design scenario is the system will need to use the same small number of items I very large number of times, potentially infinitely. Does that help?
CPallini wrote:
(2) The design issues you faced.
None. It's a very simple design, all of the best ones are.... very simple. ;)
-
CPallini wrote:
(1) The kind of project requirements that made appealing that pattern.
Not normally a requirements based reason. All things are (or should be) traceable back to a requirement but the flyweight pattern is mainly about optimizing memory/resource usage, which is not a requirement that a software developer should need. A generalization of a design scenario is the system will need to use the same small number of items I very large number of times, potentially infinitely. Does that help?
CPallini wrote:
(2) The design issues you faced.
None. It's a very simple design, all of the best ones are.... very simple. ;)
led mike wrote:
Does that help?
Yes. Thanks a lot. I really appreciate your replies. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
I'm curious about... :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
I've never heard of it. What is it? Sounds like some kind of lightweight design approach.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
-
I've never heard of it. What is it? Sounds like some kind of lightweight design approach.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
Paul Conrad wrote:
I've never heard of it. What is it? Sounds like some kind of lightweight design approach.
...for a large numbers of objects, see, for instance http://en.wikipedia.org/wiki/Flyweight_pattern[^] :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]