During World War II, millions of Americans planted "victory gardens" in their backyards, eventually supplying a hungry nation with 40 percent of its homegrown fruits and vegetables. Once the war was over, those urban farms withered away, supplanted by increasingly efficient large-scale rural agriculture.

Now urban farming is staging a curious comeback. In recent years, US cities like Detroit, Washington, DC, and San Francisco have set up programs encouraging people to grow crops in vacant lots or on rooftops. Michelle Obama has promoted the resurgence of community gardens. Advocates sometimes tout urban farming as the solution for "food deserts" in poor neighborhoods.

But do these programs actually make sense? Are there real social or environmental benefits to growing food within city limits? Or is urban farming just a well-meaning but ultimately insignificant hobby for urban elites?

One of the best explorations I've seen of this topic is this paper by Raychel Santo, Anne Palmer, and Brent Kim of the Johns Hopkins Center for a Livable Future. The authors were curious about some of the bolder claims being tossed around about urban farming — that it can revitalize blighted neighborhoods, say, or help combat food insecurity. So they did a deep dive into the published research.

What emerges is a nuanced picture. Urban farming likely won't ever provide cities with all that many calories. And the environmental advantages are … debatable. But urban farms can provide a bunch of other neat benefits, from bolstering local communities to (sometimes) encouraging healthier diets. They can also give city-dwellers a better appreciation of how our food system works, which is less nebulous than it sounds.

"We did find a lot of benefits to urban agriculture," Santo told me. "But you want to be careful not to overstate things. If urban agriculture gets sold as something that will create all these jobs or feed entire cities — and then it doesn't — it could quickly lose support."

I can't do justice to the full paper, which is a careful review of the pros and cons of different types of urban farms. But here are four takeaways that jumped out at me:

1) Urban farms won't feed entire cities — but that's not really the point

It may sound counterintuitive, but in many ways the actual food grown in community gardens and urban farms nowadays is their least important contribution.

This wasn't always the case. Early urban farms were explicitly pitched as a way of alleviating food shortages. After the Panic of 1893, the mayor of Detroit urged starving residents to grow potatoes on vacant lots. The "victory gardens" of WWI and WWII were critical for supplying needed fruits and vegetables during wartime.

But America no longer suffers from nationwide food shortages. Large-scale industrial agriculture has become vastly more productive, and we now grow a staggering amount of food every year. To be sure, there are serious problems with our food system: Not everyone has access to affordable, healthy food, and we could arguably stand to grow more fruits and vegetables and less corn and soy. But we're not suffering from a dearth of cropland.

What's more, many cities are constrained in how much food they can ultimately grow. One study of New York City found that dedicating every last vacant lot to farming would only yield enough produce for 160,000 people (in a city of 8.1 million). You can get much higher numbers in places like Detroit or Cleveland, where populations have shrunk and vacant lots have proliferated. But it's unlikely that urban agriculture will ever supply more than a minor fraction of food for most areas.

The more realistic hope is that community gardens and urban farms can provide some families with an additional source of healthy, low-cost produce. That's a worthwhile goal in itself, and there's some evidence that people who engage in urban farming eat more fruits and vegetables. (The households that participate are often upper- and middle-class, true, though low-income urban gardening programs can and do exist.)

Yet even here, the Johns Hopkins authors write, the effect on nutrition is likely to be quite modest in the grand scheme of things: "experts contend that this increased produce consumption does not represent a significant effect overall on community food security or dietary qualities."

So if we really want to understand the benefits of urban farms, we may have to look beyond the food itself. "Food security is not a primary goal for most participants and supporters of community gardens and urban farms," the authors conclude, "and should not be promoted as such."

2) The social benefits of urban farming can be large — but they're not always shared

That brings us to the possible social benefits of urban farming. A number of old industrial cities, like Cleveland and Detroit, have been pushing community gardens and farms as a way of revitalizing neighborhoods falling into disrepair. And there is indeed evidence that urban farming is quite valuable here.

The Johns Hopkins authors cite a number of studies showing that the presence of urban farms is associated with "improved neighborhood aesthetics, reduced crime, and community cohesion." When a community garden is established in a neighborhood, property values typically shoot up in the surrounding area. (That said, this can also raise thorny issues around gentrification and displacement in low-income areas.)

Other research has found that community gardens can increase social bonds and networks among neighbors and the people who participate in farming. These farms, the authors write, "bridge gaps, reduce existing tensions, and foster social integration between otherwise segregated groups." Tilling the soil on a Saturday morning is a great way to bring people together. It's also a healthy, relaxing activity.

