I think you nailed it with "unless those exact same actions are actually (YAGNI) used as endpoints of a web service". I find client side javascript apps compelling because they are simply another consumer of your web service along with any other mobile/third-party/customer apps.