A web app includes code that runs on the client and code that runs on the server. For example, code that manipulates the view runs on the client and code that accesses the database runs on the server.
This lets you write a function where some of the code runs on the client, some of the code runs on the server, and the compiler figures out which and emits the network RPC calls for you.
This lets you write a function where some of the code runs on the client, some of the code runs on the server, and the compiler figures out which and emits the network RPC calls for you.