Hardy trained as an architect in Dorchester before moving to London to get a job . Hardy trained as an architect in Dorchester before moving to London in 1862 ; there he enrolled as a student at King 's College , London .