The branch of ecology that deals with whole communities and the interactions of the organisms within them.