When it comes to cleaning a chain, my take is that if you're going to do it, you should do it well. The Park Tool-style on-bike cleaner gets points for articulating the chain inside the solvent to work the grit out of it, but in the meantime, it can splatter that solvent elsewhere.
I prefer to take the chain off when I do, so that I can also wipe accumulated grit off the chainrings and cassette.