Keeping the battery life the longest possible, is, essentially, keeping the charge the greatest over time, since that what decays in your battery.
Here's some rules you should run your battery by, and it should have a long, happy life:
1. Always discharge your battery completely at least once a month.
2. If you're using your notebook for an extended period of time on AC power (like a few weeks) consider removing the battery and setting it aside.
3. Never store your battery fully charged - leaving it with a 40-50% charge will increase it's lifespan.