Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958324

Pages: 1
Philippe Lhoste
Unregistered




Excellent article, poor example
      #19324 - 06/26/05 05:47 AM

Your article is truly excellent, one of the best I have seen on design patterns (even if I am just starting to read these). I look forward to the other articles (I started with flyweight because of the funny name and because it is not very well known/often mentioned).

The comments help understand some points too.

But I am a bit disappointed by the provided example. Indeed, it illustrates the pattern, with respect to the UML schema and as such helps understand how to implement it. But it shows little of the interest to use such pattern, as it is hard to see any improvement over the procedural implementation (more OO? How?).

I understand you have little room in this article, so you cannot put a complex example. Fortunately, you also give some more signifiant real world examples.

Note that your color example reminds me of Windows resource management: in a time were graphic cards has less memory than main boards , resources were limited. So one has to create logical-to-physical entities like brushes or pens. These managed scarce resources like colors in a limited palette, small space for graphic resources, etc.

So if you map your Line objects to material colors, it makes more sense. Does it? I hope I am not mixing things up.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 0 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5262

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5