Peel strips from the aubergine so that they are striped, then cut them into 5mm slices. If you’re going to salt them, do it now; otherwise just dry them with a clean tea towel. Heat about 5cm oil in a frying pan and fry the slices, turning them halfway, until they are golden brown on both sides, then drain very well on kitchen paper. Set the slices aside, ideally near the stove so they keep warm-ish.
Meanwhile, bring a large pan of water to the boil. If using fresh ones, peel the tomatoes by plunging them into boiling water for one minute, then lift them out with a slotted spoon and cool under cold water, at which point the skins should slip away. Roughly chop the tomatoes, removing the seeds if you wish (I don’t).
Crush the garlic cloves with the back of a knife so that they split but remain whole. Warm some more oil in a frying pan and add the garlic. Once the garlic is fragrant and lightly gold, remove it from the pan, add the fresh tomatoes (or passata) and cook until they collapse into a sauce. At this point, you can pass the tomatoes through a food mill back into the pan, or if you’re happy with the texture, simply tear in most of the basil, add the sugar if you think the sauce is too sharp, and a good pinch of salt.
Bring the pan of tomato water back to the boil, add salt, stir well and add the pasta. Cook it until al dente, then drain it. Mix the pasta with the sauce and a handful of salted ricotta, then divide it between bowls, top with several slices of aubergine, a little more salted ricotta and a couple more basil leaves. Pass around the remaining aubergine slices and cheese so that people can help themselves.