Hi,
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.
both are fine. if you need something to show up in browsers without javascript, use and html base. if you don't need that, it might be easier to do it all in js; those patterns are often more reusable than "upgrading" html.
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.
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.
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.
In order to avoid loading an additional page, isn't it required that the URL not change (other than the addition/modification of a hash fragment)?
If so there are some issues that might discourage one from using this approach (the hash-bang problem).
I am not very sure about the real aim of the project, but wouldn't be easier to use a server-side language, as PHP, and AJAX instead of pure JavaScript generator codes?
Thanks rnd and Kor, i would like to make a point that i created one web application using Js and jQuery and its seems like a desktop application, But it made me more time consumer. Pure Javascript code is more time consuming so i used both Js and jQuery.
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.
Bookmarks