This is a design question. I have data that needs to go into an HTML table, which will later be manipulated by the user. Basically the user will be able to select items in the table rows.
I have two options - in both cases I'm using AJAX to get the data:
Create the HTML code using PHP on the server side, send it to the client as HTML. The user then manipulates the table using Javascript (jQuery, essentially).
Send the raw data to the client using JSON, then use jQuery to both create the HTML and later manipulate it by the user.
From a design/ease of coding/beauty point of view, which approach is recommended? Thanks for any insight.