Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Templates

Templates

Scheduled Pinned Locked Moved The Lounge
javascriptwpfquestion
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Simmon outlaw programmer
    wrote on last edited by
    #1

    Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

    L J P T N 5 Replies Last reply
    0
    • J John Simmon outlaw programmer

      Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Where does the Javascript run? If it runs in the browser, there is a risk of the user turning javascript off. Also genuine javascript produces errors on certain browser installations. This will make the web pages more dependant on browser health and configuration. Since there are good server-side alternatives for making webpage templates, so that you can split the header, footer and different parts of the page body, why bother with javascript? In asp, you can you and if Chris is using one for CP, there is a very good chance that this is the one. Apache supports Server Side Includes, that serve the same purpose. -- Thomas

      1 Reply Last reply
      0
      • J John Simmon outlaw programmer

        Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

        J Offline
        J Offline
        Jon Sagara
        wrote on last edited by
        #3

        Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. You can certainly do this in the absence of other technologies, but otherwise I don't know why you would. If you're that much of a JavaScript die-hard, you can use ASP with JScript. Can one tell me which programming langugage is the most efficient way to use templates. I can't vouch for efficiency, but I have had great success with both ASP and PHP. Does anyone know what percent of the internet users have javascript disabled ? If just one of your important visitors has it disabled, then you're screwed. BTW, Chris, what technology do you use for templates on Code Project ? :| Jon Sagara Sagara Software

        1 Reply Last reply
        0
        • J John Simmon outlaw programmer

          Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          I am sure you could use JavaScript to create sites using templates, but I would not recommend it. JavaScript is usually used for Client-Side effects e.g. DHTML, validation of forms, changing images etc. As for a valid reason why not then I would say A: speed (everything is done client side) and B: compatibility as not all browsers support JavaScript and some people turn off JavaScript support. You should create your template and use it all Server Side. Most server side systems have ways to facilitate this. In ASP you would do this:

          While in PHP you'd use this:

          Have a look at the ASP forums and articles on this site, there is a lot of help on templates and include files. ..."BTW, Chris, what technology do you use for templates on Code Project ?"... If I may be so bold as to answer this I would say Chris definitley uses the

          method for this site. regards, Paul Watson Cape Town, South Africa e: paulmwatson@email.com w: vergen.org

          J 1 Reply Last reply
          0
          • P Paul Watson

            I am sure you could use JavaScript to create sites using templates, but I would not recommend it. JavaScript is usually used for Client-Side effects e.g. DHTML, validation of forms, changing images etc. As for a valid reason why not then I would say A: speed (everything is done client side) and B: compatibility as not all browsers support JavaScript and some people turn off JavaScript support. You should create your template and use it all Server Side. Most server side systems have ways to facilitate this. In ASP you would do this:

            While in PHP you'd use this:

            Have a look at the ASP forums and articles on this site, there is a lot of help on templates and include files. ..."BTW, Chris, what technology do you use for templates on Code Project ?"... If I may be so bold as to answer this I would say Chris definitley uses the

            method for this site. regards, Paul Watson Cape Town, South Africa e: paulmwatson@email.com w: vergen.org

            J Offline
            J Offline
            John Simmon outlaw programmer
            wrote on last edited by
            #5

            Thanks Paul. BTW, I am not a die-hard Javascript fan. I just wanted to know the reasons why it is not very efficient. My wording might have seemed that i am a javascript die-hard fan, but i am not.

            1 Reply Last reply
            0
            • J John Simmon outlaw programmer

              Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

              T Offline
              T Offline
              Todd Smith
              wrote on last edited by
              #6

              HTMLTemplate is good which is perl based.

              1 Reply Last reply
              0
              • J John Simmon outlaw programmer

                Hi, can anyone provide me with reason as to why using Javascript for website template is not a good idea other than it is cumbersome to edit. Can one tell me which programming langugage is the most efficient way to use templates. Does anyone know what percent of the internet users have javascript disabled ? BTW, Chris, what technology do you use for templates on Code Project ? Thanks, Hassan

                N Offline
                N Offline
                Nemanja Trifunovic
                wrote on last edited by
                #7

                One more reason not to use Javascript. If you want your web pages to be successfully translated by some translation engines like itranslator or BubbleFish, avoid client-side scripts. I vote pro drink :beer:

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups