In the world that David E. Kelley rules there are no personal trainers. No carefully tended flower beds. No reserved parking. There's just work, and plenty of that. It's a no-frills, no-nonsense kind of kingdom.

Above, he writes, dreams, tweaks, edits. Below, they execute on a couple of sound stages. Two weeks later we're watching it on TV.

His is an extraordinary kind of power, a cultural influence that is rare even in the influential world of television. The producer now single-handedly writes two hour-long shows, "Ally McBeal" and "The Practice" -- the former a hit of the fall season about a loony, lovelorn lawyer, the latter a rising-in-the-ratings, weighty legal drama -- giving him an almost unlimited forum for his quirky, inquisitive take on American society in the 1990s.

And he knows it. "I would say this is the most creatively content time for me," the normally taciturn Kelley says. "The two shows are alter egos for each other. Whatever I feel like writing about I can usually find a platform for."

Never mind that for most people such a task would be exhausting. In the past year Kelley has written more shows than the average, hard-working TV writer produces in four or five years; by the end of this season, he will have written all 22 episodes of "Ally McBeal" and perhaps 20 of the 22 episodes of "The Practice," a mind-boggling accomplishment, considering the shows are actually interesting, relevant and fairly complex.

If "The Practice" is the show in which Kelley explores such serious issues of society as the death penalty, racism and the moral conflicts involved in defending convicted criminals, it is "Ally McBeal" that has unexpectedly captured the public's imagination. In a few months the show has become a defining image of prosperous, pre-millennial America, a reflection of where we are and a suggestion -- though a wacky one -- of where we're going.

Ally, played by Calista Flockhart, is a twenty-something lawyer who drinks cappuccino with orgasmic abandon and sees apparitions sent by her biological clock; she's a woman who lusts after a married ex-boyfriend, wears scandalously short skirts to work and is taken utterly seriously. Her office, meanwhile, is a place where sexual harassment and libidinal energy share a tantalizing gray zone, a workplace where the men and women share a bathroom and where Attorney General Janet Reno's sagging chin (Kelley calls it her "wattle") is a matter of continuing carnal focus. Unexpectedly, "Ally McBeal" has become a venue for seeing what social trend will be seized and twisted, what political taboo will be turned on its head and which side is winning the war of the sexes.

But Kelley confesses to having had no such ambition. In creating "Ally," he says, he was aiming for light entertainment to keep the viewers of "Melrose Place" glued to Fox for the following hour. "It was foreseeable that people would find it interesting," he says. "What has been a surprise is that it strikes such a deep, serious nerve. We get letters taking us to task, or congratulating us, on revealing the inner world of young professionals."

He sighs. Who can figure this stuff out? Recently "The Practice," which airs on ABC on Mondays at 10, just after "Ally McBeal," dealt with a mentally disturbed criminal facing the death penalty. "The letters the next day were asking, Why are Ally's skirts so short?' " Kelley groans. "Or -- Now really, my friends and I were sitting around and discussing this, and we really don't think most men would feel comfortable having a bowel movement in a unisex bathroom.' Here we are confronting serious issues on The Practice,' but what gets inside the nerves, under the skin of our viewing constituency is short skirts and unisex bathrooms."

There's nothing to suggest that this 41-year-old white male would know anything about the interior life of a single female lawyer in her mid-twenties, much less have a hit show about one. He's married (to actress Michelle Pfeiffer), with two young children and a job that doesn't let him get out much. Okay, he's a lawyer, but that's his only edge. In fact, there's nothing about Kelley that suggests much exceptional at all. There's no particular sizzle about him, nothing to suggest an intense ferment of ideas. Corralled in his office for an appointment he would clearly rather avoid, Kelley looks like a grown-up slacker -- unshaven with wispy, unkempt hair, wearing a rumpled plaid Ralph Lauren shirt, khakis and sneakers -- like a guy whose mother would still be telling him to pick up his clothes if he lived at home. In general Kelley avoids the media; he is private to the point of being reclusive (reporters are warned not to ask about his wife) and doesn't volunteer any of the voluble opinions on display in his scripts. "I admit, it's not my favorite" activity, he mumbles as he finally settles in for a chat. A photographer is out of the question.

But it's not just that Kelley is shy, it's also that he has better things to do. "David does not have a long attention span. It has to be about the matter at hand," says Bob Breech, the supervising producer on "The Practice" -- someone Kelley often accuses of talking too much. "David tends to confine the great stuff you see and experience to his writing. You don't get a lot of that in his day-to-day life."

What he lacks in charm Kelley makes up for in substance. The producer is a keen observer with an unerring instinct for human nature -- male or female.

"This man understands the way a woman thinks," says Dyan Cannon, who plays a middle-age sexpot judge having an affair with Ally's thirty-something boss, Richard Fish. Cannon has just finished shooting a scene with a Janet Reno look-alike, in which the two women spar over Fish's fetish for Reno's wattle.

