Haydn grew up in a pre-revolutionary time. The aristocracy sponsored artists. Noble worked as musicians and also played in their orchestras. Haydn was committed to contract of employment to write music as ordered by his employer and not to publish somewhere else. He was "Haus Officier" and "be modest, calmly, honestly and to come all time clean an in uniform".
The Viennese classical period (about 1780 to 1830) was an epoch, where the most important composers of that time lived in Vienna. The so-called "Classical Trias" consisted of Wolfgang Amadeus Mozart, Ludwig van Beethoven and Joseph Haydn. This time there was a transition of the severity of the baroque to more dynamic styles, a change from sacral to the secular music. This development was supported by the innovations in the instrument making, e.g. piano and guitar.
At the end of the classical period there is the romance. Beethoven was in later years representative of this transition, particularly Franz Schubert is a typical musician of the romance.