The classical Dirichlet energy is the L^2 norm of the gradient of a function. Its study was initially motivated by problems from physics. There is also an abstract notion of a Dirichlet energy on a space of functions, and it is natural to wonder to what extent such an energy may be thought of as an integral of some sort of "gradient". In an abstract sense this problem was solved by Beurling-Deny and LeJan, who gave a structure which has the Leibniz (product rule) property of a gradient and is endowed with a Hilbert norm corresponding to the energy. I will describe joint work with Marius Ionescu and Sasha Teplyaev in which we give a concrete description of this structure on certain types of fractal sets and use this to give simple proofs of some results about Fredholm modules in this context. I will also discuss some consequences from work of Michael Hinz and Alexander Teplyaev.