there's no "best" way to do it. generally if you get hungry during or after exercise or you feel your energy is running low during the workout then have a snack 30 minutes before the workout. carbs and protein like in an energy bar are good. if you feel okay during the workout not eating then it's okay. some people can eat a full meal before working out but for the most part too much food in the gut will make you feel uncomfortable during the workout. again if you run low on energy without food during exercise then have something to eat.
is it best to exercise first and then eat a full meal or eat a full meal first?