Restful Java based web services in json + html5 and javascript no templates (jsp/jsf/freemarker) aka fat/thick client
- by Ismail Marmoush
I have this idea of building a website which service JSON data through restful services framework. And will not use any template engines like jsp/jsf/freemarker. Just pure html5 and Javascript libs.
What do you think of the pros and cons of such design ?
Just for elaboration and brain storming a friend of mine argued with the following concerns:
sounds like gwt
this way you won't have any control over you service api
for example say you wanna charge the user per request how will you handle it?
how will you control your design and themes?
what about the 1st request the browser make?
not easy with this all of the user's requests will come with "Accept" header "application/json" how will you separate browser from abuser?
this way all of your public apis will be used by third party apps
abusively and you won't be able to lock it since you won't be able to block the normal user browser
We won't use compiled html anyway but may be something like freemarker and in that case you won't expose any of your json resources to the unauthorized user but you will expose all the html since any browser can access them all the well known 1st class services do this can you send me links to what you've read? keep in mind the DOM based XSS it will be a nightmare ofc, if what you say is applicable.