This period provided the materials for Kerouac 's novel The Dharma Bums , and Snyder was the inspiration for the novel 's main character , Japhy Ryder , in the same way Neal Cassady had inspired Dean Moriarty in On the Road .