actually, with lithium and nimh, the charger senses when the battery is full, and shuts off the charging. so in that sense, there's no problem with leaving it permanently connected to the charger, it won't be "constantly charging".
the problem comes if you don't actually use the battery. in addition to the two factors of number of charge cycles and age of the battery, there are two other equally (or more) important factors: temperature, and usage. keeping the battery at a high temperature (eg., inside your hot laptop!) shortens its life a lot. and, you must regularly use it, otherwise the internal connections will become corroded and even though it can take a charge, it can't effectively deliver the current.
i used to think i was smart leaving my laptop plugged in all the time, so i wouldn't use up the limited number of charge cycles. wrong! that's one of the worst things you can do. within two years, my battery was dead. the symptoms are that the battery has a relatively low charge cycle count, and seems to take a full charge. but after a short period of using it, the laptop will suddenly shut down, with no warning that you're getting close to empty.
that's why apple recommends doing a "calibration" thing at least once a month, fully discharge and recharge. i'd say do it more often.
apple doesn't recommend using a macbook with no battery installed; sometimes if extra power is needed, it will be drawn from the battery. so one idea is to use an old battery while you've got it plugged in to AC. store your "good" battery only partly charged, about 40% or so, and in a cool place. take it out and use it once a month at least. it's not so convenient, when you have to dash out the door and your battery isn't fully charged. but it's the best way to keep a long life.