MarShon Brooks and the Brooklyn Nets moved into their new (approximately) 18,000-seat arena, Barclays Center, this season. (Bruce Bennett/GETTY IMAGES)

Alan Rosen is only 43 years old, so he wasn’t around back then. But he imagines this is what it used to be like at Junior’s when his grandfather ran the popular Brooklyn eatery: a bustling morning crowd, some there for breakfast, some for a drink to start the day, many others for cheesecake. His grandfather would watch them pay their check and catch the trolley car to Ebbets Field to watch the Dodgers.

Six decades later, Rosen sees it, too, customers streaming out the front door and heading a few blocks south to take in a game. “It’s like everything repeats itself,” Rosen said the other day. “Granted, the history isn’t there yet with this team, but you can see it starting.”

After a 55-year hiatus, professional sport is back in Brooklyn. The Brooklyn Nets moved from Newark and began play at the new Barclays Center. The NHL’s New York Islanders announced they’ll be relocating soon, too. The teams are riding a wave of communal change, as gentrification and revitalization have redefined whole sections of the gritty borough. Brooklyn has become a brand as much as a community, and many of its neighborhoods are as fashionable as anything in Manhattan.

The population of Brooklyn today is about 2.6 million people. If the borough was its own city, New York, Los Angeles and Chicago would be the nation’s only larger metropolises. There are nearly 100 languages spoken throughout Brooklyn, as people from all corners of the world have set up camp somewhere in the borough.

“Anything you can find in this world, you can find in Brooklyn,” said Brett Yormark, the chief executive of the Nets and Barclays Center.

Until last month, professional sport was not included on that list. The bustling borough has cycled through its share of identities and living conditions in the past half-century, a coarse but proud community of working-class underdogs, a mecca for music, a melting pot of poverty. But it had been a wasteland for sport.

“Brooklyn was the subject of jokes,” said Brooklyn-born writer Roger Kahn, who authored the best-selling tome “The Boys of Summer,” about a father, a son and the Brooklyn Dodgers. “The thick accents and always losing. I mean, Brooklyn wasn’t even a city. Topeka was a city but Brooklyn wasn’t. We were Manhattan’s dormitory.”

Where the Dodgers reigned

In the early part of the 20th century, Brooklyn was an industrial, commercial power, said Julie Golia, public historian at the Brooklyn Historical Society. It had a working-class economy that thrived especially on waterfront commerce. It was always diverse, but the Dodgers — named after locals who dodged trolley cars in the busy streets — managed to tie together all the different factions.

“I think that’s one of the reasons the Dodgers have become a pivot point of nostalgia,” Golia said. “The Dodgers symbolically became this glue that held together Brooklynites.”

The Dodgers blossomed into a perennial contender with Branch Rickey running the front office and filling his roster with stars such as Gil Hodges, Duke Snider and Jackie Robinson. But as the interstate highway system grew and business fled the borough following World War II, people followed. White flight coincided with African Americans migrating from the South. With the loss of the Dodgers to Los Angeles in 1957 and, within a decade, the closure of the Brooklyn Navy Yard, the borough’s makeup and identity were permanently altered. It was still diverse and packed with people from all backgrounds, but they no longer assembled under the same tent.

“It was the unifying force,” Kahn said. “Italians, Jewish, everyone gathered around the Dodgers. Think of a great oak tree falling and when it’s down, there’s a lonesome place against the sky.”

“I think that’s one of the real tensions of the Nets coming in,” Golia said. “Will the Nets have that ability to draw together the diverse population the way the Dodgers did?”

A bold plan

Walter O’Malley didn’t want to move the Dodgers. He proposed building a new stadium near Atlantic Avenue and Flatbush Avenue. When he couldn’t get the lot, he instead moved his team across the country. More than a half-century later, real estate mogul Bruce Ratner picked an adjacent lot to try to resurrect professional sport in Brooklyn.

