Re analysis of classical sonata allegro form:
Usually the first theme of the exposition is played in the tonic key (I). Then comes a modulating bridge. A contrasting second theme is played in the dominant (V). Then comes cadence material (some form of IV-V-I) in various combinations.
The development ensues, or, the "working-out" as Grove called it years ago, using many key changes, sequences, and metamorphosing of the two themes.
The recapitulation ensues in the tonic (I), followed by the second, contrasting theme, this time also in the tonic (I). The coda then follows, ending the sonato allegro form.
Beethoven, of course, took all this and changed it to meet his needs. But his early works still respected it. Starting with his piano sonata no. 12, he started tweaking it. Mozart and Haydn respected it, as archtypical classists. Most Brahms sonatas also follow it, although they use romantic harmonies, chromaticism, frequent third transitions, etc.
Read Charles Rosen, "The Classical Style" if you really want to know more...
All best,
Glenn