From: James R. <sj...@jd...> - 2005-12-02 00:14:23
|
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). 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. > 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? > Richard Regards, James -- James Ring |