Important composers of opera buffa include Carlo Goldoni and Baldassare Galuppi . Apart from Pergolesi , the first major composers of opera buffa were Nicola Logroscino , Baldassare Galuppi and Alessandro Scarlatti , all of them based in Naples or Venice .