Hello,
Anyone who is preparing for certification in Object Oriented
Analysis and Design with UML can subscribe to OOAD_UML group at
http://groups.yahoo.com/group/OOAD_UML/
Cheers,
Bala
I'd love to give this a try. Did you get my email?
> I've used this technique recently and I am quite impressed with how
the test drives the design.
>
> I've got VisualStudio. Care to try?
>
Your problem reminds me of the bowling game example I read recently. It's a fly on the wall view of an Extreme Programming session where two guys write a bowling score card program. Read it at:
The article says, "We made lots of mistakes while doing this. Some of the mistakes are in code, some are in logic, some are in design, and some are in requirements. As you read you'll see us flail around...it's amazing the order that can arise out of such a messy process."
They wrote the test for the program first. When you do this box your problem within a context. You may adjust your context and your program at anytime. Anything is fair along the way. Lean solutions result.
I've used this technique recently and I am quite impressed with how the test drives the design.
Subject: [dpexplained] class complexity in a simple game
Nobody took a stab at my class design problem, I'll post another in the same problem space and see if anyone bites...
I've got a class named "ColoredShapeTile". A tile can be one of 4 colors, one of 4 shapes.
I'm writing a game where I generate 4 tiles (one of each color and shape represented), and the user has to guess the tile sequence.
The game gives clues such as: The red tile is not a square The blue tile is to the left of the green tile The diamond is yellow
The clue generator is "smart" in that it generates random clues that selectively eliminate some number of the 576 possible permutations of tile arrangements, until only one permutation remains. This prevents the game from generating not enough clues, or too many.
Anyway, I'm working on the class structure for the clues. I've got 14 different clue types (3 listed above). My current plan is a base clue class like so
Public MustInherit Class TileComboClue Public Sub New(ByVal t As TileCombo)
MustOverride Function ClueText() As String MustOverride Function CluePertainsTo(ByVal t As TileCombo) As Boolean End Class
and then 14 ancestors that represent each clue structure. The game will then generate the clue classes randomly and use CluePertainsTo to eliminate the 576 permutations.
BTW - this game is an example for a book I'm writing that teaches VB.NET through game programming, with some design topics thrown in, so I'd obviously like the game to exhibit "good design". I like this game as an example because it looks innocent from the outside, but quickly unravels to a pretty complex design problem under the hood.
Does anyone see a red flag in my clue class structure? I know the book says "favor composition over inheritence" - I'm not sure that could apply here.
matt tag
To unsubscribe from this group, send an email to: dpexplained-unsubscribe@yahoogroups.com
Nobody took a stab at my class design problem, I'll post another in
the same problem space and see if anyone bites...
I've got a class named "ColoredShapeTile". A tile can be one of 4
colors, one of 4 shapes.
I'm writing a game where I generate 4 tiles (one of each color and
shape represented), and the user has to guess the tile sequence.
The game gives clues such as:
The red tile is not a square
The blue tile is to the left of the green tile
The diamond is yellow
The clue generator is "smart" in that it generates random clues that
selectively eliminate some number of the 576 possible permutations of
tile arrangements, until only one permutation remains. This prevents
the game from generating not enough clues, or too many.
Anyway, I'm working on the class structure for the clues. I've got 14
different clue types (3 listed above). My current plan is a base clue
class like so
Public MustInherit Class TileComboClue
Public Sub New(ByVal t As TileCombo)
MustOverride Function ClueText() As String
MustOverride Function CluePertainsTo(ByVal t As TileCombo) As
Boolean
End Class
and then 14 ancestors that represent each clue structure. The game
will then generate the clue classes randomly and use CluePertainsTo
to eliminate the 576 permutations.
BTW - this game is an example for a book I'm writing that teaches
VB.NET through game programming, with some design topics thrown in,
so I'd obviously like the game to exhibit "good design". I like this
game as an example because it looks innocent from the outside, but
quickly unravels to a pretty complex design problem under the hood.
Does anyone see a red flag in my clue class structure? I know the
book says "favor composition over inheritence" - I'm not sure that
could apply here.
matt tag
Joe:
Some of these things can be tailored. Go to user preferences to try things out.
Also, the history line does duplicate your
history in the browser, but, as I typically keep my favorites up, this is one
line I use a lot.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in accomplishing
this through a combination of training and mentoring.
-----Original Message----- From: Joe Kuhn
[mailto:joekuhn@...] Sent: Tuesday, December 03, 2002
9:12 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] repost
of first step re wiki
I like the wiki. I've never
seen such a colorful wiki.
I'm not sure I like the history
line at the top. Doesn't this duplicate functionality in my browser?
Why say "Edit this
page"? It seems to me you could do without "this page" and
put the last edited part somewhere at the bottom if I really want to know.
Why say "Edit this page"? It seems to me you could do without "this page" and put the last edited part somewhere at the bottom if I really want to know.
Sorry, their stupid advertising is overlaying the message slightly.
We're not ready to move yet, but we're considering using a wiki for
the discussion group. Go to
//www.netobjectivesbooks.com/N_O_BookFeedback_Wiki
/owbase/default.asp
to try it out. We're starting with two general topics:
articles to read and books to read. Feel free to learn about wikis
and start your own topic. Feedback is appreciated.
The link above gets you to both the wiki for our public forum and to
our wiki for our books under development.
Hi:
I reposted this because the wrapping of the URL caused problems.
We're not ready to move yet, but we're considering using a wiki for
the discussion group. Go to
//www.netobjectivesbooks.com/N_O_BookFeedback_Wiki/owbase/default.asp
to try it out. We're starting with two general topics:
articles to read and books to read. Feel free to learn about wikis
and start your own topic. Feedback is appreciated.
The link above gets you to both the wiki for our public forum and to
our wiki for our books under development.
We're not ready to move yet, but we're considering using a wiki for
the discussion group. Go to
http://www.netobjectivesbooks.com/N_O_BookFeedback_Wiki/owbase/defaul
t.asp to try it out. We're starting with two general topics:
articles to read and books to read. Feel free to learn about wikis
and start your own topic. Feedback is appreciated.
The link above gets you to both the wiki for our public forum and to
our wiki for our books under development.
For right now we are staying at yahoo
groups and dealing with new members differently. Within 30-60 days we’ll
be moving to a wiki. I’ll notify you when that happens and move people
there automatically.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in accomplishing
this through a combination of training and mentoring.
-----Original Message----- From: Chris Falter
[mailto:chrisfalter@...] Sent: Saturday, November 30, 2002
9:10 AM To: dpexplained@yahoogroups.com Subject: RE: [dpexplained] more
pictures here
I do not quite grok what's happening. are we
staying at yahoogroups, but administering new members differently, or are we
moving to a wiki? And if so, where is the new site?
Thanks!
Chris
Alan Shalloway <alshall@...> wrote:
Great idea. I
didn’t know I could do that. I just set that.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective
software development without suffering. Our mission is to assist software
development teams in accomplishing this through a combination of training and
mentoring.
-----Original Message----- From: Charlie Poole
[mailto:cpoole@...] Sent: Wednesday, November 27, 2002
10:38 AM To: dpexplained@yahoogroups.com Subject: RE: [dpexplained] more
pictures here
Alan,
What I
did on extremeprogramming-seattle was:
1. Set
up so new members are moderated.
2. When
a new member first posts, the moderators get it for review.
3. If
it's obvious spam, we remove the member and the post without further ado.
4. If
it's a "real" post, we approve it and make the member non-moderated.
This
seems to be a bit less work than moderating all posts and it has completely
eliminated
our spam for the last few months.
Give me
a buzz if you need any more info on how to set it up this way.
Charlie Poole
cpoole@...
www.pooleconsulting.com
www.charliepoole.org
-----Original
Message----- From: Joe Kuhn
[mailto:joekuhn@...] Sent: Tuesday, November 26, 2002
5:44 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more
pictures here
Alan,
Here's a wonderfully done wiki
I work in nearly every day:
I could make it so members have to be approved.
That, or I can moderate the messages. Actually, we are probably
going to move this discussion to a wiki anyway. I was going to bring this
up in another couple of weeks. My company is going to be doing some
internal study groups. Internal, meaning these are things _we_ want to
study. We were going to do it on the discussion group, however, so
everyone would benefit. WIkis are better for this than yahoo groups, but I
want to see how we can control it.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software
development without suffering. Our mission is to assist software
development teams in accomplishing this through a combination of
training and mentoring.
-----Original Message----- From: K Rajesh [mailto:k_rajesh@...] Sent: Sunday, November 24, 2002 9:50 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to
stop this kind of spamming in future... Alan, thoughts please!!
Regards Rajesh
"Joe Kuhn"
<joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To:
dpexplained@yahoogroups.com
cc: (bcc: K
Rajesh/Satyam)
Subject Re:
[dpexplained] more pictures
here :
Whoever spammed this site with this owes us
detailed explanations on how to undo the changes it puts into IE.
Joe ----- Original Message ----- From: nivdfinqrwoc To: dpexplained@yahoogroups.com Sent: Sunday, November 24, 2002 4:57 PM Subject: [dpexplained] more pictures here
I do not quite grok what's happening. are we staying at yahoogroups, but administering new members differently, or are we moving to a wiki? And if so, where is the new site?
Thanks!
Chris
Alan Shalloway <alshall@...> wrote:
Great idea. I didn’t know I could do that. I just set that.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without suffering. Our mission is to assist software development teams in accomplishing this through a combination of training and mentoring.
-----Original Message----- From: Charlie Poole [mailto:cpoole@...] Sent: Wednesday, November 27, 2002 10:38 AM To: dpexplained@yahoogroups.com Subject: RE: [dpexplained] more pictures here
Alan,
What I did on extremeprogramming-seattle was:
1. Set up so new members are moderated.
2. When a new member first posts, the moderators get it for review.
3. If it's obvious spam, we remove the member and the post without further ado.
4. If it's a "real" post, we approve it and make the member non-moderated.
This seems to be a bit less work than moderating all posts and it has completely
eliminated our spam for the last few months.
Give me a buzz if you need any more info on how to set it up this way.
Charlie Poole cpoole@... www.pooleconsulting.com www.charliepoole.org
-----Original Message----- From: Joe Kuhn [mailto:joekuhn@...] Sent: Tuesday, November 26, 2002 5:44 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Alan,
Here's a wonderfully done wiki I work in nearly every day:
I could make it so members have to be approved. That, or I can moderate the messages. Actually, we are probably going to move this discussion to a wiki anyway. I was going to bring this up in another couple of weeks. My company is going to be doing some internal study groups. Internal, meaning these are things _we_ want to study. We were going to do it on the discussion group, however, so everyone would benefit. WIkis are better for this than yahoo groups, but I want to see how we can control it.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without suffering. Our mission is to assist software development teams in accomplishing this through a combination of training and mentoring.
-----Original Message----- From: K Rajesh [mailto:k_rajesh@...] Sent: Sunday, November 24, 2002 9:50 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to stop this kind of spamming in future... Alan, thoughts please!!
Regards Rajesh
"Joe Kuhn" <joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com To: dpexplained@yahoogroups.com cc: (bcc: K Rajesh/Satyam) Subject Re: [dpexplained] more pictures here :
Whoever spammed this site with this owes us detailed explanations on how to undo the changes it puts into IE.
Joe ----- Original Message ----- From: nivdfinqrwoc To: dpexplained@yahoogroups.com Sent: Sunday, November 24, 2002 4:57 PM Subject: [dpexplained] more pictures here
Great idea. I didn’t know I could
do that. I just set that.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in accomplishing
this through a combination of training and mentoring.
-----Original Message----- From: Charlie Poole
[mailto:cpoole@...] Sent: Wednesday, November 27, 2002
10:38 AM To: dpexplained@yahoogroups.com Subject: RE: [dpexplained] more
pictures here
Alan,
What I did on
extremeprogramming-seattle was:
1. Set up so new members
are moderated.
2. When a new member
first posts, the moderators get it for review.
3. If it's obvious spam,
we remove the member and the post without further ado.
4. If it's a
"real" post, we approve it and make the member non-moderated.
This seems to be a bit
less work than moderating all posts and it has completely
eliminated our spam for
the last few months.
Give me a buzz if you
need any more info on how to set it up this way.
Charlie Poole
cpoole@...
www.pooleconsulting.com
www.charliepoole.org
-----Original
Message----- From: Joe Kuhn
[mailto:joekuhn@...] Sent: Tuesday, November 26, 2002
5:44 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more
pictures here
Alan,
Here's a wonderfully done wiki
I work in nearly every day:
I could make it so members have to be approved.
That, or I can moderate the messages. Actually, we are probably
going to move this discussion to a wiki anyway. I was going to bring this
up in another couple of weeks. My company is going to be doing some
internal study groups. Internal, meaning these are things _we_ want to
study. We were going to do it on the discussion group, however, so
everyone would benefit. WIkis are better for this than yahoo groups, but I
want to see how we can control it.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software
development without suffering. Our mission is to assist software
development teams in accomplishing this through a combination of
training and mentoring.
-----Original Message----- From: K Rajesh [mailto:k_rajesh@...] Sent: Sunday, November 24, 2002 9:50 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to
stop this kind of spamming in future... Alan, thoughts please!!
Regards Rajesh
"Joe Kuhn"
<joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To:
dpexplained@yahoogroups.com
cc: (bcc: K
Rajesh/Satyam)
Subject Re:
[dpexplained] more pictures
here
:
Whoever spammed this site with this owes us
detailed explanations on how to undo the changes it puts into IE.
Joe ----- Original Message ----- From: nivdfinqrwoc To: dpexplained@yahoogroups.com Sent: Sunday, November 24, 2002 4:57 PM Subject: [dpexplained] more pictures here
2. When a new member first posts, the moderators get it for review.
3. If it's obvious spam, we remove the member and the post without further ado.
4. If it's a "real" post, we approve it and make the member non-moderated.
This seems to be a bit less work than moderating all posts and it has completely
eliminated our spam for the last few months.
Give me a buzz if you need any more info on how to set it up this way.
Charlie Poole cpoole@... www.pooleconsulting.com www.charliepoole.org
-----Original Message----- From: Joe Kuhn [mailto:joekuhn@...] Sent: Tuesday, November 26, 2002 5:44 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Alan,
Here's a wonderfully done wiki I work in nearly every day:
I could make it so members have to be approved. That, or I can moderate the messages. Actually, we are probably going to move this discussion to a wiki anyway. I was going to bring this up in another couple of weeks. My company is going to be doing some internal study groups. Internal, meaning these are things _we_ want to study. We were going to do it on the discussion group, however, so everyone would benefit. WIkis are better for this than yahoo groups, but I want to see how we can control it.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without suffering. Our mission is to assist software development teams in accomplishing this through a combination of training and mentoring.
-----Original Message----- From: K Rajesh [mailto:k_rajesh@...] Sent: Sunday, November 24, 2002 9:50 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to stop this kind of spamming in future... Alan, thoughts please!!
Regards Rajesh
"Joe Kuhn" <joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To: dpexplained@yahoogroups.com
cc: (bcc: K Rajesh/Satyam)
Subject Re: [dpexplained] more pictures here :
Whoever spammed this site with this owes us detailed explanations on how to undo the changes it puts into IE.
Joe ----- Original Message ----- From: nivdfinqrwoc To: dpexplained@yahoogroups.com Sent: Sunday, November 24, 2002 4:57 PM Subject: [dpexplained] more pictures here
I could make it so members have to be approved. That, or I can moderate the messages. Actually, we are probably going to move this discussion to a wiki anyway. I was going to bring this up in another couple of weeks. My company is going to be doing some internal study groups. Internal, meaning these are things _we_ want to study. We were going to do it on the discussion group, however, so everyone would benefit. WIkis are better for this than yahoo groups, but I want to see how we can control it.
Alan Shalloway, Sr. Consultant, CEO office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without suffering. Our mission is to assist software development teams in accomplishing this through a combination of training and mentoring.
-----Original Message----- From: K Rajesh [mailto:k_rajesh@...] Sent: Sunday, November 24, 2002 9:50 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to stop this kind of spamming in future... Alan, thoughts please!!
Regards Rajesh
"Joe Kuhn" <joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To: dpexplained@yahoogroups.com
cc: (bcc: K Rajesh/Satyam)
Subject Re: [dpexplained] more pictures here :
Whoever spammed this site with this owes us detailed explanations on how to undo the changes it puts into IE.
Joe ----- Original Message ----- From: nivdfinqrwoc To: dpexplained@yahoogroups.com Sent: Sunday, November 24, 2002 4:57 PM Subject: [dpexplained] more pictures here
NOTE: I posted this for matt because he was having troubles getting
his ID approved..................
Hello, there, Alan. I'm a purchaser of your "Design Patterns
Explained" book, and a fellow author. I'm writing a book on learning
Visual Basic.NET through the programming of some simple games. I'm a
longtime programmer, with some good object-oriented experinece, but
fairly new to "good" design practices and design patterns. I'm
wondering if you could lend a quick opinion on a design issue.
As a matter of coincidence to your book, my problem space has to do
with shapes (I wrote many of the games in my book back in 1993/94
using VB4, in a decidedly NON-OOP way). I've got a series of "tiles"
with colored shapes on them (currently 4 shapes,
circle/square/diamond/triangle, with 4 colors
red/green/blue/yellow). I'm writing 3 games with the tiles. The
first of the games is a simple "memory" game that is a bit more
vexing than your standard memory game in that it is hard to remember
both color and shape of a given tile. The other two games play on
this theme as well. Anyway, don't want to make this email TOO big...
My first pass at designing the tiles for the games creates an
ancestor base class, and 4 variations for the shapes
(different "draw" methods). Color is a property on the base class.
The problem with this design is in the generation of tiles. The
memory game has will require pairs of matching tiles, 32 tiles in
all to cover 1 pair of each shape/color combination, 64 if I want
a "double" game where 4 of each tile exists. It seems that there
will be a great deal of "if/then" and "switch" logic when creating
the 32/64 tiles, which raises my spider sense to a bad design choice.
My 1993 VB4 solution was to use a color index (0-3) and a shape
index (0-3) on a single class, and to use standard interger loops
for the tile creation tasks. These seems to go well against the
advice in your book, where a rule of thumb tells me that "switch"
logic in a class might be an indicator that an inheritence solution
might be better.
This is my problem. The color index leads to bad design inside the
class, but the inheritence scheme seems to generate too much
complexity outside the class (in generating groups of tiles).
This "outer" complexity will only increase for the other 2 games,
which will involve random generation of tile sets (think Mastermind
for one game, and "the Blue tile is not a square" type clues for the
other)
Can you point me in the right direction for a possible solution? I'd
be happy to credit your assistance in my book (I've already
footnoted your work 2 or 3 times).
Much appreciated. Sorry for droning on,
matt tagliaferri
I could make it so members have to be approved. That, or I can moderate
the messages. Actually, we are probably going to move this discussion
to a wiki anyway. I was going to bring this up in another couple of
weeks. My company is going to be doing some internal study groups.
Internal, meaning these are things _we_ want to study. We were going to
do it on the discussion group, however, so everyone would benefit.
WIkis are better for this than yahoo groups, but I want to see how we
can control it.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in
accomplishing this through a combination of training and mentoring.
-----Original Message-----
From: K Rajesh [mailto:k_rajesh@...]
Sent: Sunday, November 24, 2002 9:50 PM
To: dpexplained@yahoogroups.com
Subject: Re: [dpexplained] more pictures here
Also important probably, is to work out how to stop this kind of
spamming in
future... Alan, thoughts please!!
Regards
Rajesh
"Joe Kuhn" <joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To: dpexplained@yahoogroups.com
cc: (bcc: K Rajesh/Satyam)
Subject Re: [dpexplained] more pictures here
:
Whoever spammed this site with this owes us detailed explanations on how
to undo
the changes it puts into IE.
Joe
----- Original Message -----
From: nivdfinqrwoc
To: dpexplained@yahoogroups.com
Sent: Sunday, November 24, 2002 4:57 PM
Subject: [dpexplained] more pictures here
http://www.geocities.com/npenvwihxupq/index.html
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
dpexplained-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
To unsubscribe from this group, send an email to:
dpexplained-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
I remove these as soon as they post.
Actually, I delete about a member a day who is obviously just intending to
spam. There are automated spammers now. Anyone with a funny name
that looks like a random selection of letters typically spams the site a day or
two later. I can usually recognize them and remove them as users but this
one got through. In general, anything that just says to look at a site, I
would be suspicious of it. Wait 24 hours and then try to see it on the
site. I will remove it from the message list so if it’s still there
it’s probably ok (but not a guarantee).
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in accomplishing
this through a combination of training and mentoring.
-----Original Message----- From: Joe Kuhn
[mailto:joekuhn@...] Sent: Sunday, November 24, 2002
8:51 PM To: dpexplained@yahoogroups.com Subject: Re: [dpexplained] more
pictures here
Also important probably, is to work out how to stop this kind of spamming in
future... Alan, thoughts please!!
Regards
Rajesh
"Joe Kuhn" <joekuhn@...> on 11/25/2002 10:48:51 AM
Please respond to dpexplained@yahoogroups.com
To: dpexplained@yahoogroups.com
cc: (bcc: K Rajesh/Satyam)
Subject Re: [dpexplained] more pictures here
:
Whoever spammed this site with this owes us detailed explanations on how to undo
the changes it puts into IE.
Joe
----- Original Message -----
From: nivdfinqrwoc
To: dpexplained@yahoogroups.com
Sent: Sunday, November 24, 2002 4:57 PM
Subject: [dpexplained] more pictures here
http://www.geocities.com/npenvwihxupq/index.html
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
dpexplained-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Whoever spammed this site with this owes us detailed explanations on how to undo the changes it puts into IE.
That was a bad example. Imagine a factory giving the client the shape
back as a reference and then the client calling display.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in
accomplishing this through a combination of training and mentoring.
-----Original Message-----
From: carlos [mailto:k_rajesh@...]
Sent: Friday, November 15, 2002 7:27 AM
To: dpexplained@yahoogroups.com
Subject: [dpexplained] Bridge pattern and auto-extensibility
In your discussion of the Bridge pattern, in the summary you say, (I
quote)
"A client dealing with the Bridge pattern will have only a derivation
of Shape visible to it. However, the client will not know what type
of Shape it has (it will be just a Shape to the client). Thus, I have
encapsulated this information. The advantage of this is if a new type
of Shape is needed in the future, it does not affect the client
object."
However, in the Java code sample, you have also said (I quote)
class Client {
public static void main
(String argv[]) {
Shape r1, r2;
Drawing dp;
dp= new V1Drawing();
r1= new Rectangle(dp,1,1,2,2);
dp= new V2Drawing ();
r2= new Circle(dp,2,2,3);
r1.draw();
r2.draw();
}
}
You have instantiated the new Rectangle and the new Circle in the
client, haven't you? How do you then say that if a new kind of shape
comes up the client object remains untouched? I am not an expert of
either Java or C++ but I am enjoying reading your book for the sheer
intellectual it is providing me.
Regards
Rajesh
To unsubscribe from this group, send an email to:
dpexplained-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
The client wouldn't know which resFactory to use - that would defeat the
point of the pattern. It would be _given_ the resFactory to use by an
object that knew which one was desired. This could be based on a
configuration file or an environment variable. In this way, the client
would be independent of the case being handled.
Alan Shalloway, Sr. Consultant, CEO
office: 425-313-3065. mobile: 425-531-0810
Net Objectives' vision is effective software development without
suffering. Our mission is to assist software development teams in
accomplishing this through a combination of training and mentoring.
-----Original Message-----
From: carlos [mailto:k_rajesh@...]
Sent: Friday, November 15, 2002 7:39 AM
To: dpexplained@yahoogroups.com
Subject: [dpexplained] Abstract Factory Pattern - a request
Hi folks,
I just finished the section on the Abstract Factory... as mentioned
in my earlier post, I am not roo conversant with Java or C++ and I
would appreciate it if someone could post a code sample of how the
client object would look... How would the client object know which
resFactory to use? and how would the resFactory find out whether the
client object needs a displayDriver or a printDriver.
Regards
Rajesh
To unsubscribe from this group, send an email to:
dpexplained-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
We had an extensive discussion about just this question about a year ago. Check the mail archive. I had several posts on the thread, so you could check under my name if you wish.
HTH,
Chris Falter
Hari Shankar Chavali <harishankar_chavali@...> wrote:
Hi Rajesh
visit this www.dofactory.com There are examples written in C#.So if you understand either C++ or Java you should be able to easily follow the examples
--- carlos <k_rajesh@...> wrote: > Hi folks, > > I just finished the section on the Abstract > Factory... as mentioned > in my earlier post, I am not roo conversant with > Java or C++ and I > would appreciate it if someone could post a code > sample of how the > client object would look... How would the client > object know which > resFactory to use? and how would the resFactory find > out whether the > client object needs a displayDriver or a > printDriver. > > Regards > Rajesh > >
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com
To unsubscribe from this group, send an email to: dpexplained-unsubscribe@yahoogroups.com
Hi Rajesh
visit this
www.dofactory.com There are examples written in
C#.So if you understand either C++ or Java you should
be able to easily follow the examples
--- carlos <k_rajesh@...> wrote:
> Hi folks,
>
> I just finished the section on the Abstract
> Factory... as mentioned
> in my earlier post, I am not roo conversant with
> Java or C++ and I
> would appreciate it if someone could post a code
> sample of how the
> client object would look... How would the client
> object know which
> resFactory to use? and how would the resFactory find
> out whether the
> client object needs a displayDriver or a
> printDriver.
>
> Regards
> Rajesh
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
Hi folks,
I just finished the section on the Abstract Factory... as mentioned
in my earlier post, I am not roo conversant with Java or C++ and I
would appreciate it if someone could post a code sample of how the
client object would look... How would the client object know which
resFactory to use? and how would the resFactory find out whether the
client object needs a displayDriver or a printDriver.
Regards
Rajesh
In your discussion of the Bridge pattern, in the summary you say, (I
quote)
"A client dealing with the Bridge pattern will have only a derivation
of Shape visible to it. However, the client will not know what type
of Shape it has (it will be just a Shape to the client). Thus, I have
encapsulated this information. The advantage of this is if a new type
of Shape is needed in the future, it does not affect the client
object."
However, in the Java code sample, you have also said (I quote)
class Client {
public static void main
(String argv[]) {
Shape r1, r2;
Drawing dp;
dp= new V1Drawing();
r1= new Rectangle(dp,1,1,2,2);
dp= new V2Drawing ();
r2= new Circle(dp,2,2,3);
r1.draw();
r2.draw();
}
}
You have instantiated the new Rectangle and the new Circle in the
client, haven't you? How do you then say that if a new kind of shape
comes up the client object remains untouched? I am not an expert of
either Java or C++ but I am enjoying reading your book for the sheer
intellectual it is providing me.
Regards
Rajesh
I consider the money I spent on this book as one of
the best purchases I have ever made in learning about
software development.
My $.02
--- dpexplained@yahoogroups.com wrote:
> To unsubscribe from this group, send an email to:
> dpexplained-unsubscribe@yahoogroups.com
>
>
>
------------------------------------------------------------------------
>
> There is 1 message in this issue.
>
> Topics in this digest:
>
> 1. question about OO Software Construction by
> Bertrand Meyer
> From: "Alan Shalloway"
> <alshall@...>
>
>
>
________________________________________________________________________
>
________________________________________________________________________
>
> Message: 1
> Date: Mon, 11 Nov 2002 18:18:42 -0000
> From: "Alan Shalloway"
> <alshall@...>
> Subject: question about OO Software Construction by
> Bertrand Meyer
>
> I was asked the following question off-line and am
> posting it here
> anonymously.
>
> First, your book Design Patterns Explained is an
> excellent companion
> to Design Patterns by the GOF. I am a Delphi
> Programmer and I love
> Object Oriented Programming. In the back of 'Design
> Patterns
> Explained 'you mention the book 'Object Oriented
> Software
> Construction' by Bertrand Meyer. Is the book worth
> the $75.00 price
> tag? I have many books that I would not have
> purchased if given the
> chance to look at first.
>
> ************
> I've not read this entire book but recommend it
> because Meyer's
> understanding of OO is first rate, it's a highly
> recommended book,
> and his philosophy of design by contract is
> brilliant. Basically,
> the cost of books is incidental in my mind if you
> actually read them
> and they provide good ideas for you (this one will).
>
> Whether it is worth it also depends upon your
> learning style. Some
> people learn better by thinking about a problem and
> some do better
> by doing something with the problem (learning
> through working).
>
> Possibly a disadvantage of this book is its volume -
> it is an
> incredible compendium of great ideas - but if you
> prefer to think
> conceptually and then figure out the rules yourself
> you may find the
> book daunting.
>
> Finally, another option is to get the book at a
> discount (check
> www.bestbookbuys.com in general and half.com in
> particular).
>
> Hope this helps.
>
> Alan
>
>
>
>
________________________________________________________________________
>
________________________________________________________________________
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
I was asked the following question off-line and am posting it here
anonymously.
First, your book Design Patterns Explained is an excellent companion
to Design Patterns by the GOF. I am a Delphi Programmer and I love
Object Oriented Programming. In the back of 'Design Patterns
Explained 'you mention the book 'Object Oriented Software
Construction' by Bertrand Meyer. Is the book worth the $75.00 price
tag? I have many books that I would not have purchased if given the
chance to look at first.
************
I've not read this entire book but recommend it because Meyer's
understanding of OO is first rate, it's a highly recommended book,
and his philosophy of design by contract is brilliant. Basically,
the cost of books is incidental in my mind if you actually read them
and they provide good ideas for you (this one will).
Whether it is worth it also depends upon your learning style. Some
people learn better by thinking about a problem and some do better
by doing something with the problem (learning through working).
Possibly a disadvantage of this book is its volume - it is an
incredible compendium of great ideas - but if you prefer to think
conceptually and then figure out the rules yourself you may find the
book daunting.
Finally, another option is to get the book at a discount (check
www.bestbookbuys.com in general and half.com in particular).
Hope this helps.
Alan