His father Alessandro Scarlatti was an influential Italian composer of operas and other vocal music. Domenico was born in 1685, the same year as J.S. Bach and Handel. He wastaught by his father and for the first half of his life composed operas and vocal music in imitation of his father. He was a skilled harpsichordist, and there is a story (likely apocryphal) of Scarlatti and Handel competing on the organ and harpsichord, where Scarlatti was deemed the better player of the harpsichord and Handel the better player on the organ.
Many of the 555 keyboard sonatas he composed were composed for use by the Princess as she was a skilled keyboardist. After he became her teacher, he virtually gave up composing vocal music and concentrated on sonatas for keyboard. With so many sonatas, identification by key is not possible. For example, there are 61 sonatas alone in the key of C. There have been different musicologists that have given numbers to the sonatas, with the first being Alessandro Longo who published all of the sonatas known with corresponding numbers. These numbers are abbreviated with an 'L' before the number. In 1953 the American Ralph Kirkpatrick published his biography of Scarlatti along with his renumbering of the sonatas in chronological order. These numbers have somewhat replaced the Longo numbers, but many times both numbers are given for a sonata.
The basic pattern is the same for nearly all of the sonatas. An example, the Sonata In C Major (K.133 L.282) begins with a theme in the home key of C major. After this theme there is other material that leads to a section in a minor key (C minor, parallel minor of C major) which leads directly to a section in G major, the dominant of the home key of C major. This constitutes the first part of the binary form and is repeated. The second part begins with the opening theme transposed to the key of E-flat major, the relative major of C minor. The second theme is referred to briefly, new material is presented, previous material is repeated in different keys, the 2nd part ends in the home key of C major and is repeated:
All of the sonatas are written in binary form, in two related sections that are both usually repeated. There are two or three main themes in each part with other material that binds the themes together. Key relationships are straightforward, with tonic-dominant-dominant-tonic being primary. Scarlatti varies his form (key relationship-wise) enough to maintain interest. His themes can be quirky, consists of huge jumps, hand crossings, all manner of techniques that make many of the sonatas unique to performance on a keyboard. There are some that have been transposed for guitar, but most don't transcribe very well.
The influence of Spanish music on the Italian Scarlatti has been the subject of much debate by musicians. The best evidence of the influence is most likely to be heard in the sonatas themselves. The repeated notes in Sonata In F Minor (K.239, L.281) as well as the bass line suggests the guitar. As the home key is F minor, major keys play the role of contrast in this sonata:
Another example of the influence of the Spanish guitar is the Sonata in D Major (K.119, L.415) not only in the repeated notes but by the thick texture of some of the chords that suggest the earthiness of Spanish gypsies and early flamenco. Hand crossings in the second part for each hand test the accuracy of the player:
Not all of Scarlatti's sonatas are fast. He wrote many sonatas that are slower, although some players still take them at a brisk pace. The Sonata In C Major (K.132, L.457) has a tempo indication of 'Cantabile', song-like. Musicologists think there is a good case to be made for performing the sonatas in groupings of two or three sonatas. A good example could be to play the following sonata and then the C Major sonata K.133 above. They are both in the key of C, one is slow, one is fast :
And then there are the sonatas like Sonata In A Major (K.209, L.428) with the designation Allegro, which can mean many different things. It can be a clue as to the tempo meaning bright, lively, or it can also give a clue as to the mood of the piece; happy. This sonata's mood seems to me to be a happy one:
There remains the problem of what keyboard instrument is appropriate for Scarlatti's sonatas. Purists argue for the harpsichord and clavichord, possibly the organ for some of them. Others say that as long as they are played with 'taste', the sonatas can be played on the modern piano. To me, it is a question of preference. I have heard performances on different kinds of keyboard instruments, and even on guitar, that are very good. There are some that sound better on the harpsichord, especially the ones that imitate the guitar. The harshness of thick chords with closely placed notes seems more appropriate to the spirit of the music than the same chords on a modern piano. But that's just me. Whatever the instrument, if they are played by a good musician that understands something of the time and the style they were written in, the performance will be musical.