{"id":4200,"date":"2017-10-03T08:04:57","date_gmt":"2017-10-02T23:04:57","guid":{"rendered":"http:\/\/balldiamondball.com\/blog\/?p=4200"},"modified":"2017-10-03T08:41:48","modified_gmt":"2017-10-02T23:41:48","slug":"web-development-javascript-comes-of-age","status":"publish","type":"post","link":"https:\/\/balldiamondball.com\/blog\/web-development-javascript-comes-of-age\/","title":{"rendered":"Web Development: JavaScript Comes of Age"},"content":{"rendered":"<p>Back in the day, JavaScript was a tacky interpreted language you used as \u201cglue\u201d when putting together Web pages.\u00a0 When I benchmarked it against C for a scientific computation application in 2005, it came in between 27.7 and 46.9 times slower than code compiled with C.<\/p>\n<p>Well, that was then\u2026.\u00a0 I&#8217;ve just completed a series of benchmark tests of JavaScript on platforms which include node.js, Chrome, Chromium, Brave, Firefox, and Apple&#8217;s Safari (on both the MacOS X desktop and iOS iPad), and on some of the desktops it runs faster than C and on none of them more than 50% slower.<\/p>\n<p>For Web developers, this is Big Thing.\u00a0 It used to be you&#8217;d code your little hacks within Web pages in JavaScript, but then basically re-do them on the server side since you needed a language which wouldn&#8217;t reduce the server to a crawl at peak load periods.<\/p>\n<p>Now, you can write everything in JavaScript, using node.js on the server side, and happily re-use code between the two platforms.\u00a0 When I developed <a href=\"http:\/\/www.fourmilab.ch\/hackdiet\/online\/hdo.html\"><em>The Hacker&#8217;s Diet Online<\/em><\/a>, using JavaScript on the client and Perl on the server, using a common language would have almost halved the development effort, but in 2007 JavaScript wasn&#8217;t up to the job.\u00a0 Now it is.<\/p>\n<p>If you&#8217;d like to read the complete benchmark report, <a href=\"http:\/\/www.fourmilab.ch\/fourmilog\/archives\/2017-10\/001715.html\">here it is<\/a>.\u00a0 You can download the benchmark to run on your own machines from that page.\u00a0 Since the document contains tables, it&#8217;s just too painful to re-post here, and all I&#8217;d get for doing so is a bunch of <a href=\"https:\/\/en.wikipedia.org\/wiki\/TL;DR\">TL;DR<\/a> comments.<\/p>\n<p>At this point, I&#8217;ll put down the discovery that JavaScript is a programming language fully competitive with legacy languages on both client and server platforms as one of the top things I&#8217;ve learned this year, right up there with that the economics of an enormous yet fully-reusable space launcher beat those of a modest-sized rocket you throw away every time.\u00a0 Well, even Elon Musk only figured that out in the last year.<\/p>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"4200\" data-trigger-type=\"like\" data-restriction=\"user\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"4200\" data-trigger-type=\"dislike\" data-restriction=\"user\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-down\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Back in the day, JavaScript was a tacky interpreted language you used as \u201cglue\u201d when putting together Web pages.\u00a0 When I benchmarked it against C for a scientific computation application in 2005, it came in between 27.7 and 46.9 times slower than code compiled with C.<\/p>\n<p>Well, that was then\u2026.\u00a0 I&#8217;ve just completed a series of benchmark tests of JavaScript on platforms which include node.js, Chrome, Chromium, Brave, Firefox, and Apple&#8217;s Safari (on both the MacOS X desktop and iOS iPad), and on some of the desktops it runs faster than C and on none of them more than 50% slower.<\/p>\n<p>For Web developers, this is Big Thing.\u00a0 It used to be you&#8217;d code your little hacks within Web pages in JavaScript, but then basically re-do them on &#8230; <a href=\"https:\/\/balldiamondball.com\/blog\/web-development-javascript-comes-of-age\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":5813,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,7],"tags":[189,191,190],"class_list":["post-4200","post","type-post","status-publish","format-standard","hentry","category-geek","category-projects","tag-javascript","tag-nerd","tag-web-development"],"_links":{"self":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts\/4200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/users\/5813"}],"replies":[{"embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/comments?post=4200"}],"version-history":[{"count":2,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts\/4200\/revisions"}],"predecessor-version":[{"id":4202,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts\/4200\/revisions\/4202"}],"wp:attachment":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/media?parent=4200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/categories?post=4200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/tags?post=4200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}