This is a classic version of parmigiana di melanzane as they would make it in Sicily. It would be eaten as a side dish there, but it's just as satisfying as a main.
2 pounds eggplant (about 2 large)
1 pinch salt, plus as much as needed for salting eggplants
1 small yellow onion, peeled and finely chopped
2 tablespoons extra-virgin olive oil
17 ounces bottled tomato passata (puréed tomatoes)
A handful of basil leaves
2 cups vegetable oil, for fryings, such as canola, sunflower, or peanut
8 ounces semi-aged caciocavallo cheese, grated (or Parmesan), or as needed
Peel the eggplants and slice them lengthways into 1/3 inch-thick slices. Layer them in a colander and sprinkle each layer generously with salt (don't worry, you will rinse it off later). Once all the slices are salted, place a plate on top and a weight (such as a tin of beans or tomatoes) and leave for 1 hour. During this time, the eggplant slices will weep a brownish, bitter liquid. (It's not so much for the flavor that you need to do this but because they will "drink up" less oil when fried if they are salted first.) Rinse them under cold water and carefully pat them dry with clean tea towels.
While the eggplants are draining, you can prepare the tomato sauce. Simply sauté the finely chopped onion gently in the olive oil until soft but not colored. Add the tomato purée along with about 6 to 8 basil leaves and a good pinch of salt and let simmer for at least 25 minutes, or until the sauce is as thick as you like it. Set aside.
Pour the vegetable oil into a wide and deep saucepan, preferably something that will fit about 3 to 4 eggplant slices at a time. Heat over medium-high. Test to see if the oil is hot enough by carefully dropping in a cube of eggplant—it should sizzle immediately. Fry 3 to 4 slices at a time, giving a few minutes on each side until they are evenly golden brown. Drain on paper towels and let cool.
Assemble the parmigiana by first spooning some tomato sauce in a thin layer over the bottom of a rectangular or oval ceramic or glass baking tray (the kind that you can also present at the table and the sort that you might use for lasagna is ideal). Place a layer of eggplant, then spoon over a layer of tomato sauce, a few torn up basil leaves, and a handful of grated cheese. Continue eggplant, tomato sauce, basil, and cheese, ending with a more generous layer of cheese. Bake at 350° F (180° C) for 25 to 30 minutes, or until bubbly with a golden-brown crust has formed. It's best to let it sit for about 15 to 20 minutes before cutting into it, and it's also delicious served tepid rather than piping hot.