Mr Bruce pretended to walk towards a safe at the back of the shop, but instead grabbed a baseball bat and struck out at Barton, hitting him on the head, wrist and shoulder as he bundled the youth out of the store.
The court heard that during the struggle Barton pulled out the gun and pointed it into Mr Bruce's face.
The weapon went off twice as the shop owner hit the boy, but fired off blank rounds.
Later it emerged that the round had fallen off in the shop, only moments earlier.
Mrs Bruce's daughter in law was returning to the shop at the time, and after hearing loud bangs was terrified that her father in law had been shot dead.
At the time, Mr Bruce shared her fear.
"I feared for my life. I honestly believed it was a real gun. I thought I was dead. I believe I was going to found in a pool of blood", he said in a statement.
Detectives, who were later praised by the judge for their 'astute work' identified Barton by the M&S bag he was carrying, which he had recently purchased.
Soon afterwards, the student went with his grandfather to the local police station.
He initially denied that he was the would-be robber but soon made a full admission, stating that he had bought the weapon two years earlier and recently bought the mark for the pre-planned raid.
Richard Crabb, his defending lawyer, argued that the incident was part of a 'fantasy world' fuelled by video games and cannabis.
"On any view it was an inexplicable behaviour", he said. "He comes from a good home, good family.
"He felt his private education was wasted and he would let down his mother. He hit self-destruction. It was a doomed enterprise."