I usually buy online, from local shops at the water I frequent. I also try to stop by and pick some up in person when onsite. That being said, I tie over 90% of the flies I actually fish with, so I buy more materials than actual flies.
The local fly shop, may be more expensive, but I always get a warm cup of coffee (on the house) and a place to take a break. Knowledge about current conditions as well as tips and advice that you can't get from Sri Lanka or China. Think about the wealth of knowledge shared on this website.