One popular current 'state of the art' is to use a RESTful API service on the backend, and the front-end is responsible for data display and sending requests/commands to the server. This is usually done through simple HTTP requests to URLs with special meaning, but many other variants work generally the same way (with some varying details - think SOAP, etc).
In your case, the front-end loads up and calls a GET to /nodes
, which returns a JSON from your back-end to your front-end with the full node structure as you outlined.
The user wants to move a node, so the front-end might POST to /nodes/move/{nodeToMove}/{nodeDestination}
. The back-end attempts to execute the command, and then returns...well, what does the front-end want it to return? You can just return success/failure, or you can return the whole new structure. This depends on your particular situation - and if you don't need to return the whole new structure or the structure is very large, then don't return it.
How the front-end displays this is...well, up to the front-end person and will depend on use case, and there is no universal answer - it's about maximizing human usability. The front-end can "assume success", but then will have to figure out how to gracefully deal with the issue when an error returns or if data gets out of sync. What if the user request to move Node G under Node 1, then delete Node 2 and everything underneath it. If the first command failed, the second command might delete something unintentionally!
Then the question is of when to lock the UI - and the answer varies based on your use case and other aspects of what your program is actually doing. When a command that changes data has been issued it's usually best to block further changes until that first command has been verified to be completed, or you get into some weird situations - like trying to edit a file that has been deleted or that is currently being copied (will the copy show these edit changes?), etc.