Design question.... parent/child class
Peter Hansen
peter at engcorp.com
Tue Sep 3 23:29:15 EDT 2002
Gumuz wrote:
> I'm sorry, I don't think I understand it correctly.
>
> Do you mean i should create a third Interface class just to communicate to
> the other class? Isn't that then just the same but with an extra class?
That's basically what I meant, but I wasn't really suggesting that
you needed to do that right now, just pointing it out as a possibility
to consider. It's not something you'd do if your code is still simple,
but *depending* on what SessionManager does in addition to this message
passing, it might be a necessary step to reduce complexity in the future.
As for "isn't it just the same?" I would say no, not if you end up
significantly increasing "cohesion" in the SessionManager class as
a result. Learn about "coupling" and "cohesion" (probably many many
pages on the web that give tutorials on these terms) and you'll
understand where I was coming from. (But I repeat, I'm *not* suggesting
you need to do that right now, if ever.)
-Peter
More information about the Python-list
mailing list