John Farmer (16 August 1835 – 17 July 1901), was a composer, music teacher and organist from Nottingham.
His father, also John (1812–1894) was a butcher and his mother, Mary, a milliner. The eldest of four children, John Farmer was recognised as a child prodigy, playing violin, piano and harp. His uncle Henry Farmer (1819–1891), was also a conductor, composer, violinist and organist in Nottingham. He owned a successful music-warehouse and nurtured his nephew's musical talent.
Between 1849 and 1852, John Farmer studied piano at the Leipzig Conservatory with Ignaz Moscheles , after which he studied for a year in Coburg under Andreas Spaeth, a composer, organist and clarinetist. Farmer returned to England to briefly work in his parents' millinery business, then travelled to Switzerland in 1853, marrying Mary Elizabeth Stahel (1840–1914) in 1859, the daughter of a Zurich schoolteacher, with whom he eventually had 7 children.
His daughter Mary was married to the classicist John Burnet.
After teaching in Zurich for some years, John became music master and violin teacher at Harrow in 1862, reportedly appointed as a result of being noticed while giving piano demonstrations at the London International Exhibition. During his time at Harrow, he introduced 'house-singing' (still part of a new boy's 'initiation' into the school community) and composed many school songs and other larger vocal works for the education and enjoyment of students and staff. He encouraged the participation of the boys in massed singing for school events and the serious study of instrumental music. This was during a period when the inclusion of music within public school education in England was in its infancy and its acceptance was often resisted by school boards and principals. Affectionately known as "Sweaty John", Farmer also introduced the smoking concert, or "Tobacco Parliament", that was held on Founder's Day, where school songs and musical contributions were welcomed from staff, boys and friends, with Farmer's items particularly memorable - he was remembered as a "capital entertainer" according to Ivimey. His songs continue to be published in modern editions of the "Harrow School Songs" book. The school song, “Forty Years On”, was written in 1872 with fellow teacher Edward Ernest Bowen as lyricist. He also composed cricketing ditties like "Willow the King," one of the most famous of all cricketing songs. His opera, "Cinderella" was performed at Harrow in 1883.