what is the best practice for DOM generation ? passing the full html as response from server or pass necessary values and create dom accordingly from client side ? Please suggest..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a suggestion. I would suggest passing data (json or xml) to the client and then using this data to create your DOM elements (this is sometimes proposed as ‘best practice’).
Although nobody restricts you in doing what you think is best for your case (IMHO).
Tip: Make sure you avoid circular references when creating your DOM element (thus avoiding memory leaks).
regards,