From: Richard C. <ri...@cy...> - 2005-11-30 22:26:49
|
On 30 Nov 2005, at 22:40, James Ring wrote: > Ok, I think I agree in principle, but I don't like the name > (AuthorProfilesIntegration). How about just a superclass > AuthorProfile, and > subclasses like MavenAuthorProfile or PasswdAuthorProfile or > LDAPAuthorProfile ... ? Yeah, the name sucks. I think the class should not represent a single profile, but a method of getting author profiles. It's clear what the implementation classes would be, things like PasswdFile, MavenProjectFile, SourceforgeWebsiteScraper. Now find a good common name for these. AuthorProfileSource? > I still think the method getRealName() should remain on the Author > class. > After all, Authors *do* have real names. Maybe it could just call > into the > author's profile. Imagine that profiles may provide other things except real names. Email address, web link etc. There's no need to duplicate all these methods on both the Author and Profiles class. Also, I see no need why the Author class should know about the existence of the profiles. I want the Author class to remain as close as possible to the concept of a CVS login. We're discussing a presentation issue, and changing stuff on the presentation layer shouldn't affect the core CVS classes. (Actually, the Author class should probably be called CVSLogin. My suggestions may make more sense if seen from that point of view.) Richard > I don't like the idea of having to say > > AuthorProfilesIntegration i = getProfileIntegration(); /* or > whatever */ > i.getRealName( author ); > > I think that's backwards. ;) > > Better to say > > Author a = /* ... */ > a.getRealName(); > // or > a.getProfile().getRealName(); > > or something like that. > >> This is the same general approach as with File and >> WebRepositoryIntegration. Please have a look at how these classes are >> used for inspiration. Note that we have a couple of different >> WebRepositoryIntegration implementations, and adding new ones is >> easy. I'd like to have the same possiblity for external author data. > > That's fair enough, and I think it's possible with an > AuthorProfile, but I'll > send patches and see what you think. > >> Steffen, any insight on this? What would be a good way to support >> both Maven and passwd files as data sources? >> >> Cheers, >> Richard >> > > Thanks for your time. > > Regards, > James > -- > James Ring |