The ecology of cropping systems