MIAMI — Astrid Flaherty nimbly hops off a low platform and swoops from side to side touching orange plastic cones.

Though she is 70 years old and a breast cancer survivor, she seems barely winded. Her secret: lifelong exercise and healthy eating.

“Exercise is the best anti-aging pill you can take,” says Dawn Davis, a fitness instructor at Shula’s Athletic Club in Miami Lakes, Fla.

And Flaherty has discovered on her own what doctors and fitness experts are saying: people can age more successfully if they develop a healthy lifestyle when they’re young that includes exercise, a healthy diet, sufficient sleep and watching their weight.

The Miami Lakes resident still hits the gym three times a week and plays tennis on Saturdays. And her diet emphasizes fresh, natural foods.

Being in good shape also helped when she was diagnosed with breast cancer in 2007.

“People need to think about the aging process throughout their lives. I know it’s hard when you’re 20 years old,” says Dr. Sara Czaja, professor of psychiatry and behavioral sciences and the scientific director of the Center on Aging at the University of Miami’s Miller School of Medicine.

“It’s really important to take advantage of what we know,” Czaja says, “and we do know a lot about how to age healthily.”

That includes staying socially engaged throughout life and being mindful at a young age of the dangers of smoking, the links between skin cancer and overexposure to the sun, and having recommended preventive screenings, Czaja says.

“A lot of chronic disease — diabetes, high blood pressure, cardiovascular disease, obesity — may be prevented by maintaining a healthy lifestyle throughout life too,” she says.

“What we’re also learning more and more is the importance of engaging in physical exercise. That leads to not only better cardiovascular health but also better cognitive health,” Czaja says. “There is suggested evidence that being obese can cause cognitive problems.”

But the reality is what initially motivates many people to exercise is concern about their appearance — not their health, says Rickie Ali, a fitness/wellness specialist and personal trainer at Shula’s Athletic Club.

“My main goal for people is for them to have the fitness they need to get through their everyday activities,” he says. “By default, the body gets leaner. But that is not my motivation.”

Anyone who wants health for life needs to address lifestyle habits, nutrition, wellness and fitness at every phase of their lives, Ali says.

A basic mantra for anyone who wants to age well is move, move, move.

In the 20s and early 30s that means building strong muscles, bone density and as healthy a cardiovascular system as possible, Ali says. “It’s like when you build a house. You need to build a solid foundation.”

And anyone who embarks on a fitness program needs to improve their nutrition as well. “Think of food as a fuel like gas for a car,” Ali says. “You might want to drive that car five days a week, but if the gas isn’t there, you can’t do it.”

As people head toward middle age, their metabolism may slow and a more sedentary lifestyle and chronic ailments may begin to take a toll.

Ali says the movements for those at midlife are basically the same as for a younger person but the number of repetitions and intensity may vary.

For older people, it’s important to work on movements that encourage better balance, flexibility and stability, Ali says. He might have people in this age group do balancing exercises on one leg, work on posture and alignment, and do stretches.

“If you have strong muscles and core, it’s easier to stop yourself from falling and risking injury,” Davis says.

It’s important before beginning an exercise regime, says Ali, to get medical clearance from a doctor and let your trainer know if there are any limitations. He also recommends a physical and lifestyle assessment to establish a baseline for building a fitness program.

Younger people don’t tend to come in until they’re sick, she says. But regular preventive screenings can show them whether they are at risk for diabetes or high blood pressure when they are still young enough to modify diet, lifestyle — including controlling stress, fitness and weight, says Ballesteros.

Even though she’s only 27, Stephanie Martinez says she realized a few years ago it was time to make some changes herself.

When she was younger, she thought nothing of eating a whole pizza or a big plate of food. “I’m Hispanic so a big plate of food is a big plate — rice, beans, protein, plantains, avocado, tomatoes and then I would always have dessert, a very sweet dessert like mango marmalade with cream cheese.”

Even though she was active, her weight began to creep up — first 20, then 30 pounds — and she tired more easily.

That’s when she began to exercise, made healthy changes in her kitchen and got creative with recipes. Although Martinez is busy with graduate school and her job as a speech therapist assistant, she says now she’s committed to making wellness a priority.

“Now I wish that when I was younger, my family would have gone bike-riding instead of to the mall,” she says. “Parents need to give their children healthy options.”