Scala PlayFramework and Angular JS - too much effort in terms of duplication and mixing concetps Scala PlayFramework and Angular JS - too much effort in terms of duplication and mixing concetps ajax ajax

Scala PlayFramework and Angular JS - too much effort in terms of duplication and mixing concetps


I would like to share the receipt used in the eventual seed (https://github.com/angyjoe/eventual):

  1. Write your HTML. Doing so, please feel free to use as many JavaScript frameworks and libraries as you wish (the seed is AngularJS though).

  2. Decide your Play models from which the controllers follow.

  3. Decide the operations (only those you need!) for each of controller (list, create, show(id), update(id), delete(id)). Implement these operations as Scala actions.

  4. Insert a Play route to serve each implemented action to the client framework.

  5. Insert one (and only one!) Play route to serve your styled HTML to the client framework.

  6. Spend the rest of your development time and effort on the client-side...


It looks like angular is too much for your case. Probably you could stick with simpler Ajax for the js side, like jQuery, and use Rest endpoints as play routes to feed the json to your page.