TO COOK or not to cook? Whether to suffer the outrageous heat of the kitchen for the sake of a midsummer night's party? What a question! It's midsummer madness to toil over boiling pots during the longest days of the year.

So take a culinary cue from the Italians who dine on cool food in the open air. You'll find the question is no longer "to cook or not" but "just how far ahead shall I prepare?" For everything in this midsummer feast can be made as you like it--hours, even days, ahead of time. Tuscan bean soup simmered in the cool of the morning on the day before your feast is deliciously iced by party time. A roast prepared early in the day is perfect at room temperature that evening. With rice cooked the day before, a rice salad can be assembled any time. And ice cream cassata is cool work that can and should be made and frozen days ahead of time.

And what food these morsels be when Shakespeare, that master of midsummer magic, seasons them with "mint, savory, marjoram and marigold . . . and flowers of midsummer." Inspired by the Bard, simple Italian summer fare becomes the stuff of dreams.

All of Shakespeare's midsummer herbs are members of the mint family. They share a cool, aromatic quality, but each has its own food affinities, and some boast a lengthy history. The ancient Greeks and Romans freshened the air with sprigs of spearmint and peppermint. The French won't use mintat all. The British like it with lamb, and Middle Eastern cooks sprinkle it in just about everything from soup to nuts, polo to tabulleh.

The tangy flavor and cool aftertaste of mint is delightful with smooth, rich foods. Substitute mint for basil in a green sauce with walnuts--a different sort of pesto--and you have the perfect complement to a cool pure'e of Tuscan bean soup made from cannellini beans.

The king of the mint family is basil. (Basil means "king" in Greek.) The ancient Greeks, Romans and Indians believed it brought happiness to the grower. Certainly the herb's recent popularity in America has probably brought a lot of happiness to basil growers everywhere. Our import of basil doubled in the last six years, and local nurseries are hard-pressed to keep seedlings in stock.

Basil is easy to grow and even easier to cook with. Torn fresh basil leaves, scattered over freshly steamed vegetables, perfume them. It works in subtle and diverse ways with broccoli, thin slices of new potatoes, fresh artichoke hearts, roasted sweet peppers and the first slices of fresh summer tomatoes.

You can play Puck, transforming a rice and crab salad with a handful of the enchanting basil. Although you can use long grain rice for this salad, imported arborio rice makes a world of difference. Its plump grains remain toothsome, even when tossed with olive oil. First-quality arborio rice (usually sold in 500-gram sacks for about $1) can be found at many local Italian markets and specialty food stores. And though Italian cooks usually include tuna in a rice salad, the freshness, abundance and delicacy of fresh crab make it a most desirable changeling in this midsummer appetizer.

Savory and marjoram are a dynamic duo. Measure for measure, the piquant undertones of marjoram and the stimulating flavor of savory make a perfect summer replacement for the traditional (and heavier) combination of rosemary and sage. Thus, this variation on a classic Italian pork roast makes its summer debut as a cold roast strewn with these two more delicate herbs.

All's well that ends well--especially when it's an Italian cassata that ends the meal. It is the stuff of which sweet dreams are made--slices of genoise cake layered between two flavors of creamy Italian mousse--one chocolate, one maraschino and nut.

All of these cool, simple dishes travel well--a decided advantage for a party in the woods. But whether you picnic in a magical forest preserve, eat in the back yard or just open the windows wide, dining on cool food from Italy is a perfect way to celebrate the heart of summer. And it may be the only way to survive the heat. MIDSUMMER DINNER FOR EIGHT Rice salad with crab Cold puree of Tuscan bean soup with mint pesto Wine: chilled frascati Cold roast loin of pork Salad of summer vegetables Wine: valpolicella Loaves of French or Italian bread Cassata Wine: chilled champagne or asti spumante Espresso COOL RICE SALAD WITH CRAB (8 servings) 2 1/4 cups fine arborio rice Handful of fresh basil leaves, shredded 1 cup pitted black olives, sliced 2 tablespoons capers 1 sweet green pepper, diced 1 celery stalk, minced 2 tablespoons pimiento, chopped Juice of 1 or 2 lemons 1/2 cup olive oil 1/2 pound fresh crab meat Salt, pepper, nutmeg to taste

Add 8 cups boiling water to the rice and simmer for 12 minutes. If you are using long grain rice, it may take longer. Rice should be barely done, still toothsome. In a colander, rinse rice with cold water, drain and separate grains by tossing with a fork. Rice can be made ahead and refrigerated.

In a large bowl mix rice, basil, olives, capers, green pepper, celery and pimiento. Add the juice of one lemon and enough oil to coat the ingredients. Pick over the crab meat, breaking it into bits, and add to bowl. Season well with salt, pepper and nutmeg. Add more lemon if desired. Chill. Separate grains gently with a fork before serving. To take on a picnic, place rice salad in plastic bowl with tight-fitting lid and pack in the cooler. ICED PUREE OF TUSCAN BEAN SOUP WITH MINT PESTO (8 servings) 3 cups dried cannellini (white kidney beans) or dried great northern white beans or 4 1-pound cans of cannellini beans. 8 cups chicken stock Salt, pepper, summer savory to taste 3 stalks celery, minced 3 carrots, minced 1 large onion, minced Butter for sauteeing Mint pesto (recipe follows)

Soak the beans in water to cover for 3 to 4 hours. Drain. Return to the pot with 8 cups chicken stock, salt, pepper and generous pinch of summer savory. Simmer until tender. If using canned beans eliminate the soaking and simmering steps . Drain the beans, reserving the stock. Pure'e the beans with a food mill, food processor or electric mixer and set aside. Cook the celery, carrots and onion in butter until soft, not brown, then add to pure'ed beans. Stir in the reserve chicken stock until mixture is the thickness of cream. Chill and adjust seasoning when cold. Serve very cold with a generous spoonful of mint pesto. To carry on a picnic, pour the well-chilled soup into wide-mouth thermoses which have been rinsed with ice water. Carry the mint pesto separately. MINT PESTO 1/2 cup tightly packed whole mint leaves 1/2 cup tightly packed parsley (the flat-leaf Italian variety if possible) 1 cup walnuts 3 cloves garlic 1 hard-cooked egg Salt, pepper, cayenne 3/4 cup olive oil

In a food processor, blender or mortar and pestle reduce all the ingredients to a paste. Stored in a covered container, the pesto will keep in the refrigerator for a week. PORK ROAST WITH SUMMER HERBS (8 servings) 4 to 6 large garlic cloves 2 tablespoons dried marjoram or a handful of fresh, chopped 2 tablespoons dried summer savory or a handful of fresh, chopped 2 teaspoons salt 1 tablespoon freshly ground pepper 4 to 5 pound boneless pork loin roast Olive oil 1/2 to 1 cup cre me fraiche or sour cream Freshly chopped parsley for serving

Mince 4 garlic cloves. Mix with marjoram, savory, salt and pepper. Unroll the roast. Rub with olive oil and 2/3 of the spice mixture. Reroll the roast like a jellyroll and tie at 1-inch intervals with kitchen twine. Rub the outside of the roast with olive oil and remaining herbs. If you fancy garlic, slice the remaining cloves, pierce the roast all over and insert the garlic slivers. Roast in a 375-degree oven for 1 hour and 45 minutes to 2 hours, until a meat thermometer registers 185 degrees--but no longer. Cool and slice thin. For a picnic, slice the roast, reassemble and wrap in foil. Refrigerate if necessary, but remove at least an hour before serving. To make the sauce, pour grease off pan drippings. Add 1/2 to 1 cup cre me fraiche or sour cream and whisk until smooth. The sauce will be a mustard color. Check seasoning. Chill, but remove from refrigerator an hour before serving. To serve, spread a line of sauce across the slices and scatter with chopped parsley. For picnicking, carry the sauce and parsley in separate containers. SALAD OF SUMMER VEGETABLES (8 servings) Broccoli florets Cauliflower florets Tiny new carrots Tiny new potatoes, sliced Zucchini, cut in chunks Fresh hearts of artichoke Sweet green peppers Tomatoes 1/2 cup shallots, chopped 1 cup fresh basil leaves, chopped Juice of 1 or 2 lemon Salt, pepper Olive oil

A key to success with this salad is freshness. If you can't find new potatoes, omit them. If the cauliflower looks tired, skip it. If you haven't time to make fresh artichoke hearts, don't use frozen. Just get a good mix with some variety in color and be sure to include at least 6 green peppers and 4 tomatoes. Steam all the vegetables, except the peppers and tomatoes, until they are barely tender. Be careful, for each vegetable will have a different cooking time. A wok with a bamboo steamer is excellent for this task. To roast the peppers, place them under the broiler, turning with a fork every 2 or 3 minutes until all of the skin is charred. Place inside a paper bag and close it tightly. Let the peppers cool to room temperature, then seed and peel them. Cut into strips. Cut the tomatoes into wedges. Arrange all of the vegetables artistically on a large shallow platter. Sprinkle with shallots, basil and the juice of 1 or 2 lemons. Sprinkle with salt and pepper. Refrigerate until cold. Covered loosely, the vegetables will stay crisp overnight. Immediately before serving, coat generously with olive oil. To take on a picnic, wrap the platter of cold vegetables securely with plastic wrap and carry the oil separately. CASSATA (8 servings)

This dessert can be simplified by using a purchased sponge or pound cake. You can also make the genoise cake ahead of time. If protected in an airtight wrapper, it will keep for a few days in the kitchen or a few weeks in the freezer. The cassata itself can be assembled a week or two ahead of time and will keep perfectly in an airtight wrapping in the freezer. GENOISE CAKE 3 large eggs 3/4 cup sugar 1 teaspoon vanilla 1 teaspoon grated lemon rind Pinch of salt 1 cup sifted cake flour, returned to sifter 4 tablespoons sweet butter, melted and cooled Mousse (recipe follows)

Combine eggs, sugar, vanilla, lemon rind and salt in a bowl set over a pan of hot (not boiling) water. Beat with an electric mixer until batter is fluffy and warm to the touch. Remove bowl from basin of hot water and continue beating until the mixture is cool. With a spatula, gently fold about 1/4 cup of the flour into the egg mixture, resifting the flour as you add it. Alternate the last 2 additions of flour with melted butter. Fold gently and quickly, being careful not to deflate the mixture. Turn into a buttered 8-inch square baking pan, lined with waxed paper, that has been buttered and floured. Bake in a 325 degree oven for 20 or 25 minutes, until the cake is golden brown and shrinks slightly from the edge of the pan. Cool in the pan for 15 minutes. Unmold and cool completely on a rack. MOUSSE 2 cups whipping cream Oil for pan 4 ounces semisweet chocolate 2 ounces unsweetened chocolate 6 tablespoons brandy, cognac or rum, plus more for assembling 1 cup sugar 1/3 cup water 3 egg whites Pinch of salt 1/4 teaspoon cream of tartar 1/2 teaspoon vanilla 1/4 cup maraschino cherries, chopped 1/2 cup pistachios or almonds, chopped

Chill whipping cream, bowl and beaters. Prepare 2 8-by-4 inch bread pans by coating them with oil and lining the bottom with a piece of buttered wax paper. Heat both types of chocolate and 4 tablespoons of brandy in a saucepan until the chocolate melts. Stir together and set aside. Combine sugar and water in a saucepan. Boil until soft ball stage--237 degrees on a candy thermometer. Meanwhile, beat the egg whites until foamy. Add salt, cream of tartar and vanilla and continue beating until the egg whites are soft peaks. Gradually beat in the hot syrup. Continue beating the mixture until it's cool. Divide the egg white mixture in half. Add the chocolate mixture to half. Add the cherries, nuts and 2 tablespoons of brandy to the other half.

Whip the cream until the beaters leave traces on the surface, and the cream softly holds its shape. Fold half the cream into the chocolate mixture and the other half into the maraschino mixture.

Cut the genoise cake in half, split each half through the middle and sprinkle all sides with brandy. To assemble the cassata, pour 1/4 of the chocolate mixture into each bread pan. Add a layer of genoise cake, trimming if necessary. Add half of the maraschino mixture to each pan. Add another layer of cake to each. Divide the remaining chocolate mixture between the pans and smooth over. Wrap each pan in a plastic bag and freeze for at least 8 hours. To serve, run a knife around the sides of the cassata, loosening it from the pan, dip it in warm water and unmold. To carry on a picnic, wrap each mold, still in its pan and plastic bag, in newspaper and another plastic bag. Nestle the molds in 5 inches of ice in the bottom of a cooler. Add more ice. Carry the chilled wines on top. Remove molds from the ice a half hour before serving.

Carry the espresso in a thermos. Bring lemon peels in a separate bag to float on the top of each cup.