Few Best Practices I can remember:
- Avoid calling remote function in
- Keep payload size minimum in controller
- Don't use global/public variables in static method or any approach like this. Keep everything in method.
- Sometimes same thing needs to be done again and again for each remoting method in controller. Create a common utility for it.
- Remoting count agains API calls, so this limit should be considered.
- Remoting can upsert/insert/update in parallel on same object. Design your method to avoid Record Lock situation.
- Use wrapper classes instead of List/Map to return result. This makes the code readable and manageable to your next dev and yourself.