The rest of the country may be tiring of it, but the drawn-out, high-decibel battle for the Republican presidential nomination is just fine with the Obama campaign.

Why? Because the president's strategists still expect to be facing Mitt Romney in the general election, and his unexpectedly tough fight to sew up the nomination has forced him to keep emphasizing his credentials as a conservative instead of moving toward the center, where the swing voters are.

"The long primary fight is driving independent voters away from Romney," the Obama campaign's senior strategist, David Axelrod, told me last week.

In general, the Obama campaign is feeling warily confident these days, with the economy improving (though slowly) and the president's standing in opinion polls rising. One national poll last week even showed Obama beating Romney by 52% to 43%.

But the Obama camp knows that the Republican primary campaign can't last forever, much as they'd like it to. And they worry that the economy could still hit a speed bump before the November election.

So here's what they've been up to while the Republicans have dominated center stage:

They've raised more than $130 million of a war chest that may eventually exceed $750 million — and they've already spent more than $50 million, some of it for a massive database of voters who might be persuaded to vote for Obama this fall.

They've also been running what might be called an invisible Democratic primary campaign, seizing chances for Obama to reconnect with his party's base. In recent months, the president has softened U.S. policy on deporting illegal immigrants, pleasing Latinos. He has refused permission for the Keystone XL oil pipeline from Canada to Texas, pleasing environmentalists. He has called for more federal student loans and lower college tuition, pleasing young voters. And he has struck an increasingly confrontational posture in dealings with Republican leaders in Congress, pleasing liberal Democrats of all stripes.

Probably most important, aides say, Obama has settled on a central message on the economy that, in their view, should resonate with many independent voters as well as Democrats. Unveiled in a series of speeches last year and continued in his State of the Union address last month, it's a populist "middle class" message, heavy on calls for tax increases on the wealthy.

The message resonates with liberal Democrats, and the campaign is also hoping it will appeal to independents and even to some of the middle-income white voters who have become the core of the Republican electorate.

"There's a misapprehension that people in the middle, independents, are somehow less concerned about the economy and the yawning gaps in the economy than Democrats," Axelrod said. "They're not."

White voters without a college education are still a tough sell for Obama; in 2008, he won only 40% of their votes against John McCain.

But there again, the GOP has provided inadvertent help, not only by forcing its front-runner to answer questions about his career as a venture capitalist and his investment accounts in the Cayman Islands, but also by making capital gains tax cuts — which, in most candidates' versions, would go mostly to upper-income taxpayers — a central tenet of its economic program.

Going forward, expect to hear still more from Obama about his "Buffett Rule," a proposal (named after billionaire Warren Buffett) that taxpayers earning more than $1 million a year should face a tax rate of at least 30%.

That's the Democrats' version of a wedge issue, a proposal designed to divide the other side. Polls show that the Buffett Rule is widely popular in every income group except the very rich — but Romney and his competitors in the GOP race all oppose it.

Does all this preparation guarantee an Obama victory this fall? Far from it.

The president's standing with voters is still fragile. A Gallup Poll last week reported that only 46% approve of the job he's doing, an improvement over his standing for most of last year but still short of the 50% he would need to feel secure in his job. (Only one incumbent president has been reelected with less than 50%: George W. Bush in 2004. His job approval rating at the time was 48%.)

The unemployment rate has improved but still stands at 8.3%, and forecasts of sluggish economic growth suggest that it will probably remain at or above 8% on election day.

The best thing Obama has going for him may be the Republican primary race, and that won't last forever. And as soon as the GOP nomination is sewn up, all of the party's attention can be focused on tearing down Obama.

Axelrod says he's optimistic. But he acknowledges it will be a tough campaign — and, in all likelihood, a close election. "We're not just running against the other candidate; we're running against the times in which we live," he said. "We're running against impossible expectations."