title: How do Java REST calls relate to the front end of a Web Application?
body: <p>I am aware of how <code>REST</code> calls work from within a <code>Java</code> Web application. E.g. when a <code>URL</code> is reached its method will be called using <code>HTTP</code>. </p>
  
  <p>For example:</p>
  
  <pre><code> @GET
      @Path("people/{id}")
      public Response getPersonWithId(@PathParam("id") id) {
  
        //return the person object with that Id
  
      }
  </code></pre>
  
  <p>What I am <em>unsure</em> of is how this links to the front end?</p>
  
  <p>Is the role of the UI ( i.e. <code>javascript</code> ) just to take a user to the specific URLs so that the back end methods can be called?</p>
  
  <p>E.g. if a user presses a "get details" button, does the button just redirect them to this URL that deails with returning the details, and the back end functionality is then called?</p>