elb's Blog

Getting a Grip on Pidgin

People pretty regularly ask us for some sort of documentation overview of the Pidgin codebase. While there is a lot of documentation for the Pidgin API, none of it is big-picture type stuff, and this makes it hard to dive into the code and get started solving problems, particularly for casual developers. Now, I think often people are hoping for documentation which will make up for experience or programming knowledge, and we obviously cannot help with that, but it's true that some big-picture information could not hurt.

With that in mind, I whipped out xfig this evening and sketched up a quick architecture image. It's not UML, and it doesn't use any sort of standard notations, but it's not supposed to be anything like that. It gives a casual overview of the way the four major components of Pidgin (UI, Core, Protocol Plugins, and Plugins) "fit together":

A Brief Overview of the Pidgin Architecture

A single image is no substitute for architecture documentation, but hopefully it will help people see how it all fits together. Note, in particular, that the only interfaces upwards and downwards from the Core are via well-defined structures; this is probably the centerpoint of Pidgin architecture. Note also that a core plugin can use Core event hooks and code, but not UI event hooks or code, whereas a UI plugin is free to use both. Generally speaking, we try to keep the three vertical layers of Pidgin as well-divided as possible from the Core's perspective, while the other layers (and plugins, which are sort of separate from a design point of view) are free to munge the boundaries a little bit.

If you're a developer, even a new or inexperienced developer, and you'd like to help out Open Source Software or the Pidgin project but aren't sure where to start, picking a corner of the Pidgin architecture and documenting it (with the help of the Pidgin developers!) would be a great place to get your feet wet. As a bonus, when you're done you'll have the knowledge to start writing that feature you've always wanted!