Here are some differences between
Remote Action Function:
- Remote Action can call the apex methods from any apex class.
- Remote Action methods are static and global, hence don’t have access to your current controller variables and methods.
- Remote Action methods require less bandwidth, and server processing time, because only the data you submit is visible and the view state is not transferred.
- Action Function is a Visualforce tag allows you to invoke a controller action from the Visualforce Page asynchronously via AJAX requests.
- Action Function can call the apex methods only from the class linked to the Visualforce page.
- Action Function doesn’t let you get retrieve data but you can
rerenderthe page or a specific section of the page to update it with new values from the controller instance.
- Action Function methods are instance methods, and so can see the entire page state.
Action Function has to transfer the page view state.
- Action Function methods automatically update the Visualforce DOM and can refresh part or all of the page, and can provide a standard interface for showing a loading status through
apex:actionFunction is easier to use and requires less code, while
@RemoteAction offers more flexibility. Moreover,
@RemoteAction helps in reducing View State size and also provides you near real time transaction.