Bill de Blasio became the mayor of New York in large part because he, better than anyone else in the running, was able to convince the city's voters that he understood how tough life is for ordinary folks out there. "A tale of two cities" was his rallying cry, and he repeated it in every stump speech throughout his somewhat unlikely march to victory.

He would make things better, he promised. He would enact policies that made life easier for the working stiffs of New York, a constituency that felt ignored by his billionaire predecessor, Michael Bloomberg. Topping the new mayor's agenda was the creation of more affordable housing. He promised to create or preserve 200,000 units through mechanisms such as mandatory inclusionary zoning, which would require developers to build a certain percentage of "affordable" apartments in order to reap the rewards of constructing the unaffordable ones that rich people are snapping up at prices rivaling any in the world.

Now, just over half a year after he took the oath of office, de Blasio is dealing with some of the real-world pushback on that promise. Creating affordable housing, it turns out, isn't simple in a city where every square foot has a price tag and a constituency.

In mid-July, a brief storm of outrage boiled up when a so-called "poor door" was approved for a luxury residential development on the Upper West Side waterfront. Residents paying market rates to live at the development, a project of real estate giant Extell Development Company, will be coming home through a different entrance than those who qualify for the 55 "affordable" units (which will face away from the Hudson). When the plan was first unveiled, the New York Post called the scheme "Class Doorfare."

The zoning policy that made such segregation possible is a legacy of the Bloomberg era. That administration's inclusionary housing program granted Extell the right to build a larger project—this one totals 219 units in a 33-story tower—in exchange for providing units set aside for tenants making less than 60 percent of the median income. It also allowed Extell to plan a separate entrance for those affordable units.

After the Extell project was approved, de Blasio (who has displayed as much pragmatism as idealism in dealing with developers in the past) vowed to change the zoning rules that made the poor door possible. A spokesman for his administration, Wiley Norvell, told Newsweek, "We fundamentally disagree with that approach, and we are in the process of changing it to reflect our values and priorities. We want to make sure future affordable housing projects treat all families equitably."

On the Brooklyn waterfront, though, another proposed building is already showing us just how difficult that's likely to be. Plans to build two residential towers, including affordable units, on the edge of Brooklyn Bridge Park have led to a petition drive and lawsuit to block the structures.

The objections from the affluent and very liberal surrounding neighborhood are focused on the buildings' height—16 and 30 stories, far taller than most of the surrounding neighborhood. Critics say that private housing should never have been part of the park plan, and that more residents will stress the already crowded local schools.

The scheme to build Brooklyn Bridge Park on abandoned former piers along the East River, which has been implemented in phases over the past several years, was always based on a public-private partnership model. It was always going to include residential development that would help to pay for the maintenance of a park that has been hailed as perhaps the the best new green space the city has seen in a generation.

But now that the park is up and running, many people who live nearby and who use the park on a regular basis don't want the housing part of the plan to be implemented (I live about a mile from the park and have friends on both sides of the debate).

Some of the project's opponents are especially troubled by the de Blasio administration's last-minute inclusion of affordable housing in those towers, arguing that moderate-income tenants won't be helping to subsidize the park's maintenance. "Why are we building private housing inside public park land that isn't going to fulfill the mission of the park?" one neighborhood advocate said at a May meeting in which the affordable component was discussed.

Others say they're in favor of creating affordable housing, but that it doesn't mitigate the effect of the soaring towers in a low-rise neighborhood. "I support the mayor's visionary efforts on affordable housing," one of the plan's main detractors, Lori Schomp, said in a statement. "[H]owever, putting additional luxury housing—even with an affordable component—in the Brooklyn Bridge Park takes away public green space from all of the people of Brooklyn."

A judge has granted a temporary restraining order blocking the towers from going forward for now. Mayoral spokesman Norvell, however, told the Brooklyn Eagle the administration remains committed to the plan. "Housing is critical to financing and sustaining Brooklyn Bridge Park, and that's been part of the park's master plan since its inception," he said. "What's changed is that this administration has committed to make some of that housing affordable for working families being priced out of Brooklyn. In a contest between protecting the views of a lucky few and creating homes for the families that make New York City work, this administration has chosen the latter."

It's not only the wealthiest parts of New York that are seeing controversy about where to put affordable units and less fortunate New Yorkers. Residents of the working-class neighborhood of Elmhurst, Queens, have staged loud and sometimes ugly protests over the city's placement of homeless families in a defunct hotel, standing with placards outside and chanting slogans such as "Pay your rent!" and "Get a job!" In a city where the struggle to pay that rent is a worry for so many, the reaction to those who aren't making it isn't always compassion.

If de Blasio is to be true to his word about creating a significant number of units where lower-income New Yorkers can afford to live, the question of exactly where those units will go is going to keep coming up. Over the weekend, New York Times writer Ginia Bellafante weighed in on the "poor door" controversy, writing that perhaps the city should give up on the idea of mixing classes in more desirable neighborhoods in the name of addressing its housing crisis on a larger scale. "It may be wiser to concentrate affordable-housing efforts in areas where there would at least seem to be an organic interest in economic diversity, rather than force it in less receptive places," she writes. "In the end, the development at Riverside Boulevard will have generated a lot of controversy and political heat, all for the benefit of fewer than five dozen families in a city where more than 50,000 people are homeless. Better to leave some glass towers to the Real Housewives of Everywhere."

A 2011 report from Gotham Gazette showed that the way the Bloomberg administration made deals about affordable housing resulted in exactly this kind of income segregation, with less wealthy residents being pushed not just to the "poor door," but to the geographical margins of the city, as developers took city tax breaks to build luxury units where less affluent people used to live and concentrated financing for affordable units in far-flung neighborhoods such as East New York. "[T]he city's market-based affordable housing system may actually contribute to, rather than alleviate, this pattern of gentrification and displacement," the story argues.

The Upper West Side, where the Extell tower is rising, was long a neighborhood where people of different income brackets and levels of education lived side by side, shopped together, sat in the parks together. The kind of neighborhood that makes New York the dynamic, productive city it is so proud of being. Now that type of environment is being replaced by developments that in some respects are more like gated communities.

Long before de Blasio took office, New Yorkers of lesser means were being pushed to the back door not just of their buildings, but of the city itself. The mayor has been clear enough on his priorities. The question now is whether the residents of this city will allow him to proceed.