From: James R. <sj...@jd...> - 2005-11-30 21:40:39
|
Hi Richard, On Thursday 01 December 2005 06:46, Richard Cyganiak wrote: > Hi James, > > Thanks for the patches. I think that adding external author metadata > (real names, but also email addresses and a link to a web page) is a > useful addition. But I don't like the way you've architected it. > Other users may want to get author data from other sources than > passwd files, and your patch would make it a bit hard to add other > sources. > > I'd suggest you change the patch to keep the passwd-specific logic > out of the core classes. Some ideas for this: > > - Store the real names not in the Author instances, but in a new > class, say PasswdFile, with a getRealName(Author) method. > - make PasswdFile an implementation of a new interface, say > AuthorProfilesIntegration, which has just that method for the moment. Ok, I think I agree in principle, but I don't like the name=20 (AuthorProfilesIntegration). How about just a superclass AuthorProfile, and= =20 subclasses like MavenAuthorProfile or PasswdAuthorProfile or=20 LDAPAuthorProfile ... ? I still think the method getRealName() should remain on the Author class.=20 After all, Authors *do* have real names. Maybe it could just call into the= =20 author's profile. I don't like the idea of having to say AuthorProfilesIntegration i =3D getProfileIntegration(); /* or whatever */ i.getRealName( author ); I think that's backwards. ;) Better to say =09 Author a =3D /* ... */ 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=20 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 =2D-=20 James Ring |