Energy and Matter Transfer in Ecosystems