We study derivations and Fredholm modules on metric spaces with a local
regular conservative Dirichlet form. In particular, on finitely ramified
fractals, we show that there is a non-trivial Fredholm module if and only if
the fractal is not a tree (i.e. not simply connected). This result relates
Fredholm modules and topology, and refines and improves known results on p.c.f.
fractals.