Fill a 5-quart kettle 3/4 full with salted water and bring to a boil for pasta.
Chop onions and cut eggplants into 1-inch cubes. In a large deep heavy skillet, heat oil over moderately high heat until hot but not smoking and cook onion, stirring occasionally, until softened. Add eggplant and salt and cook, stirring frequently, until eggplant is lightly browned.
Add 1 cup water to eggplant mixture and cook, covered, over moderate heat, stirring occasionally, adding more water, 1/4 cup at a time, if mixture becomes dry. Cook until eggplant is tender, about 10 minutes. Add tomatoes with juice and simmer, stirring vigorously to break up tomatoes, for about 5 minutes, or until mixture has a sauce-like consistency. Stir in garlic and basil and season with salt to taste and add Parmesan.
While sauce is simmering, cook pasta in boiling water until al dente and drain well in a colander. Add pasta to sauce and toss to coat. Divide pasta between 4 bowls and serve with dollops of ricotta on top.
Recipe courtesy of Gourmet Magazine