I commonly use focus stacking to extend the area of sharpness within a photograph. This picture of the Beckman Institute of Advanced Science and Technology at the University of Illinois is an example of a simple two frame blend to render the photograph sharp throughout:
In an image like this, my goal is the render both the foreground object as well as the far more distant building in sharp focus. The foreground object is very close to my lens...the tripod legs were touching the edge of the disk. To accomplish this, I captured two photographs...one focused on the foreground object and the second on the building. I later blended the two exposures in Photoshop to achieve sharpness from front to back.
Another method is to use a smaller aperture (f/22, for example) to extend the focus area. However, this foreground object was so close that even a narrow aperture wouldn't render everything sharp. Additionally, sharpness tends to fall off as the aperture becomes smaller due to diffraction. Also, unless your sensor is super clean, f/22 will reveal every single dust particle and make removing all of those spots a more tedious post processing exercise. So, I dial in the sweet spot for my lens (usually about f/8) and focus stack multiple frames. That way, I have the best of both worlds--the use of the sharpest aperture for my particular lens and an extremely wide area of sharpness.