Comparing recommender systems requires common means for evaluating them. Nevertheless they have been so far evaluated through many, often incompatible, ways. This problem is mainly due to the lack of a common framework for recommender systems. In this paper, we propose such a framework. Within this framework, recommender systems are applications with the following composed objective: (i) to choose which (of the items) are going to be shown to the user and, (ii) to decide both when and how the recommendations will be shown. Starting from this framework, a natural metric emerges. We will complete the framework proposal by studying the proporties of this metric, along with a comparison of it with the traditional ones.