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.