Best practice for building modules using classes
A module is not a class by Crell is what you should read first.

The biggest OOP part in Drupal 7 is the new database abstraction layer (designed by the very same Crell and others). That implements many patterns which can and should be re-used.

For example:


Define interfaces for anything that could be switched out, only work against the interface internally. Example: SelectQueryInterface
A single class represents a single "thing". For example SelectQuery is a SELECT query, DatabaseConnection is a connection to the database and so on. See http://en.wikipedia.org/wiki/Cohesion_(computer_science)
Use of inheritance to allow to overide a certain implementation. Most classes in DBTNG can have a driver specific subclass, which is automatically used and included if existing. For example SelectQuery_mysql. How that is done.
Extenders, which are an implementation of the Decorator pattern to add additional functionality to the SelectQuery Class. Extenders can have driver specific subclasses too.


Something that is still controversaly discussed is Information hiding. DBTNG implements that by making class properties protected and disallowing direct access. On the other hand, we have hook_query_alter() and they can be changed almost freely with various by reference getter methods.