During the past decade, Washington has become a magnet for ambitious 20-somethings. Not only does the city offer good jobs and better-than-average public transit, it also boasts food trucks and, of course, cupcake shops.

For a recent college graduate, what’s not to like?

It’s been a remarkable deal for the District, too. The influx of newcomers has transformed the city from a symbol of civic dysfunction and drab government offices to a cosmopolitan hub — an urban playground.

The flood of newcomers did not arrive by accident. City planners and developers have bet big on luring transplants to the region. These are the people who will fill the more than 11,000 new apartments expected to be completed in the area in the next 12 months and whose income, sales and real estate taxes are helping the city’s finances fare far better than those of similar urban areas. Long-blighted storefronts and commercial corridors are being rebuilt.

What D.C. hasn’t yet figured out, or even really planned for, is what happens when this raft of newcomers grows out of one-bedroom condo living. What happens when their lives evolve past the urban-playground stage and they are less interested in speakeasies than in parks for their kids?

Caroline Armijo and her husband joined the wave of new D.C. residents when they moved to the 6th Street Flats apartment building in Chinatown in 2005. At the time, so few people lived there that they had to fight to stop the dumpsters from the Chinese restaurants next door from being emptied in the middle of the night. “A lot of the initial issues were just, ‘Don’t pick up the trash at 4 a.m.,’ ” she said.

A few years later, Armijo, now with her infant daughter in tow, attended one of the first meetings of a Penn Quarter parents group. There she met a mother who made her realize that raising her child downtown would involve more challenges than just finding the right school.

“She kind of scared me,” Armijo said. “She said, ‘The first thing that’s going to sort of push you away from downtown is not the schools — not that the schools aren’t bad — but it is that you realize you need a safe place to play.’ ”

Now that her daughter is 3, Armijo said, finding places to take her is a daily struggle; she swings on bike racks like monkey bars, climbs on a sculpture outside the restaurant Zaytinya or runs atop the National Law Enforcement Officers Memorial. Armijo and other downtown parents have begun crusading for a neighborhood playground, starting a petition and bringing their requests to the D.C. Council, Del. Eleanor Holmes Norton and the National Park Service.

Former D.C. mayor Anthony Williams may not have envisioned the importance of something like a playground in Penn Quarter when his administration began sketching ambitious plans for growth, but the demand is a direct result of those plans. Williams set a goal in 2003 of adding 100,000 residents over the next 10 years and developing at least 15,000 new homes.

He was working off of a Brookings Institution report that said by attracting 50,000 well-off single people and couples without school-age children, the District could increase its revenue by $300 million. Williams and his planners laid the groundwork for nearly all the current major real estate projects and for the new condominiums and apartments that continue to rise — faster than anywhere else in the country since the recession began. If you look up and see a crane today, it is probably at work on a project that Williams’s team set in motion.

When he took over as mayor in 2007, Adrian Fenty picked up many of Williams’s plans and pressed them into reality as fast as he could, connecting them with bike lanes, bicycle-sharing and streetcar tracks along the way. But in a city where some neighborhoods struggle with extreme unemployment and there is a disheartening (and growing) gap in wealth between white and black residents, Fenty left too many people wondering whether the District would continue to be a place for them. A heavy majority of black residents, who are more likely to be parents than white residents, voted for Vincent C. Gray over Fenty in 2010.

By the time Gray entered office, D.C. had blown up. Since 1999, the city’s population has increased by more than 45,000 residents, with the majority of the newcomers between 18 and 34.Perhaps these new residents came for jobs; the D.C. area has maintained one of the lowest unemployment rates in the country following the recession. Once they got here, they discovered half-smokes and mumbo sauce. Now the District has the Nationals, waterfront parks and dozens of new restaurants. For young people with pocket money, there is little reason to leave.

One of the planners who charted the city’s population growth under Williams was Ellen McCarthy, now at the law firm Arent Fox.

“The first thing was to say . . . where were the places where we could grow where we weren’t going to displace existing residents? So, downtown, Mount Vernon Triangle, Columbia Heights and the waterfronts,” McCarthy said.

Many longtime District residents and families surely have been pushed out by the incredible rise in housing costs the city has experienced. A recent report found that the number of low-cost rental units fell from 70,600 to 34,500 over the past decade. It’s difficult to buy a house in many D.C. neighborhoods for less than $400,000.

But the commercial corridors where McCarthy and another Williams planner, Andrew Altman, focused their efforts were largely vacant, blighted or underutilized. Consider what is happening in each of them.

About 8,500 people now live in downtown D.C., nearly double the total in 1990. Williams’s team laid the plans for the new convention center as well as two mega-projects underway at the moment: ­CityCenter DC, between 9th and 11th streets NW, where the old convention center once stood, and a Marriott Marquis convention center hotel.

In Mount Vernon Triangle, which is teeming with cranes building high-rise apartments, McCarthy remembers working on plans to replace a wax museum at 5th and K streets in the mid-2000s with a project that would feature condos, stores and restaurants. At the time, the development team wanted to lease prominent corner space to REI, the outdoors retailer. But Williams’s team wouldn’t have it.