(Such is David Kelley's world. Gag A: Janet Reno as sex object? Gag B: Competing with Dyan Cannon? Gag C: The wattle' as fetish? Gag D: What's a wattle again?)

Cannon continues: "It's not only that, because men have the same feelings. I think everybody wants to be loved, to feel loved, but I think we put on masks, pretending like we don't. David knows how to take those masks off through his different characters, to unravel the complex ways we've found to hide our fears."

She lobs a piece of popcorn into her mouth and motions up at the office where Kelley is laboring away.

"He takes the things most sacred, most poignant and makes fun of them. David's writing gets under your skin. You'll say the line and you'll laugh -- then 10 minutes later you'll be thinking about it. It's like a 10-course meal." The Writing Life

Upstairs, in the faded yellow Building D of Ren-Mar Studios -- Lucille Ball's old Desilu comedy factory, now taken over by David E. Kelley Productions -- the writer is mulling over sexual harassment.

How does he feel about it? You can't really tell from his scripts, in which -- for example -- an office secretary rallies women staffers to sue the law firm for creating an environment in which the sexy women get ogled, offending the others. Is he defending women or making fun of them?

"I'm actually very muddled about it," he confesses. Kelley sits behind a desk in a spacious but unadorned office. A fair number of the bookshelves are empty, though one portion holds legal tomes. Scattered documents and an open Guinness Book of Records sit on his desk along with a blank legal pad and his favorite writing instrument -- a heavy metal Bic ballpoint with blue ink. He squints. His brown eyes are slightly hooded and he has a thick, puggish nose and a mole or two; the word "earthy" comes to mind. He speaks with clear, deliberate focus.

"I'm against sexual harassment, but I think the laws serve to victimize women. Which is the episode I'm writing right now," he says. "There's a woman who's suing not because she was sexually harassed, but because she noticed that some women were promoted around her. . . . She's suing for de facto sexual discrimination, even though there was no harm done to her."

Is this based on a real case? "No," he says with a smile. "But it's got to be coming." Then there's discrimination. "Ally McBeal" law partner Richard Fish demands the right to insult short people at an uncle's funeral because the deceased hated the vertically challenged. This leads to a hilarious gospel version of Randy Newman's "Short People" at church, but there's a more serious undertone -- the concept would be very un-funny if it were about blacks or Jews.

Kelley knows that, and looks for those contradictions. "We come from confusion," he says. "We are making fun of political correctness at one point. . . . But you can't escape the likelihood that he will be endorsing bigotry. Where do I come down? I don't know."

Then there's that unisex bathroom, a subject of intense debate among "McBeal" fans on the Internet and elsewhere. Recently Kelley read about a professor who was discussing the topic in a college course. The idea for the restroom "was about 10 seconds of thought. I'm not kidding," he says, idly twisting a paper clip. "I've never been in one. I've never seen one. I've heard they exist -- but we were not trying to make some sort of societal statement." (His office, for the record, has separate facilities.)

He explains: "We had a limited number of sets we could build. I wanted the characters' paths to cross. There's a certain kind of locker room candor that takes place in a bathroom, and I wanted the women and men to talk at the same time in the same room."

He pauses. "Then the other factor was that it was Fish's law firm, and Fish was probably the kind of guy who always wanted to go into the girls' bathrooms all his life and he figured out a way to do it." He laughs. Going to the Source

Where does all this stuff come from? Everywhere.

Just about anything that crosses Kelley's path is fair game for his powerful gift of observation and osmosis. The son of a colleague recently gave a bar mitzvah speech about having Tourette's syndrome; out came a "Practice" episode about Tourette's. Camryn Manheim, who plays a lawyer on "The Practice," protested when her character was derided as a "hippo." Out came an episode about discrimination against fat people. Kelley saw a holographic image of a baby on the Internet and now uses it as a recurring representation of Ally's biological clock. No one is safe. He names characters after old friends, used one grandmother as the model for a dwarfish character on an earlier series and the other grandmother for the logo of David E. Kelley Productions, the one who flips over in a chair while watching TV.

But more impressive than a knack for finding stories is his ability to swiftly translate it all into entertainment, to put his ideas into the mouths of believable characters. All of those who work with Kelley marvel not only at his resourcefulness but also at his ability to create in the midst of a maelstrom -- his door open, phones ringing, assistants constantly rushing in with emergencies to resolve.

The writer, it seems, is transported by the life of his characters. "It's like an elf gets up on his shoulder when he writes," says "Practice" producer Breech. "He can write a solid, solid script in four days. And he can write a solid script in two days. I don't know how the hell he does it, his willingness to deal with the pressures that would buckle the knees of most people."

But Kelley can be absolutely anywhere when the muse strikes him. Breech has been in meetings where, in the time it takes for him to avert his gaze and glance back, the writer will be engrossed in scribbling dialogue. Kelley Productions President Jeffrey Kramer sees Kelley sink into his imagination in the middle of lunch. "I wish I could hear the characters talking inside his head, because I can see him playing out the scene," he says.

If Kelley readily borrows material from his surroundings, he also draws on his own experience in Middle America, all part of a previous, pre-Hollywood life.

Born in Waterville, Maine, Kelley moved with his family to a suburb outside of Boston at age 7 after his father, a college hockey coach, took a job at Boston University. Ice hockey was an obsession in the Kelley household; all the kids -- three boys and a girl -- played the sport and grew up hanging around in locker rooms. (His father is now a semi-retired executive for the Pittsburgh Penguins, and one brother is a hockey talent scout.) As a child, Kelley was not much interested in writing or, for that matter, studying. He coasted through school, learning enough to make the grade at Princeton, where he was recruited for his hockey skills. There, rather than study the material, he studied the professors to figure out the likely exam subjects, graduated in '79, then headed off for a delirious, do-nothing year playing professional hockey in Switzerland.

But early on he had an active imagination, a natural curiosity and an idiosyncratic streak. In his junior year at Princeton, Kelley submitted a paper for a political science class about John F. Kennedy's plot to kill Fidel Castro -- in verse. The next year he wrote about the Bill of Rights in the form of a play, with each principle as a character.

"He was one of the guys, he did all that stuff, played all the sports, but was definitely quirky," says his mother, Ginny Kelley.

He returned from Europe to Boston University law school.

A classmate recalls Kelley's commencement address: "He said he always thought it would be easy to be a lawyer -- come in in the morning and sue someone, preferably a doctor. Take a long lunch. Get back to the office and settle with whoever you sued that morning. Go home early."

He practiced law for three years before selling a script for a film that never got made. Still, the script got Kelley his first job writing, for producer Steven Bochco's lawyers-in-love drama in the 1980s, "L.A. Law." After taking over many of the series's writing duties, Kelley went on to create "Doogie Howser, M.D."; the much-decorated medical drama "Chicago Hope," which still airs on CBS; and the award-winning "Picket Fences," which was canceled after a couple of seasons of critical acclaim and tepid audience response. "The Practice," which debuted nearly a year ago, has had a slow road to acceptance, but has performed appreciably better in the ratings since ABC moved it from a Saturday night slot to Mondays early this year. "Ally McBeal," meanwhile, has been one of the only new hits of the fall schedule. In between, Kelley managed to write two feature films, one of which -- about an Alaskan hockey team -- will begin production this year.

Throughout his Hollywood successes and despite his five-year marriage to a movie star, Kelley seems to have remained more or less a regular guy. He still plays in an ice hockey league once a week, talks to his siblings often and leaves work in the evening to play with his kids. This normalcy is the source of endless pride to his parents. Says his father, Jack Kelley: "With all the success and all the attention brought to him, he hasn't changed one iota. He's the same, unassuming young man who left here 12 years or so ago." In the Zone

On a Thursday earlier this month, the cast of "Ally McBeal" moved into an office next door to Kelley's to shoot a scene, a money- and time-saving measure in the pressured world of television production. In the sequence, Flockhart's McBeal was visiting a shrink, played by Tracey Ullman, and the two actresses were surrounded by the usual army of cameramen, assistant directors, makeup artists and technicians. Maybe 25 people were crowded into the office and the small foyer.

A few feet away, Kelley was writing. With the door open.

"It was all white noise to him," says Breech, wagging his head in disbelief. "It allows him to concentrate."

In an industry that is necessarily collaborative, Kelley is remarkable as a loner. His extraordinary productivity in writing "Ally McBeal" and "The Practice" is also an important clue to his personality: He wants things precisely the way he imagines them. He can best ensure that when he does it himself. He has said it is actually faster to write a script himself than to explain what he wants to another writer.

The one thing David Kelley doesn't write about, it seems, is himself. There are no characters on either of his shows who are fortyish and married with kids. There isn't anyone who looks or sounds like David Kelley. Clearly he prefers to address complex issues of morality, to delve into the internal conflicts of others rather than to explore his own personal demons.

Or maybe he doesn't have any.

"It would be hard to make that interesting," he says when asked about himself. "Maybe we could do it with a series on marital relations." He pauses to think, then deftly guides the conversation elsewhere. "Even with Ally,' we've got to be very careful not to let it sink to a narcissistic form, where it's me-me-me. One good thing about law shows for me is that they're about other people's problems."

Doesn't he ever fear running out of ideas?

"I don't even think about it. I just go from one script to the next," he says. "The blank page isn't as daunting as it used to be. I used to worry that the machine was broken. But I've been at this long enough to know that if it's blank now -- " He breaks off and glances at an assistant who is signaling something urgent. "Something will come." CAPTION: David Kelley, below; "The Practice's" Dylan McDermott, above; "Ally McBeal's" Calista Flockhart, right; and "Picket Fences' " Tom Skerritt. CAPTION: Janet Reno look-alike and Dyan Cannon, above, on the set of "Ally McBeal." Christine Lahti, left, stars in David Kelley's "Chicago Hope." CAPTION: The entertainment power couple Michelle Pfeiffer and David Kelley at an L.A. awards dinner.