From: Richard C. <ri...@cy...> - 2005-12-02 08:36:28
|
On 2 Dec 2005, at 01:14, James Ring wrote: > Hi all, > >> >> OK, you win. Let's have an AuthorProfile type. >> [ ... snip ... ] >> Would that cover your needs? >> >> interface AuthorProfileFactory >> Profile getProfile(String loginName); > > Not wanting to be overly picky, but I think it should be an > abstract class. > This is because you may want to add some behaviour to the factory > itself > later down the track (like what I was saying about multiple author > profile > sources, just as an example). That may be true, but let's turn the interface into an abstract class later down the track, when/if that common code actually emerges. > Also, I think it should be > > public abstract Profile getProfile( Author a ); > > Maybe, (again in the future) there are things about an Author apart > from the > login name which can help the factory build the author's profile. Yes, good point. Thanks. >> class AuthorProfile >> String getFullName(); >> String getImageURL(); >> String getWebPageURL(); >> + setters > > Looks good to me! This just leaves the question of where these > instances > will be kept. I still think Author.getProfile() is the best option. > If this > doesn't make sense because the Author class actually represents > something > other than the person making the changes to the repository, then > why not > call it something else and introduce the Author concept elsewhere? I'd like the design to be driven by code and features. So far, I have seen no evidence that any feature or code would require or benefit from the introduction of such a new class. Everything we want to do right now can be done in a reasonably clear and duplicate-free way using just the current Author (more like CVSLogin) and the new AuthorProfile classes. Let's introduce a new concept when/if some feature calls for it. Cheers, Richard > >> Richard > > Regards, > James > -- > James Ring > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through > log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD > SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Statcvs-users mailing list > Sta...@li... > https://lists.sourceforge.net/lists/listinfo/statcvs-users > |