I have done both of these "styles" (selling and upgrading rapidly versus holding on till you really can't anymore). Based on the experience of myself and my clients, I would say that the "average lifespan" of a Mac varies from four to seven years, based on what level of use you put into it.
I held on to my beloved BlackBook for five years -- a bit longer than I should have but I was waiting to see if new MBPs would come. They didn't in a timely fashion, so I bought a "tide me over" 2009 MBP and while old by current standards, it was a step up from where I was -- so by the time the "new" MBPs we will probably get this year (I'm going to guess June, just a guess) appear in the refurb store (let's say September), I'll be ready to buy one and will sell this one for what I paid for it ($500) since it is still a capable machine that can run Mountain Lion and most everything short of some high-end games (which, to put it mildly, is not a priority for me).
It depends on your needs, but two things that are worth pointing out:
1. There's probably a reason why AppleCare goes no further than three years. For those people who like to switch out models frequently, that still leaves them with time to sell the unit "with warranty." For those who hold on to their machines, if you haven't see defects by the three year mark you aren't very likely to see them at all.
2. My experience over the past 30 years (!) with Macs is that the OS that your machine comes with will likely be supported for up to five years. At the point the OS is no longer supported, you should really be at least thinking about your next Mac.
Finally, on the topic of iOS devices: most people have contracts that make it very cost-prohibitive to change out every year. When you see references to this sort of thing, MOST of time what they mean is that they got a device, then a new device came out so they got a new contract and did a "hand-me-down" to a family member. This happens A LOT, but as a rule of thumb I'd say most Americans (who only have two-year contracts, those lucky duckies!) upgrade every two years-ish. I know I jumped from the original iPad to the new iPad (completely skipping the iPad 2).