ServerJS/FAQ: Difference between revisions

Jump to navigation Jump to search
no edit summary
(New page: === 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...)
 
No edit summary
Line 7: Line 7:
=== If sharing code is the objective, then why not compile language X to JavaScript to send to the 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.
Debugging compiled code is not an enjoyable experience. Often, the abstraction layer between language X and JavaScript also has some holes then you end up needing to plug with hand-crafted JS (and not just stock JS, but JS that is designed to interface with that library). By using JavaScript all the way across, there are no such leaks.
 
Also, there can be some impedance mismatch between the prototype-based object model in JavaScript and the object models of other languages.
 
=== Is there a bonus reason to use JavaScript on the server? ===
 
Why yes, I'm glad you asked. JavaScript is powering increasingly complex applications in the browser. This has caused browser vendors to work hard on their JavaScript performance. Server side JavaScript has the potential to significantly outperform other common dynamic languages because of this work.
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,093

edits

Navigation menu