  The present note contains a review of $p$-energies and Sobolev spaces on
metric measure spaces that carry a strongly local regular Dirichlet form. These
Sobolev spaces are then used to generalize some basic results from the calculus
of variations, such as the existence of minimizers for convex functionals and
certain constrained mimimization problems. This applies to a number of
non-classical situations such as degenerate diffusions, superpositions of
diffusions and diffusions on fractals or on products of fractals.
