Allow the battery to drain as least as possible.
2 years, only 14 cycles (mostly by accident or power goes off) and 98% charge on my machine here.
I've heard of people with 3 months, hundreds of cycles and only charges to like 87% or so now.
If you really want the machine to last, avoid using the keyboard and trackpad, use that thin plastic packaging and cover up the keyboard area with it.
Prevents dirt and liquid spills from getting inside the machine, don't tape it tight, allow the air to get underneath to get inside the machine.
Use external devices instead and the ports and optical drive as little as possible.
Avoid 3D gaming or other uses where a lot of duxt can get inhaled into the machine, there are cooling fins that get clogged and actually need to be cleanned annually but Apple doesn't tell anyone, just lets their machines overheat and die in three years.
It's that or they make a newer OS X version that won't run on your older machine.
Leaving the MacBook Pro plugged in most of the time will not harm the battery. However, contrary to some information distributed about Lithium-Ion batteries, discharging to shutdown and then charging does not do any good for the battery. All that does is calibrate the charge reporting circuitry, NOT the battery.
Independent battery testers have found that the practice of discharging a Lithium-Ion battery to 50% and then recharging will produce about four to five times the cycle count life of discharging to shutdown regularly.
The best balance between usage and charge seems to be around the 50% and charge point. Leave the MBP plugged in, unplug periodically to exercise the battery, and then recharge around 50% charge remaining.
But most important, don't fixate on the battery and charge, enjoy and use your MBP.