There are even a few economic perks. While urban farms don't usually provide all that many livable-wage jobs, they can "serve as sites for education, youth development, and skills/workforce training opportunities." Some cities have programs that use urban agriculture to help teach young people about science, environmental stewardship, and healthy eating. Other urban farms offer workforce training, though Santo says further research is needed to gauge how transferable these skills are.

The big catch, however, is that urban farms aren't always as inclusive as they aspire to be — and there are often huge class divides. "A number of case studies," the Johns Hopkins authors note, "have found that urban farms and gardens … have been led by mostly white non-residents in predominantly black and/or Latino neighborhoods, unintentionally excluding people of color from participating in or reaping the benefit of such efforts." (The links are mine, though they have many more citations.)

So urban farming can have a number of wonderful social benefits — but those aren't always shared widely. "It is essential," the authors conclude, "that the residents of the communities being affected by urban agriculture projects are not just consulted but fully empowered in leadership and decision-making to the greatest extent possible." Otherwise, urban farming mostly will just be a fun hobby for urban elites.

3) Urban farming isn't always more environmentally friendly

Modern-day industrial agriculture certainly has its environmental drawbacks — from soil degradation to disruption of the nitrogen cycle to all the fossil fuels used for the heavy machinery. But, the authors note, that doesn't mean urban farming is always a clear improvement.

Some advocates like the idea of urban agriculture because it reduces the number of miles that food needs to be transported. Yet transportation is a relatively small slice of the overall carbon footprint of agriculture. One study of an urban farming project in the United Kingdom found that it reduced diet-related emissions for the community by just 0.4 percent (although the fields themselves did help sequester carbon-dioxide). The emissions benefits may be biggest for produce that gets shipped by air, like berries.

And on the flip side, some studies have noted, if urban farms take up too much land and increase sprawl, they could actually end up making global warming worse by increasing overall driving. Cities only have finite space, and sometimes the greenest thing you can do with a vacant lot is build more housing rather than grow a bunch of plants.

There are other angles to consider, too: urban growers often use water and fertilizer and pesticides less efficiently than large-scale rural farms do. Industrial agriculture gets a bad rap, but there are sometimes real advantages to economies of scale.

The environmental benefits of urban farming get even more complicated when we consider indoor "vertical farms," which are often touted as a sustainable option that use less soil and water. Although designs differ, some of these setups can use an enormous amount of energy, especially if they require artificial lighting. Still, it varies case by case; see this piece by Paul Marks in New Scientist for a further exploration.

That all said, the Johns Hopkins authors note, various studies have found that urban agriculture can have some less-obvious environmental benefits. Community gardens and green roofs can help filter out local air pollution, cool down cities in the summertime, and retain precipitation — avoiding storm-water runoff into nearby waterways. When designed well, urban gardens can provide valuable habitats for wild bees and other pollinators.

"It's hard to make sweeping generalizations here," Santo told me. When designed right, urban farms can make some modest but valuable improvements to the sustainability of our food system. But when designed poorly, they can end up being even worse for the environment — say, if they're using fertilizer inefficiently and polluting nearby waters with nitrogen run-off.

4) One little-studied aspect of urban farms — they can teach us to appreciate food better

In our conversation, Santo mentioned one feature of urban farms that often gets shortchanged in dry policy discussions: "They can reconnect people with how to grow food."

That is, people who participate in a community garden learn what it takes to grow different crops — and appreciate how difficult it actually is. They can better grasp the seasonality of different fruits and vegetables (which is, at the very least, a handy skill in the grocery store). They can learn why food waste occurs. They can see firsthand the the ins and outs of a complex, vital system most of us have lost touch with.

Nathanael Johnson at Grist has written wonderfully about this aspect of urban farming, and he cited a 2012 essay in Gastronomica by Jason Mark making this point at length. "Spend a few months taking a broccoli from seed to harvest, and you’ll soon have a much deeper appreciation for the natural systems on which we depend," Mark writes. "Our connection to the earth becomes gobsmackingly obvious when you watch the crops grow (or fail)."

"Maybe," Marks adds, "urban agriculture is most valuable for how it forces us to be more conscientious about the people who feed us: the farmworkers, the truck drivers, the processors and the packagers, the prep cooks, all of whom work for next to nothing and have little time themselves to play in the dirt."

That romantic notion is a little hard to quantify in a study — although researchers are certainly trying. Santo mentioned that she'd love to see further explorations of how people apply the knowledge and skills they gain from urban farming in other areas. Do they become more politically engaged? Do they start pushing for broader reforms in our food system? Right now, it's a little tough to say. But if urban farming keeps expanding around the country, this may turn out to be its most lasting impact.

Further reading: 40 maps that explain food in America

Watch: The difference between a sweet potato and a yam