Code Comments
Programming Forum and web based access to our favorite programming groups.BUILT-IN Web-Language Interpreters If we put Html, Dhtml, Xml and Javascript codes onto our webpages and view t hem on a browser then we do not see the “text of the codes” but the “transla ted version of the codes” because the browser “translates” the codes before loading the webpages on our screens. But, when you put Java codes onto your webpage and view it on a browser then the browser is unable to translate the Java codes unless you download the Java Interpreter which is the “Java Virt ual Machine”. Question 1. Now, why is it that, the browser behaves one way with the other languages an d one way with Java ? I guess that, it is because the browsers do not have the Java Virtual Machin e “installed” or “built-in” to the browser. Am I correct ? Question 2. If so, then why do not these browsers have the Java Virtual Machine installe d in them ? Why the inconvenience for us to download it ? Question 3. Can some-one tell me where exactly in the browser’s source codes is it writt en about the Html, Dhtml, Xml and Javascript interpreters ? This way, I can insert beside them the source code of the Java Virtual Machi ne on the popular open source browser so next time Java codes will be interp reted without needing to download the Java Virtual Machine. I could call thi s version the latest version that can translate Java Applets with-out the ne ed to download and install the Java Virtual Machine. Anyway, in order for my browser to view Java Applets, I know that, all I hav e to do is download the Java Virtual Machine but I prefer to do things manua lly just to experiment with the source codes. Also, I want to learn where exactly the Html, Dhtml, Xml, Javascript interpr eters reside inside a browser and check how their source codes look like. Again, more experiments. It would be totally impossible for me to go through all the source code of a browser as it could have millions of lines of code. I prefer to be pointed to the right direction. Example : Say that, I bought a webscript that turns my website into a dating website. Say that, the webscript creates 6 dynamic webpages : 1. Admin log-In Page 2. Admin Control Panel 3. User Sign-Up Page 4. User Log-In Page 5. User Account Control Panel 6. Search Page And imagine that, there are 3 Perl Cgi files that has the source codes to ma ke the webscript work : 1. admin.cgi 2. signup.cgi 3. search.cgi Now, imagine that I want to add a new query field “What Country Do You Resid e” on the “Search Page” because this query field does not exist. Now, if I ask the script-owner which part of the script to modify to add the new field, he will not simply ask me to go through al the 3 cgi files becau se this would be too daunting and a time waste for me and working in-effecti vely and so he will point me to the right direction which is to check the “s earch.cgi” file for the other “existing query fields” such as “what is your name”, “what is your age”, blah blah blah and insert my new query field’s Pe rl code beside these other query fields. If the other query fields are in th e middle of the cgi file then it is no good me inserting my new query fields ’ Perl code at the top or bottom of the cgi file as this would make the file look messy and when next time I want to modify this query field I won’t fin d it near the other query field’s codes and will need to foolishly and unpro fessionally search the whole file for it. So, to make things easy for me, I would insert my new query field’s Perl cod e near the other existing query field’s Perl code. This is how I would “orga nise” things so it is easy for me to find something quickly that needs modif ying. Also, the Cgi programmers do not write all the codes of a webscript in one f ile as the file would be too large and too messy to find a certain code for a certain function. That’s why they create different files for different fun ctions such as “search.cgi” for all the Perl Codes that makes the “Search pa ge” work and “signup.cgi” for all the Perl Codes that makes the “Sign-up pag e” work. This way, if anything needs to be modified for the “Search page” then we wou ld look into the “search.cgi” instead of the other cgi files. That’s how cgi files are organised to make things easier for a programmer to modify a webscript. Question 4 : Now, I guess the same kind of “organising technique” exist in desktop softwa re source codes ? If so, then in a browser, where is the folder and file that has the source c odes for the Html, Dhtml, Xml and Javascript interpreters ? I want some clever programmer to point me to the right direction like a Cgi programmer would point me to if I need to modify a certain part of his websc ript. Should I be on the look-out for a folder called “Interpreters” in the browse r source code ? Since Internet Explorer is not open source then I would appreciate it if any body can point me to the right direction on the source codes of those other browsers that are open source such as Mozilla, Netscape Navigator, etc. One of the other reasons why I want to see where the Interpreters are residi ng so I can check the source codes of the Interpreters too and experiment wi th them.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.