I am going to create one project but little bit confused, As i am new in UI dev.
and wanna to know which one method would be good?
1. First create html and implement js on the html content.
2. Create all html content using js like input,div,span,lable, textarea etc.
Please help me to find the correct process to develop UI.
But if i develop using js(second method) so code length increases, And project size will be more than normal html project(first method).
So would it affect the Load time of website.
if you generate the interface with js, you shouldn't need to ever re-load the page. that means that even if it takes a bit longer the first time, each additional "page" is instant. so it seems faster.
js should not take any longer than html to transfer. even if it's twice the size, it will transfer in about the same amount of time. unless you're talking hundreds of thousands of elements, it's all quick.
Use a templating system or at least a dom library to generate your html. DON'T use document.createElement("span") 50,000,000 time in a row; that is bloated and wasteful...
if you do it right, you can actually save a lot of bandwidth using js instead of html; it all depends on how you code it.
During this Apps development i got confliction in code. and now i came to know that first create html and implement the js, jQuery on that.
Pls suggest if i am wrong.