O'Reilly logo

Building Applications with Scala by Diego Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our REST client proxies

We will now make REST calls; however, we will create a Scala API. So, the developers who use our rest-client won't need to deal with REST and just execute the Scala code. This is good for many reasons, some of which are as follows:

  • SOC: We still have separation of concerns between the Play framework and the client application
  • Isolation: If the REST API changes, we will need to deal with it on the proxy layer
  • Abstraction: The rest of the client code just uses Scala and does not know anything about REST or HTTP calls

These techniques are very common nowadays with microservices. These techniques can also be known as drivers or thick clients. Right now, we will need to create three proxies, one for each resource, that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required