Jump to content

Talk:Composite pattern

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DotnetCarpenter (talk | contribs) at 09:42, 1 November 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Why do you have to use such an inherently (reading wise) obfuscated language as PERL for your OOP design pattern example? Why not use something that most sane people use for OOP - something such as JAVA, or Python, or Ruby, or... (ad naseum) Don't get me wrong - PERL is a GREAT (!!) language - it just has the problem where it trips over it's own feet by allowing it's code to be so inherently obfuscated (think the PERL Obfuscation contest - or PERL Poetry)...


I added a Java example. Should this talk page now be cleared? Lathspell 21:25, 16 February 2006 (UTC)[reply]

This page needs cleanup. It does not feel very encyclopedic.

This has to be one of the most unprofessional UML diagrams I've seen for one of the most common patterns. As per the user above's complaint about the PERL, Java would be a better language, but in interest of neutrality I'd suggest doing the whole thing in a UML sequence diagram to maintain language neutrality. And can't someone with the GoF CD just quote and paste portions outlining the GoF example -- it's much better.

I added two links to discussions on the pattern. What is needed is a realistic example. For instance an example where the pattern is not used and then how refactoring it leads to the pattern. I have found several moderetaly convincing examples on the web but no really convincing one. Concerning language neutrality: UML sequence language is no more neutral than C++ or Java. MikalZiane 12:44, 26 June 2006 (UTC)[reply]

added an implementation of the simpler Java-example for ease of reading as opposed to the one given. The old one should probably be removed...

The large code listings of examples are worthless;

  • They're the same thing repeated, if you dont understand it in one language you're not going to understand it in the others. Dont even think about adding more examples. Pseudo code or Java should be sufficient.
  • They dont really show how the pattern maps directly onto code. There should be some explaination or diagrams.

I believe the quality of this article is the code examples as there is nowhere else on the web that both explains the theory and show concrete implementations. A encyclopedia should contain an explanation and history and/or a picture and/or video sequence and/or map and/or examples and/or links to other resources of a given topic. This article only does half and should therefore not be shorten in anyway that will limit the way it elaborate on the topic "Composite pattern". Someone should update (or add) a C# 2.0 example with generics. Also an example in Smalltalk should be added for completeness (a C# 2.0 implementation with the [C5] library and a Java implementation with the Java Collections Framework could also be added). --DotnetCarpenter 09:42, 1 November 2006 (UTC)[reply]

Pic

Can someone please add a picture? It would be really easy, just run one of the scripts and take a screenshot. (Please respond on my talk page.) tinlv7 11:15, 8 October 2006 (UTC)[reply]