On the Dart page, when the UI requires information from the backend, an **Event** is dispatched to the **Bloc**. The Bloc then creates a **Request** and passes it to a **Repository**. The Repository then communicates with the [Restful Server](Restful Server) which uses [Controllers](Server Components#controllers) to accomplish the task for the request.
On the Dart page, when the UI requires information from the backend, an [Event](Events) is dispatched to the [Bloc](Blocs). The Bloc then creates a **Request** and passes it to a [Repository](Repository). The Repository then communicates with the [Restful Server](Restful Server) which uses [Controllers](Server Components#controllers) to accomplish the task for the request.
# Await
In the Repository, the **await** keyword is used to force the caller to wait for the function to complete and ensures that our response will get the data that it has requested from the server.
Below is code from the login repository that takes in a Login Request, encodes it as JSON and then sends a POST request to the server, awaiting a response from the server that confirms whether the password from the Login Request matches the password associated with that player in the Database. If it does, the response will be successful and the player will be logged in.