I am trying to perform a simple method that can handle JSON and HTTP request. Why is this? Because if in some point I decide to create, not only a Webapp also a Mobile APP, I can handle the request with JSON. (I don´t know if this is the best way, if is not please let me know, what would you do?)
My problems is: to handle JSON and HTML in Play, I think that all the request and response need to be intercepted with JavaScript from the HTML side, because need to be parsed as a JSON object. But is there any way to do so , as if it were a simple HTML request?
What is the best way to create a back-end service that will work for a Mobile and WebApp?
Please let me know if you need more info. or something else and your opinion about how I am handling this.
The best way is to create REST APIs with the JSON response so that you can integrate it with any UI app or mobile app. Playframework has given support for HTML too, but as per my opinion create a REST API
You can integrate this REST service to any UI app using any javascript framework.