Ratner bought the Nets in 2003 with the hopes of moving the team, an ambitious undertaking with a web of red tape. “When Bruce Ratner interviewed me eight years ago, I said, ‘Bruce, I’m not into real estate,’ ” said Yormark, who came to the Nets from NASCAR. “ ‘What’s Plan B?’ He looked at me and said: ‘There is none. We’re going to get this done.’ ”

Ratner and Yormark successfully battled neighborhood opposition and secured much-needed funding when Russian billionaire Mikhail Prokhorov bought a majority stake in the team. Construction began in March 2010.

The new 18,000-seat arena is sleek in its curves and rusty in its exterior, tying together new Brooklyn and old. It straddles neighborhoods, located where downtown Brooklyn connects with Fort Greene and Prospect Heights.

It’s an emerging area, the locals say, that’s trying to move forward while still retaining its old charms. Junior’s, for example, is located cater-corner from an Applebee’s restaurant. While so much of the borough is unchanged by time, the area around Barclays Center is zoned for mixed use and the newest tenants include Old Navy, Best Buy, Marshalls and Chuck E. Cheese.

While hipsters fill Williamsburg bars and young couples park their strollers outside Park Slope cafes, there are still several areas with more grit than shine, from Brownsville to Sheepshead Bay. The Nets and Islanders hope the new teams can somehow connect them all together, an important part of the borough’s growth.

“This story is eight years in the making,” Yormark said. “And over those eight years, this market certainly has changed. Downtown Brooklyn, the retailers that are coming in, they’re looking at this as a must-be place for their business. As artists and entertainers are finding it, it’s a must-play when they come to New York. What we’re doing here is really a catalyst for the continued renaissance of Brooklyn.”

The arena has been open less than two months. It’s already hosted NBA games, boxing, college basketball and musical concerts, including shows that featured pop star Justin Bieber and aging English rockers The Who.

“The most important thing is you have a place where people want to go,” Islanders owner Charles Wang said. “That’s what we have now in Barclays Center and in Brooklyn.”

The NBA team and the arena employ 1,900 part-time workers, and 90 percent of them are from Brooklyn. The Nets’ 11,000 season tickets exceeded early estimates. According to team officials, 40 percent of that base is Brooklynites, while another 25 percent are from Manhattan and 12 percent from New Jersey.

“We’re not conceding all the neighboring markets and boroughs, like Long Island or Manhattan or Staten Island or Queens. But from Day One, to be successful, we knew we needed to own Brooklyn,” Yormark said. “And I think we’re on our way to owning Brooklyn.”

Feeling out the crowds

Nets games feel like those in any other NBA city. Maybe there’s a bit more Jay-Z played on the public-address system. And because the famous hip-hop star is a minority owner of the team, there’s also a 40/40 Club in the arena and a Rocawear store outside. He also helped design the team’s distinctive black and white uniforms. But the presentation is similar to what fans would find elsewhere, even if Brooklynites are still processing the in-game experience.

“The chemistry between our crowds and our players, we still have a ways to go,” Nets Coach Avery Johnson said. “We’re not Miami or the Lakers where we’ve been in the building for a long time. We’re still learning. It’s still a feel-out process.”

While the team’s business operations are in Brooklyn, the players are spread around Manhattan and northern New Jersey. The Nets still practice in East Rutherford, N.J., but the facility was damaged by Hurricane Sandy and the team is temporarily practicing in Brooklyn.

Brook Lopez was drafted by the Nets in 2008 and said being in Brooklyn is “a complete 180” from his time in Jersey. There’s a different attitude, said Lopez, who’s already found a comic book store on Bergen Street to frequent.

“We definitely feel like we’re part of something special,” he said.

The Nets mark the eighth NBA team for Jerry Stackhouse. He remembers playing in Newark in half-full arenas, listening to crowd noise piped through the public-address system. Moving to Brooklyn has been like getting upgraded from coach to first class.

“We have a chance to be a little Hollywood,” he said.