Font Size: a A A

Research And Implementation Of JavaScript Tool Set Based On Node-Webkit Framework

Posted on:2017-05-09Degree:MasterType:Thesis
Country:ChinaCandidate:L Y ZhuFull Text:PDF
GTID:2308330485984768Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Node-Webkit is a framework for building desktop applications with HTML, CSS and JavaScript, and worked by combining the Node.js programming framework with Chromium’s browser engine Webkit. By combining Node.js with Chromium, a way to create applications that could not only load a local web site within an application window, but also could interact with the Operating System via a JavaScript API was found. Node-Webkit desktop application contains larger amounts of JavaScript code than web application, and the JavaScript engine efficiency directly affects user experience. But the current Node-Webkit didn’t specifically optimize JavaScript engine running speed, still same with traditional JavaScript runtime environment. Sencondly, the JavaScript code of desktop application developed by web technology is loaded to run in source code, there is no effective source code protection measures.To solve the JavaScript problems of Node-Webkit desktop application developed by web technology, a localizing JavaScript code solution is proposed by analyzing the structure and operation mechanism of Node-Webkit JavaScript engine V8. That is, caching V8 compiled machine code by pre-compiled JavaScript on the target platform, and then canceling the compilation process when Node-Webkit application runs, instead by de-serializing file of cached code to V8 compilation cache in memory and running. The solution cancels JavaScript compiling time, greatly enhances the startup speed of Node-Webkit application, as well as protects JavaScript source code fundamentally by pre-compiled machine code instead of JavaScript code. Two tools mkCustomerSnapshot and mkCacheCode were designed and implemented base on the idea, and actually used in Node-Webkit. Experiments show that the localizing JavaScript code solution can improve the application running speed, saving more than 90% of JavaScript compiling time, and two kinds of tools protecting JavaScript source code solution can achieve the purpose of hiding the source. Localizing JavaScript code is a new attempt for optimization of JavaScript engine, and has an important reference significance.
Keywords/Search Tags:Node-Webkit, JavaScript engine, Serialize/De-Serialize, JavaScript protection
PDF Full Text Request
Related items