Templates
-
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
-
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
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
-
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
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
-
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
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
-
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
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.
-
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
HTMLTemplate is good which is perl based.
-
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
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: