If I lived in an apartment and could only grow something on the roof or in a windowbox, I would grow lettuce. Fresh heirloom lettuce direct from your garden just has no competition from anything you can get in a supermarket. I like to grow a mix of lettuces. As soon as the soil warms up to about 35-40 degrees, prepare your soil and plant lettuce. Lettuce seed is fine, so prepare a fine seed bed. That means simply fork up the soil so it is loose. Then, using a dirt rake, rake out the clods. I use a hand cultivator alot when preparing fine seed beds.
Then make your little depression from 1/8 to 3/4 inch deep. If your soil is heavy, keep the seed shallow. If your soil is light or sandy, and the weather is warm, plant on the deeper side. Plant the seed about 1″ apart in rows about 5″ apart. I tend to plant to thick and must always thin. But I don’t mind. I usually transplant the thinnings when they are about 3-4″ tall. This sets them back a week or so, but that is OK because it will extend the harvest of this single planting. If I have more thinnings than I care to transplant, I trim the roots and eat a very delicate salad. (Maybe that is why I usually plant too thick!) Do this in late afternoon to evening. If you transplant in the morning and the day gets warm, the little plants will have a harder time surviving.
I strongly recommend that you make several plantings 2-3 weeks apart to have a continuous harvest. You will run into the summer and lettuce does not germinate very well when the temperature is over 75 degrees. Its best germination is at 60 degrees. But when it cools in the fall, you can plant again. Some varieties of lettuce are quite hardy and can even last through a mild winter. I left some go to seed and some of it fell into the path between the raised beds and grew. It was the early lettuce that we feasted on the following spring.