William Henry wrote:
> Also consider this: though there are several ways to model for example
> an Envelope I bet you that most people would but a method on it called
> getAddress() (and probably a writeAddress()), or some similar semantic.
> Even though an Envelope is a very passive object. The idea that you
> might put this method on a Person object and have the Address on an
> Envelope as public might be more semantically correct in the real world
> but I don't know many OO patterns that would bother to attempt it this
> way. A Person object would just get way to bloated. We tend to put these
> actions on the object (grammar) rather than the subject even when the
> object is inanimate. So to assume that "OO" is somehow a perfect way to
> model the world is not correct.
What is at issue, is how these two objects interact. An envelope, when being
used by a mail system needs to divulge and address. The question is whether a
receipient or sender is set on the envelope, and the mail system asks for
getReceipent().getAddress() and getSender().getAddress(), or what. In other
systems, perhaps the envelope sender information is completely unnecessary to
know, and so we might just have getAddress(), which delegates to
getRecepient().getAddress(). In the end, you really do have to consider many
different issues. And, practice makes (more) perfect in software design. This
is why you really need to employ architects with domain experience that
measures
up to the complexity of the system.
> Also there were a lot of OO people in the early days of OO that had
> quite awful OO patterns. Many people latched on to these early patterns
> and never forgot them. E.g. passing an object by value all over the
> place - which people do all the time - ans some languages promote! In
> the real world it's true that objects move around but people use
> references all the time too. (This point does help your point about bad
> programmers ;-) So perhaps the truth is closer to yours - but not all
> those schooled in OO think it's harder to think this way.
This is where we are at with WebServices. Objects are being passed by value
everywhere.
Gregg Wonderly
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/service-orientated-architecture/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/service-orientated-architecture/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/