  In this paper we introduce a general framework for the study of limits of
relational structures in general and graphs in particular, which is based on a
combination of model theory and (functional) analysis. We show how the various
approaches to graph limits fit to this framework and that they naturally appear
as "tractable cases" of a general theory. As an outcome of this, we provide
extensions of known results. We believe that this put these into next context
and perspective. For example, we prove that the sparse--dense dichotomy exactly
corresponds to random free graphons. The second part of the paper is devoted to
the study of sparse structures. First, we consider limits of structures with
bounded diameter connected components and we prove that in this case the
convergence can be "almost" studied component-wise. We also propose the
structure of limits objects for convergent sequences of sparse structures.
Eventually, we consider the specific case of limits of colored rooted trees
with bounded height and of graphs with bounded tree-depth, motivated by their
role of elementary brick these graphs play in decompositions of sparse graphs,
and give an explicit construction of a limit object in this case. This limit
object is a graph built on a standard probability space with the property that
every first-order definable set of tuples is measurable. This is an example of
the general concept of {\em modeling} we introduce here. Our example is also
the first "intermediate class" with explicitly defined limit structures.
