Independent of sound quality, I would agree that an iPod Dock is best.
No fuss, no muss, good sound, plus features like iPod recharging and so forth, make the iPod dock the best all round option, and not that expensive either.
But, if you are on a starvation budget, and would like to hear your iPod through your stereo, the headphone option is perfectly acceptable. Again, remember the bulk of your listening occurs through that headphone jack. And when feeding a high impedance input, the major flaws in the sound are relieved.
Still, iPod dock can be had cheap, I think it is the best all round option and well within the budget of most people.
As to Auto Pilot's suggestion that one is better than the other, for a variety of reasons other than sound quality, the line-out is preferred. In his example, I can't only say that there are more factors that come into play than simply the output source.
Still, for anyone, except those on a starvation budget, the iPod dock really is a sweet option.
Steve/bluewizard