[Adium-devl] Contact Controller Refactoring

Colin Barrett timber at lava.net
Wed Aug 8 04:40:44 UTC 2007


re: Naming

I like AIAddress for "AIListContact" and AIContact for  
"AIMetaContact". I think the naming helps us in what surely must be  
our ultimate goal, to satisfy the favorable end of jwz's law of  
software development. ;) I can't wait for AIEmailProtocolPlugin.m to  
land!

I've been doing some archeology on the contact controller mess. It's  
fascinating how it evolved. We use to have AIContactObject and  
AIContactHandle -- seems like the distinction was to deal with out of  
sync issues, because we stored all our group information locally.  
AIContactHandle then evolved into AIHandle which was the main thing  
protocol plugins dealt with.

A little later, it looks like the ContactController started  
transforming AIHandles into AIList* objects.

I'll bet if you looked at the file with the most churn in the  
codebase, AIContactController would be right up there.

-Colin

On Aug 7, 2007, at 8:45 PM, David Smith wrote:

> 	A little background for those just tuning in first;
> AIContactController is widely considered to be the single scariest
> class in Adium. It's complicated, it's critical to the application, it
> violates encapsulation left and right (look at all those methods
> marked "Private: for contact controller only"!), and up until earlier
> this year did crazy stuff like casting AIListGroups to AIMetaContacts.
> Refactoring it into something clean and shiny would be a huge win for
> the maintainability of the project.
>
> 	After discussion on irc today about the above, I wrote up a
> brainstorming document for a new contact controller API. Currently I'm
> not even touching on implementation. There's a lot of private methods
> in the contact controller as well, and things like metacontact on-disk
> storage to consider. This is just API. Peter and I have discussed it
> (which resulted in much new hotness being added for discussion!), so
> now I'm turning it loose: http://dscoder.com/contactcontrollerapithoughts.txt
>
> 	Suggested reading methodology: Open AIContactControllerProtocol.h
> next to this document, and compare each thing there to the proposed
> new design. If it's missing, consider why and/or where else it might
> be (I've tried to describe moves, but I'm sure I left some out).
>
>
> 												David
>
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com





More information about the devel mailing list