In an ASP.NET app, I've got to decide whether to put a complex piece of code on either the client in JS or on the server in C#.
I've considered performance (if on server, it would be a small callback), IP protection (all behavior is visible on the page), need for server interaction (none during the execution of this particular piece of code).
So the remaining question (that I'm aware of) is this:
Is it significantly easier, faster, better for testing and management, etc. to write the code in C# on the server than in JS on the client? Or is there not much difference?
UPDATE:
The application is like a highly structured group discussion (presented as a single column, or list, of rows). The function in question involves building and formatting about a dozen different types of temporary rows used in adding to, editing and moving items in the list. The rows contain a few input fields which are filled by the user and then sent to the server. The inputs will have to be thoroughly screened for security on receipt at the server.
The specific algorithm for determining the content and format of the temporary rows has as inputs 1) the row that was selected as a starting point for add, edit, etc.; 2) parent-child relationships between the first selected row and the row being added; and 3) a few participant and group session state variables.