THE DECLINE of small towns and farm communities since the Great Depression, the loss of farm people everywhere as land was abandoned and machines replaced labor, the exodus of sharecropper families from the South and the massive crop surpluses of the '50s and '60s occurred without anyone, save experts, really understanding the long-term effects these tremendous upheavals and transformations had on American farming. Informed writing on rural questions usually was buried away in Census Bureau or Department of Agriculture publications and obscure academic journals.

But in recent years farming and rural life have become interesting, even fashionable. The decline in rural population has slowed; some rural areas have actually gained in inhabitants, and young people, turning their backs on the urban rat race, are drifting into subsistence farming on land long vacated by earlier generations. Also in the 1970s, a series of crop failure aroused the world to an urgent but brief food crisis, focussing worldwide attention on the example that American agriculture might provide to an increasingly hungry world.

Against this background come four books as different as four farms. Cochrane's is the most useful as history and Kramer's the most readable, but the other two also have merit.

Cochrane, who writes more for the student of agricultural history than for the general reader, surveys 400 years of agricultural development in the United States. He correctly points to the abundance and cheapness of land in the 18th and 19th centuries as the most powerful factor in shaping American agriculture. He admirably relates how geography, government policy, education, alternating cycles of prosperity and depression and cheap energy formed the social and political structure of rural America.

The magnetic force of cheap land disappeared with the closing of the frontier. Once the country was settled, technology replaced people on farms with machines as inexorably as the lure of land had brought our ancestors to these shores in the first place. Land is now scarce and expensive but still much in demand.

If any reader wants to invent a future for American farming after studying its past, Cochrane's advice is written between the lines: "Watch the forces; study the process." The forces are energy supplies and prices, a rising international demand for food and U.S. tax laws that favor large-scale if not corporate farming; the process is now largely one of goverment policy making rather than immigration, settlement and mechanization.

Kramer's Three Farms was written with an obvious bias towards the restoration of small-scale family farming, an economic system that was the product of another time and which will probably never return. His is a fascinating book, a paean to sturdy individualists hanging on to their land against long odds. It is also a warning that the "Farmerless Farm," the third of his Three Farms, may be well on the road to replacing the people and the values still being held together on small and large family farms.

Kramer wrote his book to find out why many family farmers can no longer survive; what has shifted farming from "cozy to harsh" in a generation or two (revealing in those three words what he admits -- that he was never a farmer dependent on the soil, the weather and the milk check for a living); and whether the people who work large-scale farms are a different breed than family farmers.

He discovers with surprise that his Yankee and Midwestern small farmers and Western corporate farm managers have more in common than he anticipated. He also discovers the "agricultural treadmill," a term Cochrane coined more than 20 years ago to denote the system into victims: Squeeziing out the neighbors has been the road to farm expansion, community position and wealth in land ever since colonial times.

Kramer's successful Yankee dairy farmer, his Iowa corn and hog farmer and the hired managers of a California corporate farm are from the same stock, and they operate vastly different crop and livestock systems in similar ways. They share the most advanced machine, chemical and genetic technology, although it is a milk technology on one farm and corn and tomato on the other two. These modern farmers seldom look back since they know they can't turn back and, indeed, don't want to. The Iowa family farmer said it best when he told Kramer that if he had to farm the way his grandparents did, he'd quit.

The raw products of Kramer's three farms reach the consumer in bottles, cans and plastic wrappers via a marketing process that costs far more than does the raw harvest of the milk, tomatoes and corn. The dairyman, the corn raiser and the corporate managers come through as equally skilled, thrifty and motivated. One can almost see them changing places and doing equally well, they are so alike.

Ebeling's The Fruited Plan, liek Cochrane's book, is also a history of U.S. agricultural development, only more chatty. His subject matter ranges from the Sioux Wars to the creation of the modern broiler chicken, encompassing among manifold other subjects whiskey, farm women and the invention of the center-pivot irrigation system.

Ebeling has written an appealing reminiscence, a scientist's notebook, an encyclopedia of agricultural science and technology and a travelogue about old trails, hidden valleys and wonderful people. It's obviously a labor of love, making up in variety and scope which it lacks in theme and continuity.

Paarlberg's Farm and Food Policy will be of most interest to the student of public policy. The book lacks Cochrane's historical perspective, Kramer's nostalgia and Ebeling's anecdotes. But Paarlberg's scope is far less ambitious and deals largely with one force that has supremely shaped American agriculture -- federal agricultural policy in the last four decades.

Paarlberg's agenda for the 1980s includes preservation of the family farm because of its economic and social strength; recognition that most small farmers -- "the people on the fringe" -- are not really part of modern agriculture; and a warning the farmers cannot flout publicly determined environmental standards.