Dave Messenheimer stood in front of an old barn at the Hatch family farm south of Leesburg last week and imagined something different.

In the loft, now stuffed with hay, he envisioned "a little tasting room where people can come for wine and cheese and meats. It's a great space with exposed oak planks," he said.

What sounded like big-city-architect talk was coming from a man in overalls and work gloves with a damp washcloth under his hat to keep himself cool while driving cattle from field to field.

Messenheimer was speaking the language of the future of farming in Loudoun County. Last year, during a visit from North Carolina, he helped his brother-in-law Chris Hatch rake hay for a few weeks on the 400-acre beef cattle farm. He decided to stay on to help Hatch devise a new marketing strategy.

In 55 years, the farm, which was started by Hatch's father, has already evolved once -- from a dairy to a beef cattle farm in the early 1980s, when milk prices dropped because of overproduction and the family took advantage of a federal buyout program, Hatch said.

Now the farm has become outdated again. With three-acre homesites selling for more than $200,000 in western Loudoun County, earnings from the beef cattle farm can barely keep up with property taxes. The farm brought in $40,000 last year -- before taxes and insurance and labor costs. Hatch drove a school bus to help make ends meet.

The Hatch family, like many other longtime farmers in the area, must figure out how to adopt newfangled ideas or risk being forced to make tougher decisions.

"It's getting harder and harder to justify farms that have so much land and produce relatively little," said Warren Howell, the county's agricultural marketing manager.

The old model of farming in Loudoun, when land was cheap, was to grow such crops as soy or corn or raise cattle on vast farms at nationally set prices. The new model is smaller farms with higher-value crops geared toward local customers, who are willing and able to pay a premium to fill their refrigerators with organic or locally grown food.

In this changing environment, many older farmers have been struggling or selling out, Howell said. New or adapting farmers, though, have been finding some success.

Agricultural sales in the county rose to nearly $39 million in 2002, up from $28 million in 1997, an increase of 39 percent. At the same time, the average farm size decreased 25 percent, from 146 acres to 109 acres, according to the most recent census by the U.S. Department of Agriculture.

Chris Hatch said he hopes to learn from the new farmers, not only to make his farm more profitable but perhaps also to inspire his two daughters, 18 and 20, to stick with farming.

The first change the family has adopted is direct-to-customer sales.

Instead of taking cattle to auction at the end of the year, the family wants to sell beef directly to neighbors. One recent Sunday, Messenheimer loaded a freezer full of ground Angus beef in the back of a pickup and took it to the Cascades farmers market, where he sold it for $4.20 a pound. Hatch said the price is set a little higher than at the grocery store with the idea that people will pay more if they meet the farmer who raised the cow.

Gary Hornbaker, the county's rural resources coordinator, said direct marketing is making a big difference for Loudoun farmers. After all, he said, the farmers are "sitting on top of one of the best markets in the country."

John Whitmore, a fifth-generation farmer whose land is five miles north of Leesburg, has already determined how to tap into this market. Most of the land on his 850-acre farm is dedicated to raising beef cattle and hay, but every year he converts a few more acres to fruits and vegetables, which he sells from a roadside stand next to his farm. He charges the same prices as the local Giant Food store for his zucchini and peaches, and because he doesn't have to pay a middleman, he has extra money to put in his pocket.

Howell said another reason Whitmore's produce stand boosts his income is that growing fruits and vegetables uses less land and brings in more money than soy or cattle. He estimated that the produce sales yield $3,000 to $6,000 an acre compared with $200 to $400 an acre for more traditional commodities.

"There's the rub in old versus new agriculture," Howell said. "The things we are selling now have higher value."

Among the highest-value farms in Loudoun are horse farms, where thoroughbreds can sell for tens of thousands of dollars, and the steadily growing wine industry. The Hatch family is hoping to join the winemakers. Hatch's brother William planted an acre of grapes -- cabernet franc and chardonnay -- and is experimenting with making wine.

Beverly Morton Billand has made several changes in 18 years on her 40-acre farm in Lovettsville while figuring out how to make it more profitable.

She said her first lesson was "you take the berries and you put them in the jam, and that adds value." She found that she could sell the jam for a higher price than the berries and that she could sell it year-round. In 1999, she opened a restaurant on her Patowmack Farm, Dinner in the Garden, incorporating her vegetables and herbs into gourmet recipes.

"The farms are getting smaller, but we are doing more creative things with them," Billand said.

Another way to increase a farm's value is to add services or entertainment that will entice people to spend money. Many farms offer hayrides and nature hikes or opportunities to pick vegetables.

Hatch said he is open to all of these ideas, even adopting the "pick-your-own" concept to cattle. Buyers could visit the farm to pick a cow, and Hatch would deliver it after it has been butchered. Hatch said he was not sure who would buy 300 pounds or more of beef. But he heard that a farmer in Chicago was doing it, and he said he thinks his family should give it a try.

"I'm enthusiastic about the whole opportunity of the rural economy," Hatch said.

Brothers William, left, and Chris Hatch hope to use the old milking barn for a winemaking operation.Chris Hatch looks out at his family's 400-acre farm, which his father ran as a dairy operation.

Chris Hatch sells ground beef directly to customers at the Cascades farmers market.