From phf at cs.jhu.edu Thu Sep 15 02:00:14 2005 From: phf at cs.jhu.edu (=?ISO-8859-1?Q?Peter_Fr=F6hlich?=) Date: Thu, 15 Sep 2005 02:00:14 -0400 Subject: [Patterns] Hello? Message-ID: <62afbf0ce1fefd55bc288377600ebed3@cs.jhu.edu> Hi all, Well, actually I don't know about "all," is anyone here? :-) Even if not, thanks for showing up for the first meeting, which already started to get "intense" in the most unexpected ways (and only in good ways of course :-). As I said, next week I'd like to briefly catch any remaining issues from chapter 1 regarding the basic OO principles, but then focus on chapter 2 which is their big motivating case study. This means that they'll explain *lots* of patterns on a fairly high level and illustrate their utility in the specific example system. In terms of our discussion, I'd suggest focussing on the big picture, not on too many individual patterns (we have the rest of the semester for that). So I'd like to consider the overall benefits and problems anyone can see with using these patterns, whether any of these benefits are more accidental to the chosen system, and maybe some of the implications of patterns for the overall architecture of the system. Feel free to disagree of course, it's not just "my" study group, it's "yours" as well. :-) If anything else comes up before the next meeting (maybe while you're reading the chapters) feel free to email the list and start chatting. Cheers, Peter -- Peter H. Froehlich <><><><><><> http://www.cs.jhu.edu/~phf/ OpenPGP: ABC2 9BCC 1445 86E9 4D59 F532 A8B2 BFAE 342B E9D9 From phf at cs.jhu.edu Mon Sep 26 01:54:07 2005 From: phf at cs.jhu.edu (=?ISO-8859-1?Q?Peter_Fr=F6hlich?=) Date: Mon, 26 Sep 2005 01:54:07 -0400 Subject: [Patterns] From Promit on Monostate Message-ID: <930fce7fee54ad01b8e3352d92832b4b@cs.jhu.edu> FYI... > From: Promit Roy > Date: September 23, 2005 02:09:11 EDT > To: patterns at cs.jhu.edu > Subject: Monostates > > So, I looked up a few articles describing the monostate pattern. > > http://www.objectmentor.com/resources/articles/ > SingletonAndMonostate.pdf -- this is a particularly nice doc on both > singletons and monostates. > > Short blurb: > To recap, the singleton pattern structurally enforces the fact that > you can never have more than one instance of a class at a time, and it > is obvious to the developers that they are dealing with a singleton. > On the other hand, the monostate pattern enforces the behavior of a > singleton without the structure of a singleton, e.g., the singleton > behavior is encapsulated from the developers. > > So why choose one over the other? > > "If you plan on deriving classes from the singleton and you want those > classes to be singletons, your better choice is monostate. That's > because all classes derived from a monostate are monostates. Classes > derived singleton classes are not singletons by default. You would > have to add the static method and attribute to each derived class." > > Some other articles: > http://www.devx.com/getHelpOn/10MinuteSolution/16361 > http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=147&rl=1 > > Promit -- Peter H. Froehlich <><><><><><> http://www.cs.jhu.edu/~phf/ OpenPGP: ABC2 9BCC 1445 86E9 4D59 F532 A8B2 BFAE 342B E9D9 From phf at cs.jhu.edu Mon Sep 26 02:05:38 2005 From: phf at cs.jhu.edu (=?ISO-8859-1?Q?Peter_Fr=F6hlich?=) Date: Mon, 26 Sep 2005 02:05:38 -0400 Subject: [Patterns] Reminder: Patterns for next Meetings... Message-ID: Hi all, Sorry that I have not updated the website yet, I will... :-) Here's just a short reminder on what we've set as our schedule: Week 3: Singleton, Monostate, and Pools (only Singleton is from the book) Week 4: Observer and Mediator (both from the book) Week 5: Composite and Visitor (both from the book) I hope I remember this correctly? Let me know if not... :-) I hope that the links Promit sent on Monostate are good for preparing that topic. As for pools, here's a summary that's decent: http://www.developer.com/java/other/article.php/626171 Here are two more Java-specific articles: http://www.javaworld.com/javaworld/jw-06-1998/jw-06-object-pool.html http://www.javaworld.com/javaworld/javatips/jw-javatip78.html There are some connections between pools and factories, as well as between pools and flyweights. I guess we'll get to some of those in the conversation. :-) Cheers, Peter -- Peter H. Froehlich <><><><><><> http://www.cs.jhu.edu/~phf/ OpenPGP: ABC2 9BCC 1445 86E9 4D59 F532 A8B2 BFAE 342B E9D9