I think that many people get a dog without much thought or to satisfy a loved one, etc. Never really thinking that they will see the dog grow up, thrive and then one day grow old and pass on. Many folks do not understand that they need to be as much of a part of that lifespan as possible only to one day suddenly face the end.
You on the other hand enjoyed Barley to the max as he did you. While his life was too short, he could not have had a better owner/friend. The pain of his loss will eventually pass and the happy memories will bring a tear to your eyes.
Sorry about your loss.