Map
So there are three different languages:
- Scala
- Javascript
- HTML
Google Endpoints
When this is implemented in Scala on backend, it will generate Javascript. HTML needs to load the script and call a Javascript function when loaded.
Scala JS
Written in Scala, Scala JS will generate Javascript. When the Google Endpoints script is loaded, it will callback to Scala JS's script which will created either dynamic or facade representations of it.
Shared
Since Google Endpoints is implemented in Scala and frontend Javascripts in Scala JS, it's easy to share common logic with Scala code.
Code Example
A simple implementation can be found here:
Inga kommentarer:
Skicka en kommentar