In chapter 9 "Bridge Pattern", you imply on page 133 (by asking a set of questions) that the design you diagrammed in figure 9-3 suffers from redundancy, low...
bruce_e_robbins@...
Oct 5, 2001 8:12 am
35
Sorry for the delay in answering this. See my embedded answers beginning with **** ... set ... the ... cohesion ... 3. ... *********** Yes, that's exactly the...
alshall@...
Oct 10, 2001 10:49 pm
36
With regards to Double Checked Locking Pattern, there are articles being published which tell that this pattern does not work for Java. because of Java's...
Chetan, The two ways I've seen are to: (1) Synchronize the getInstance() method (which the double-checked locking technique was trying to avoid). (2)...
It seems that the java code fragment listed in your book at page 261 needs some correction. The correction which I think are needed are listed as part of code ...
The question on the second approach is would separate threads still get one instance of the same object? I'm not sure. I'll dig around a little on this one. ...
Alan, Here's an example of what I'm referring to as the 2nd technique: public class Singleton { private static final instance = new Object(); public static...
... http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html ... __________________________________________________ Do You Yahoo!? Make a great...
I think the lazy instantiation would work. My concern is that since this whole problem is that there is an error in the synchronization code of the JVM, are...
Alan, Thanks for the prompt response. Checked out the link you had sent. The code now looks perfect. But just a quick question. Am curious to know to whom does...
I received this question off-line so I'm posting it anonymously here: Question: While reading your book on Design Patterns, I came upon a piece of code that...
Hello! Everybody! I'm the Chinese translator of the book "Design Patterns Explained". And I want to study more here. Please give me some help and advice....
What type of help and advice are you looking for? Perhaps you could tell us the questions you have, so that we may understand what type of help you need. Best...
Are you saying that all Java Interpreters have the same problem because the underlaying specifications for the synchronization code is incorrect or.... that...
From what I have been told, all JVM's have this problem. It is somewhat a controversy over whether it is the fault of the JVM or of the pattern tricking the...
OK, I'll give it a try in explaining the DCL and JMM issue. I'm no expert, but I do write multi-threaded code that needs to share resources (e.g. using a...
Tom: Great explanation. That matches my understanding. Someone, I'll look for the article later, says the JMM shouldn't allow for the re-ordering of the code...
Further to the resources already mentioned, this one provides another good explanation and has been signed by some Java community heavyweights (e.g. Joshua...
Thanks. And he confirms static initialization works. Alan Shalloway Sr Consultant, 425-260-8754, http://www.netobjectives.com ... * Sign up for our free...
Please click "Photos" to look my photo. The one in black is me. The other one is Mr. Hou, The translator of "Effective C++", "More Effective C++", "Essential...
The best way to learn a pattern is if you can identify that it may apply to some problem you have. Then, try to use it. See where your solution matches the...
Now I've left college and working in an Magazine -- "Programmer". On the other hand I'm going to have a column on an free e-Magazine. I wish to introduce...
Hi, I just started to read about "sofwtare Reengineering Patterns". I am familiar with refactoring techniques to improve the design of the code but want to...
I don't think this is an inappropriate forum. There is a definite relationship between patterns and refactoring as well as patterns and XP. I started writing...
I agree with you that "Patterns tell you how to handle the case when you have multiple ways". Specifically for reengineering, I think prior to this,...
I think we can definitely say that: "reengineering should be done as a process and ... One of the factors in looking at this is why are we refactoring in the...