mozilla

Revision 93463 of FAQ

  • Revision slug: CommonJS/FAQ
  • Revision title: FAQ
  • Revision id: 93463
  • Created:
  • Creator: Petermichaux
  • Is current revision? No
  • Comment 103 words added, 28 words removed

Revision Content

 

  • Why use JavaScript on the server?

Using the same language on both the client and server sides allows for code sharing. As the language of the browser, the JavaScript language is in a unique position to enable this sharing. Using JavaScript on the server-side also leverages knowledge of JavaScript.

  • Why not Perl/PHP/Python/Ruby?  

These languages are not in the browser and so cannot share code with the browser (without undue burden on either the developer or browser.)

  • If sharing code is the objective, then why not compile language X to JavaScript to send to the browser?

Debugging compiled code is not an enjoyable experience.

Revision Source

<p> </p>
<ul> <li>Why use JavaScript on the server?</li>
</ul>
<p style="margin-left: 40px;">Using the same language on both the client and server sides allows for code sharing. As the language of the browser, the JavaScript language is in a unique position to enable this sharing. Using JavaScript on the server-side also leverages knowledge of JavaScript. </p>
<ul> <li>Why not Perl/PHP/Python/Ruby?  </li>
</ul>
<p style="margin-left: 40px;">These languages are not in the browser and so cannot share code with the browser (without undue burden on either the developer or browser.)</p>
<ul> <li>If sharing code is the objective, then why not compile language X to JavaScript to send to the browser?</li>
</ul>
<p style="margin-left: 40px;">Debugging compiled code is not an enjoyable experience.</p>
Revert to this revision