In Buddhism, extremes are not encouraged. Before Buddha became Buddha, his name was Siddhartha Gautama (click here for a detailed list of important events in his life story). When Siddartha was out in the world, he eventually traveled with a group of five ascetics; wise men who had renounced worldly life, and wandered the countryside, meditating to seek enlightenment. In an effort to dispel the ego by mortifying the body, they lived an extreme life, wore only rags, and ate only roots, berries, leaves, and whatever little else the forest provided. Siddartha followed their ways, sometimes eating only one grain of rice a day while meditating. After six years he had the body of a skeleton.
One day, when he was on the verge of death, Siddartha heard a man trying to teach a young boy how to play a lute. The man told the boy that if the strings of the lute were too loose, the instrument could not produce any sound. Likewise, if the strings were too taut, they would snap, again preventing any sound. At that moment, Siddartha realized that he was living the way of the taut string. He at once knew that what he was doing was not productive, and that his current approach was not the way to find the answers he sought. After that he fainted due to extreme weakness, and was only revived after a young boy herding goats gave him some fresh goat's milk. Upon waking Siddartha realized that if it were not for that nourishment, he would have died not having obtained the answers he sought.
Slowly Siddartha got up from the ground and made his way to the river. He bathed and made himself a robe from cloth he found on the riverbank, clothing discarded from dead bodies to be cremated. A young girl offered Gautama some milk rice while he was sitting on the riverbank. He graciously thanked her and ate the rice, appreciative of its nourishment. He went to the village and again started begging for alms. When his fellow ascetics heard of this, they were deeply offended, and promptly abandoned him. Gautama spent a long time building his body to its original strength and health. One day when he had again become healthy, he sat under a Banyan tree and resolved that he would not move away from that spot until he attained enlightenment. After several weeks, he did, and became the first historical Buddha. Every concept we know as basic Buddhism was realized under the Banyan (Bodhi) tree.
Of course it is also important to mention that as Prince Gautama, the Buddha originally came from a very wealthy, lavish, and sheltered background. He could have anything he wanted, and was kept from the sorrows of life; old age, disease, and death. After his enlightenment, Buddha found his ascetic companions, befriended them again, and gave his first sermon.
And the Blessed one thus addressed the five Bhikkhus [monks].
"There are two extremes, O Bhikkhus, which he who has given up the world, ought to avoid. What are these two extremes'? A life given to pleasures, devoted to pleasures and lusts: this is degrading, sensual, vulgar, ignoble, and profitless; and a life given to mortifications: this is painful, ignoble, and profitless. By avoiding these two extremes, O Bhikkhus, the Tathagata [a title of Buddha meaning perhaps "he who has arrived at the truth"] has gained the knowledge of the Middle Path which leads to insight, which leads to wisdom which conduces to calm, to knowledge, to the Sambodhi [total enlightenment], to Nirvana [state of release from samsara, the cycle of existence and rebirth].
Given that the course for Buddha's enlightenment was set by following the Middle Way, this concept is also fundamentally linked to the Four Noble Truths, Noble Eightfold Path, Five Moral Precepts.
More about general story of Buddha recounted above can be found here.
May all beings be happy!
May all beings be happy!