What a lot of people don't realize is you can just put your knee up when it jumps at you, and it'll get stopped dead in its tracks with either a good hit in the chest, throat, or jaw. Plus it ruins the dog's momentum (which is the only thing a dog has besides its mouth). At that point, if you're assertive and calm you can just tell it to sit or stop and it will, unless its a really, really well trained, then your best bet is to break the dog's jaw as soon as possible >.>
About the worst things you can do when a dog is after you is:
A. Run. The dog is faster, and will always win.
B. Freak out and put your hands up. The dog will blow you over with momentum and will probably ruin your hands with his claws or teeth.
C. Fall on the ground. Once you're on the ground you lose your height advantage, your ability to react, and the ability to be "dominant" over the dog, not to mention you're at the dog's level so it doesn't even need to jump. Once you are on the ground, you're pretty much screwed.
A dog coming at you can be terrifying, which is why its so effective. But if you win the psychological warfare, you'll be suprised how fast the dog's pack instincts will kick in, especially when you're calm and assertive. And instincts are VERY hard to train away.