  We show that diagram groups can be viewed as fundamental groups of spaces of
positive paths on directed 2-complexes (these spaces of paths turn out to be
classifying spaces). Thus diagram groups are analogs of second homotopy groups,
although diagram groups are as a rule non-Abelian. Part of the paper is a
review of the previous results from this point of view. In particular, we show
that the so called rigidity of the R.Thompson's group $F$ and some other groups
is similar to the flat torus theorem. We find several finitely presented
diagram groups (even of type F_\infty) each of which contains all countable
diagram groups. We show how to compute minimal presentations and homology
groups of a large class of diagram groups. We show that the Poincare series of
these groups are rational functions. We prove that all integer homology groups
of all diagram groups are free Abelian.