“We said, ‘REI, how late are you going to be open?’ ” McCarthy said. “Maybe until 8 o’clock? We want a bar or a restaurant there that will be open until late into the evening.”

The development became City Vista, and that space became the third outpost of local restaurant and performance space Busboys and Poets.

Williams’s team made similar plans for Columbia Heights, where residential towers and shopping replaced the vacant lots that surrounded the Metro stop. Their blueprints for the city’s waterfronts are just beginning to come to fruition, particularly in Southwest, where a development team is planning an entirely new neighborhood that will feature hundreds of apartments and condos, a concert hall, and a four-star hotel.

I arrived in D.C. in 2002, and while I’ve lived here, the District has evolved into a juggernaut at attracting the sort of person I was before I had children. I see this every day as I report on real estate development in the region: The city and developers have a great deal invested in attracting young people to occupy the new apartments.

For instance, the units they build are shrinking in size, on average. The number of bedrooms per apartment in the District is down 10 percent from a decade ago, to 1.23 per unit. The city now has the highest percentage of one-person households in the country, 48 percent, far higher than the national rate of 28 percent and even greater than Manhattan.

So while I see the city’s economic dependence on the influx of childless residents, what I don’t see is a clear plan to retain families and to make sure that the huge surge of new apartments doesn’t become obsolete in a decade or so, when a different city becomes a more desirable destination. Of course urban living isn’t for everybody, but this issue is likely to become more pressing; births in the city have risen to more than 8,000 annually in recent years.

The obvious strategies to improve a city for families — upgrading schools and libraries, reducing crime — are essential. But the debate over Schools Chancellor Michelle Rhee’s reforms doesn’t need rehashing here, particularly because improving classroom instruction is hardly the only thing D.C. leaders can do.

The District’s planning director, Harriet Tregoning, wants to keep families in Washington and is trying to determine if she can better coordinate with the school system to accommodate the rash of parents who are driving their children to schools outside their neighborhoods. This spring, parents submitted 7,299 applications for “out of boundary” schools — campuses other than the ones to which their children were assigned — a 10 percent increase over 2011. More than half of the applications were for preschool or pre-K slots, meaning they probably came from young parents like me.

As Tregoning points out, sending your kids to a school outside your neighborhood is not easy, and it affects not only traffic but parent groups trying to support schools. Officials are even considering giving neighborhood families preference in charter school admissions. “We have a lot of kids that end up going to a different school every two years, and it’s hard to build those ties among parents,” Tregoning said.

My wife and I are fortunate enough to have been able to afford a house in Petworth, one of the neighborhoods that is quickly adding amenities and housing. Ten years ago, all the new bars and restaurants would have thrilled me. Now, when I see a place opening up, I wonder if it’s somewhere I will feel comfortable bringing my kids. Do they have high chairs? Will it be too loud or too dark? Will I alienate people who just want a drink?

Those aren’t the most pressing questions for families when it comes to city living, but they contribute to whether they will stick around. And the city could do more to help answer them:

Develop places — public and private — where children can eat and play, something many District neighborhoods lack. If you think Boundary Road or Birch & Barley is crowded on a warm Friday evening, you should see the sea of toddlers at the National Building Museum on a chilly Saturday morning. Family-friendly restaurants are critical, but right now D.C. is building bars more quickly, having added a net of 68 restaurants and 74 taverns from 2007 through 2011. It’s no wonder more neighborhoods are considering caps on new liquor licenses.

Diversify the housing stock. Incentives for developers to build larger units would provide more housing options for families. So would side-by-side condos with knock-out panels that can be easily combined. The city could also reconsider rules allowing row homes to be chopped up into multiple units, something that drives up sales prices.

Build parks first. Two of the city’s most rapidly growing neighborhoods offer a key contrast: the area around Nationals Park and NoMa (the neighborhood north of Massachusetts Avenue). The riverfront was planned with a 5.5-acre park that centers the community and is beginning to attract families from across the city. NoMa may never have a large central park.

As Williams demonstrated, the question of what kind of city the District will become in 10 years is being decided right now. Will it continue to harden as an urban playground, flush with bars and good at attracting talented 20-somethings? Or will it be a place where people like Caroline Armijo can take her daughter to the playground from her Chinatown condo?

Right now it isn’t. Armijo said the playground idea seems to be coming together, but she and her husband have decided to move back to North Carolina in a few weeks, after he received a job offer there.

It’s a complicated decision, like any choice of where to live and raise a family, and Armijo said she will miss the walkability and culture of downtown D.C. But she also said she is looking forward to living somewhere where family life, and a place to play, aren’t an afterthought.

Jonathan O’Connell covers development and commercial real estate in Washington for The Washington Post’s Capital Business. Follow him on Twitter: @oconnellpostbiz.

Read more from Outlook, friend us on Facebook, and follow us on Twitter.