The writer-director of the foodie movie 'Julie & Julia,' opening Aug. 7, is as comfortable wielding a paring knife as she is aiming a movie camera. On this day, though, she can't figure out why her apple tart won't bake. The dessert has been in the oven of her Upper Eastside apartment for more than an hour, twice the time recommended in Julia Child's 'Mastering the Art of French Cooking: Volume One,' from which the recipe (and Ephron's new movie) comes. She isn't panicking. Cooking, like filmmaking, can't always be governed by inflexible rules and timing. There has to be some serendipity, too. Ephron's 'Julie & Julia' is a movie about two chefs, but their parallel stories dramatize a bigger idea -- that determination, creativity and passion can change a life. Those same attributes can produce memorable dishes in the kitchen, too, as the apple tart may prove. Julie Powell's 2005 book 'Julie & Julia: My Year of Cooking Dangerously' and Child's 2006 autobiography, 'My Life in France,' are the kind of unusual romances that Ephron, 68, has been drawn to throughout her film career: writing credits on 'Heartburn' and 'When Harry Met Sally ... ' and directing and writing credits on 'Sleepless in Seattle,' 'You've Got Mail' and 'Michael.' Powell, a failed actress and discontented Manhattan secretary, felt unaccomplished and unfulfilled. As a personal challenge as she neared 30, she decided to cook all 524 of Child's 'Mastering the Art of French Cooking' recipes in a year, blogging to a growing fan base about the experience. While Powell's expedition presented perilous challenges -- setting aspics, euthanizing lobsters, boning a duck -- it also brought focus and satisfaction to her life: She became an author and rediscovered friendship and love. Powell condensed her blog posts and added biographical material for the book version of her online diary. Child's autobiography traced a similar narrative of discovery and transformation. Born Julia Carolyn McWilliams, a child of privilege who didn't aspire to be a society wife, the Pasadena, Calif., native experienced an epiphany when in 1948 she visited France with her diplomat husband, Paul Child, and bit into an incomparably delicious sole meuniere. A stranger to both the country (she didn't speak French) and cooking (she didn't know what a shallot was), Child was transformed by that piece of fish and committed herself to learning how to cook and, subsequently, crafting her own cookbook. It wasn't easy. Paris' Le Cordon Bleu cooking school didn't welcome the enthusiastic American. It took years of recipe research and publisher rejections before Child and co-authors Louisette Bertholle and Simone Beck completed their cookbook. Published in 1961, 'Mastering the Art of French Cooking' set off a revolution in American kitchens. Where women had once hustled out tuna noodle casseroles, they began slaving over blanquette de veau a l'ancienne. What drew Ephron to a story that cuts between the two women's lives were their different yet believable marriages. Julia Child's (Meryl Streep) and Paul Child's (Stanley Tucci) postwar romance was a red-hot affair filled with afternoon delights, whereas Julie Powell's (Amy Adams) and Eric Powell's (Chris Messina) modern relationship was more focused on careers than copulating. 'I may NEVER want to have sex AGAIN,' a frustrated Powell writes. 'These two people,' Ephron said of Julia and Paul Child, 'and you would never have guessed to look at them, had had this wild, fantastic sexual connection. And then there was the story of this married couple living in New York right now who absolutely never got laid -- ever.' Rather than cite books or movies about food as her 'Julie & Julia' references, Ephron pointed to films about marriage: 'The Thin Man,' 'The War of the Roses,' 'The Palm Beach Story.' 'The truth is that most marriages have food as a major player in them, and certainly mine does,' said Ephron, who is married to author and screenwriter Nick Pileggi ('Goodfellas,' 'Casino'), and wrote about her earlier marriage to journalist Carl Bernstein in 'Heartburn.' Ephron's best-selling 2006 memoir, 'I Feel Bad About My Neck: And Other Thoughts on Being a Woman,' shares an almost equal fascination with gastronomy. Yet even the most experienced cook can turn out a strawberry souffle resembling a red Frisbee. On her groundbreaking, low-tech public television show 'The French Chef,' Child occasionally launched food onto the floor. Powell's debacles included greasy mayonnaise, carbonized boeuf bourguignon and inedible poulet en gelee a l'Estragon. Child discourages store-bought ingredients; her cassoulet recipe calls for homemade sausage cakes. Powell, who found some recipes inexact or overly complicated, sometimes departed from Child's thoroughly tested recipes. That irritated Child, who dismissed Powell's blog as not worth her attention. Ephron grew up in Beverly Hills, Calif., with plentiful good food around -- her screenwriter parents had live-in cooks -- and graduated from Wellesley College in Massachusetts just as Child's first volume of 'Mastering the Art of French Cooking' was published. Like many women her age, Ephron's eyes -- and taste buds -- were opened by the cookbook. 'Everybody in America was waking up from a long slumber with Campbell's cream of mushroom soup,' Ephron said. 'Every woman I knew was doing this insane amount of cooking,' she said of her postgraduate food fixation. 'It was obsessive. It was competitive. It was pathological.' Sony studio chief Amy Pascal pitched Ephron on 'Julie & Julia,' and producer Amy Robinson thought of combining the two books into one movie.When screenwriter Dana Stevens ('City of Angels') dropped out, Ephron was free to both write and direct it. 'I felt my entire life had prepared me to write this screenplay -- my obsession with food,' Ephron said. Outside of having just one week to shoot in Paris, Ephron said that one of her hardest challenges was creating tension within Powell's narrative; she eventually added a scene where, over a lunch with girlfriends, the blogger's occupational shortcomings are more palpable. She cast Streep after a chance encounter -- in which the actress effortlessly slipped into Child's distinctive patois -- and then devised schemes to make the 5-foot-6-inch actress look as tall as Child's 6 feet 2 inches. Ephron's costume department built lift shoes, her carpentry staff built sets with two levels, and her casting director hired short extras to fill the background. 'We did every trick in the book,' Ephron said, 'but we never used special effects. It was as if we did it 20 years ago.' Child's apple tart recipe says the pastry shell should be 'partially cooked' before it is topped with applesauce, apple slices and strained apricot preserves, but gives no time. 'What does that mean -- `partially cooked'?' Ephron said. 'How long is that?' About 15 minutes, it turned out. Ephron then spread applesauce and arranged the apple slices. She struggled with the irregular geometry of hand-formed pastry. 'This is a nightmare, a total nightmare.' It wasn't, really: The tart looked lovely, especially with apricot glaze drizzled on top. As much as 'Julie & Julia' celebrates food, as much as cookbooks stuff bookstores, as much as food shows pack the airwaves, as much as almost every home remodel features a new kitchen, Ephron isn't sure the culinary craze adds up to anything more than a passing hobby. Like SUV owners whose mammoth vehicles never leave the pavement, the cooking craze seems to be more about hardware than food. 'No one seems to cook anymore,' she said. But for those who wait -- or cut a few corners -- the results can be sublime. After nearly 90 minutes in the oven (turned up to 425), the apple tart finally came out. 'That's really pretty, don't you think?' Ephron said. Biting into a nearly molten slice, she smiled. 'I think,' she said, 'that this is delicious.' 