Comment
Tera Explorer

Hi Earl,

Great topic. It is common to see copy-pasted pieces of code from non-client-callable to client-callable, which is far from ideal.


There are more solutions to the problem.

To me, the non client-callable is the library of all all reusable functions and the client-callable are just exposing the them to the client. In other words: client-callable should only handle the API (parameters, stringify the return value) add some security and call the server script include that does the business logic.

I think it is more readable. Client-callable has one job, and non-client-callable is the reusable part.

 

What do you think?