Farming began in China between 8000 and 6000BC in the Yellow River valley. Grass based crops were the major food source and the Chinese also kept pigs, chickens and dogs, relying also on river fish. The communities were at first Neolithic, but by 1000BC Bronze was in regular use and by 500BC there was a shift towards iron implements.
Settlements also became larger during this time, at first communities were based solely in villages, but as agricultural output increased towns developed and eventually cities by the time of the Shang dynasty. This was only possible through the development of government, which ensured that the agricultural output could support the growing urban centres. It can be assumed that writing developed, sometime around 1500BC, as a method of recording and calculating the tax burdens of individual communities.
With the development of centralised government the need to defend the agricultural land became a priority and first the Xia, then the Shang and then the Zhou developed larger and larger armies. To support the cities, as the centre of government, and the armies as the protector of government, the dynasties were forced into a compromise with the peasants. Taxation was high, usually taken as a percentage of agricultural output, and there was an expectation that the peasants would perform some labouring work during the course of the year in support of the local or central government. In return the government would protect the peasants from barbarians* and would design and maintain large scale water control systems for alleviating floods and providing for irrigation. (*Barbarians were regarded as anyone who did not live in a settled agricultural system.)