Where to put business logic of a form? ScriptCode vs ServiceProxy

When implementing business logic where is the best place to put it? ServiceProxy or ScriptCode?

What are the advantages of implementing business logic in ScriptCode? What should I use ServiceProxy for?