dcsimg
www.webdeveloper.com
Results 1 to 11 of 11

Thread: UI development

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    5

    Question UI development

    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.

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    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.

  3. #3
    Join Date
    Apr 2012
    Posts
    5
    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.

  4. #4
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    Quote Originally Posted by maxterner View Post
    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.

  5. #5
    Join Date
    Aug 2010
    Location
    San Diego
    Posts
    242
    Quote Originally Posted by rnd me View Post
    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).

  6. #6
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    Quote Originally Posted by handcraftedweb View Post
    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)?
    no, you can now change the path without reloading.

    Quote Originally Posted by handcraftedweb View Post
    If so there are some issues that might discourage one from using this approach (the hash-bang problem).
    that's a problem for sites, not apps.
    if you publish documents, use existing standards.

    apps like notepad, mspaint, word, and photoshop don't have a url bar and people seem to use them just fine...

  7. #7
    Join Date
    Aug 2010
    Location
    San Diego
    Posts
    242
    Quote Originally Posted by rnd me View Post
    no, you can now change the path without reloading.
    Do you have any pointers (links) on how to do this? I didn't know it was possible, but sure would like to do it.
    that's a problem for sites, not apps.
    if you publish documents, use existing standards.

    apps like notepad, mspaint, word, and photoshop don't have a url bar and people seem to use them just fine...
    True, and good point. But people should understand that without links that change the URL, search engines cannot index their content.

  8. #8
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    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?

  9. #9
    Join Date
    Apr 2012
    Posts
    5
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles