Longevity is based on several factors. I heard someone on byc say they had a hen 18 years old. I have a friend who has 11-13 year old hens who still give random eggs. I have seen it in my own flocks at 10+ years of age as well and currently have 8 year old hens who are still laying occasionally.
The determinant factor is how fast you use up your hens egg supply. It is my understanding a hen is born with her full lifetime egg potential. If you put lights on them all winter and push them to lay year round, they will run out of eggs faster. If you let them lay on a natural cycle over their lifetime, they can provide eggs for a very long time. Health and diet are also key factors that can impact laying.
I guess how one raises their birds is based on what they want out of them. If you want a producer, you can push for eggs and just have to replace hens more often. If you want a pet that provides some eating eggs, let them be natural and in a healthy environment with a proper diet, they can live and lay fairly long.