Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: object oriented design question in context of Java program Date: Thu, 21 Jun 2012 11:33:27 -0700 (PDT) Organization: http://groups.google.com Lines: 24 Message-ID: References: NNTP-Posting-Host: 69.28.149.29 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1340303607 28836 127.0.0.1 (21 Jun 2012 18:33:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jun 2012 18:33:27 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 Xref: csiph.com comp.lang.java.programmer:15491 markspace wrote: > markspace wrote: > > > We'd have to see the whole code base, or a large part of it, to > > determine any further code smell. > > > Forgot to add: Martin Fowler's Refactoring: Improving the Design of > Existing Code is a good introduction to refactoring and code smell. If > you can find your design in his code smell descriptions, then you might > consider changing the design. In /Effective Java/, Josh Bloch recommends to prefer composition to inheritance. OP: You might be in a bad direction with inheritance ("is-a" relationship) rather than composition ("has-a" relationship). You need to share details. http://sscce.org/ Hand-waving and vague architectural generalities are all well and good, but it sounds like your problems are in the details. -- Lew