Please search the forum for such questions, as they have been answered before.
Also, if you choose to use legacy dolfin there is plenty of literature on the subject, including:
The fenics book (2012)
and the fenics tutorial (2016) https://fenicsproject.org/tutorial/