This is a tale of two factories. For one of them, this is nearly the best of times. For the other, the times are awful.

Nothing symbolizes the sagging fortunes of Chrysler Corp. so vividly as the sprawling old dinosaur that has been called "Dodge Main" since it produced the first Dodge car in 1914.

Like Chicago's stockyards, Dodge Main is more than just an assembly plant; it's part of the fabric of American industrial society.

Its cars and trucks, and its tanks in World War II, have been a fundamental part of this nation. What is more, it has been a steppingstone into the mainstream of American life for many thousands of immigrants -- first Slavs, mostly from Poland, and later for blacks streaming up from the South.

But today Dodge Main is worn out. It is inefficient, old-fashioned, too hard to heat. And it has been producing cars -- Dodge Aspen and Plymouth Volares -- that nobody is buying.

So Chrysler, already beset by the worst losses in history, announced at the end of May that, next summer, the plant will be shut down forever.

Hamtramck, a declining town of 25,000 surrounded by Detroit, is scared. The city fathers are striving desperately for ways to counter the loss of thousands of jobs.

"To say the situation is severe would be putting it lightly," said Chester C. Pierce, the town's economic development coordinator. "This place is going to be a ghost town," a laid off assembly line worker said gloomily into his beer at Joe B's, a saloon across the street from Dodge Main.

And a woman wrote to the Detroit News:

"To tell you the truth, I am scared. My husband has worked for Chrysler for 15 years. We have three children. I wish someone would tell us if he will have a job. I am asking whoever can help to help. Remember, the working people didn't make this mess."

But that is only one part of the story.

Three hundred miles west, across Lake Michigan in Belvidere, Ill., there is another Chrysler plant -- a modern one, gunmetal gray decorated with a distinctive broad blue stripe, set down in open country where the cornfields march for miles.

The contrast could not be more striking. The Belvidere plant's successes make it one of the few bright spots in Chrysler's overall picture.

For one thing, it is a model production facility and has been toured by businessmen from all over the world. That is reassuring to local people; they think that if Chrysler goes under, some other industrial giant will snap up the Belvidere plant.

More importantly, though, it produces the hottest selling cars in Chrysler's line, the subcompact Dodge Omni and Plymouth Horizon. Production is booming and paychecks for its 4,800 workers are fat.

"The average income out there is $19,000, and I'm talking about the guys on the line," said Francis (Dutch) Whalen, Belvidere's mayor. "Chrysler has been a good neighbor."

About 20 percent of Chrysler's workers live in tiny (population 25,000) Boone County. While a few other corporations have sizable plants there, Chrysler is Belvidere's most important economic influence.

That is considered good -- but it is cause for concern, too.

On the good side, Chrysler's county tax bill last year exceeded $1.5 million, a major infusion of cash. Although many employes live in Rockford, 13 miles away, enough have settled close to Belvidere to create a broad band of new split-level and ranch homes around the decades-old structures that characterize the center of town.

Unlike Hamtramck, which consists of 2 1/2 square miles of closely packed bungalows, Bevidere has been lucky enough to avoid the higgledly-piggledy rush of development inflicted by big new factories on many other essentially rural communities.

What remains, despite the influx of Chrysler money, is a relatively slow-paced place -- "a nice, conservative, Republican little town," in Whalen's words -- despite predictions in the 1960s that the Chrysler plant would double the population.

"We grew up here and moved away, and Chrysler gave us a chance to move back," said Romelle Cunningham, the town clerk, whose husband is in the plant's labor relations department.

"There's a lot more mobility, people moving in and out, but it's still a good place to raise kinds," Cunningham said.

But there is another side to the situation. Whalen, a cheerfully informal man with a fondness for gaudy suspenders, is acutely aware of the danger that Belvidere could become over-dependent on the Chrysler plant -- and find itself in a plight like Hamtramck's.

"I used to work at a steel plant downstate in Sterling," he recalled. "One company employed practically the whole damned town and if you have a strike in a place like that, that's bad."

City Treasurer Robert Bahling agreed, saying it is "quite crucial" for Belvidere to have Chrysler's property taxes and the money it pumps into the local economy. "If you lost that, it would really be a tough pill to swallow," Bahling added.

Despite Chrysler's general financial troubles, a company spokesman in Detroit foresees a bright picture for the future of Belvidere's plant.

"Belvidere has been going full blast since it converted from making big cars to making Omnis and Horizons in 1977," he noted. "I'm not aware of any plans to expand the plant, but the production schedule has increased to 1,200 cars a day -- two full shifts, five days a week. No competitor is bearing that."

Earlier this month, the Belvidere plant went through a model changeover in only three days and began producing 1980 models -- they are not on the market yet -- on Aug. 6.

Back here in Hamtramck, they have changed over, too. But no one is very impressed, because Dodge Main will continue making the cars that no one has been buying.

Meanwhile, city officials are stitching together a million-dollar plan to study what Dodge Main's closing will mean to Hamtramck and to work intensively to put the town back together again.

"This is a bigger problem than anybody realizes, and it's a major national issue that we see surfacing first here," said Pierce, the economic development coordinator.

"When government rules and less energy mean that you build only two-thirds of a car, instead of a full-size one -- and when General Motors has the technology to produce its entire year's output in seven months -- you've got to look at an entirely new way of doing things."