I've basically stared to do the following when creating a REST service:
- HTML is requested
- service returns the desired web page but without the requested "resource", eg. data
- service then returns the actual data (JSON) and the page displays it
On one side it seems inefficient (2 requests) but then were I used this, "performance is of no concern", meaning low traffic internal app and the web sites are simple and load fast.
Now before I get to using this, is this a good idea or should I just stop doing it?