A lot of people say they "can't" grow vegetables in containers, but my suspicion is that this is because they don't look after them properly! Here are a few tips that might help...
1. Choose containers that are big enough for the plant you want to grow. A big plant like Purple Sprouting Broccoli is never going to do well in a 6-inch pot.
Asparagus growing in a 50-cm container
2. Plastic containers are better for water-retention than porous ones like terracotta, but they can also get a lot hotter, which many plants won't like. Chillis are fine in plastic pots though.
3. Fill your containers with good compost, or well-sieved garden soil that has had a lot of home-made compost added. This will help to retain moisture. I find that these days commercial compost (especially the multi-purpose type) is usually very poor. It lacks nutrients and dries out very rapidly. Once it dries out it is often very difficult to re-wet. Before you buy commercial compost, read what it says on the pack. It probably says "contains sufficient nutrients for 4 - 6 weeks" or something. Then think how long you want your plant to live - it's probably a lot more than 6 weeks! This means you are going to need to feed it artificially. If it mentions that it contains "wetting agent", you know there is a strong risk of it drying out.
4. Feed the soil / compost in your pots. Even when you use good compost, your plants are going to use all the nutrients in the pot eventually, and since they are confined the roots cannot spread out far afield looking for more. A good general-purpose liquid feed (such as "Growmore") is probably best, since it is easier to apply than powder / granules, but specialist feed (such as "Tomorite") is often best for "fruiting" plants such as peppers, chillis and tomatoes.
5. [This is probably the most important of all] Water your containers properly! Don't allow them to dry out completely before giving them another drink. In hot weather this may entail watering twice a day. This is where most people go wrong. They either forget to water their plants or just can't be bothered to do it regularly. Equipping pots with saucers will assist in making best use of the water, since the plants will be able to absorb it over a longer period, and from underneath, where most of their roots will be.
Pot-saucers
6. Don't be over-ambitious and try to squeeze loads of plants into a very small container. Often "Less is More", as they say. Crowded plants will perform less well because they compete with their siblings for light, water and nutrients. They are also more likely to bolt, something which is often caused by stress. Last year I put 9 Leeks in one of these big 35-litre pots and they never grew big. This year I have gone for 5 in each pot and they are already looking more hopeful
Leeks
7. Feel free to move your containers around. I often re-locate mine to make the best of sunlight / shade and air circulation. As the growing-season progresses the pattern of light and shade can change quite a lot. Think for instance of the effect that can be created by growing a tall line of Runner Beans. Some plants need maximum light (e.g. Radishes, which seldom succeed in deep shade), whereas others (like Parsley or Lettuce) often want to stay out of direct sunlight.
Radishes
If you are going to grow tall plants, think about how you will provide support for them. Will you provides canes for them? How will the canes be secured? Will you train the plants up a trellis of similar structure (particularly relevant for climbing beans)? My post called "Weather precautions", written a few days ago has reminded me of this in no uncertain terms!
A decidedly precarious tomato plant!
8. Think about how long your potted veggies are going to take to mature, and plant / sow accordingly. I have been re-using the pots in which my potatoes have been growing, and as each one has become empty I have put something else in it. I recently sowed some carrots, and before that Radishes and Dwarf French Beans. My Leek seedlings went into the first two pots to become available, so they will have had plenty of time to settle in and grow before the Autumn comes along.
Dwarf French Beans
Well, those are some words of wisdom from me, but before finishing my post today, I want to recommend to you another blog / website in which you may (should!) be interested. It is called Diary of a Brussels Kitchen Garden, in which Allan Howard, an expatriate Scot, describes his usually very successful attempts to grow vegetables in his shady Brussels garden. Allan also has loads of useful advice about growing veggies in containers...