The question seems to be obvious, but I would like to understand it in more technical terms. In my application I need to put objects in an HTML template, for user visualization. I have two options and I would like to know which one is the most efficient.
1 - Send only the objects for AJAX request and mount the HTML template in JAVASCRIPT and place it in the interface.
2 - Mount the HTML template in PHP send to AJAX request and just put it in the interface.
I'm currently using 2nd, but I think the first option is more efficient. I wonder if I'm right and why.