Node-webkit author Wang Wenrui: A new way to develop desktop applications

Source: Internet
Author: User

absrtact: in the last two years, node. JS technology is getting more and more hot, based on the applications it has developed in front of everyone, in which Node-webkit is an open source framework that allows developers to develop desktop applications using Web technology.

Node-webkit is a fusion of Nodejs and WebKit technologies, providing an underlying framework for client application development across Windows, Linux platforms, Use popular web technologies (NODE.JS,JAVASCRIPT,HTML5) to write your application's platform. Application developers can easily use web technologies to implement a variety of applications. Node-webkit performance and features have made it the world's leading web technology application platform.

    • Project Address: Https://github.com/rogerwang/node-webkit
    • Document: Https://github.com/rogerwang/node-webkit/wiki
In this issue, we interviewed Node-webkit project promoter Rogerwang, the real name Wang Wenrui, asked him to talk about the development of node-webkit, and the principle of implementation.

Node-webkit's Project sponsor Wang Wenrui

CSDN: You should introduce yourself!

Wang Wenrui: currently I work in web and browser technology development at Intel's Open Source Technology Center (OTC). The main task now is to develop and maintain node-webkit projects. Previously engaged in the development of Meego, Tizen, and JNI XML performance libraries and data center solution services. I joined Intel in 2005 after graduating from Zhong Ke Banton with a PhD in computer science and a high-performance computing field.

What was the purpose of Csdn:node-webkit project creation?

Wang Wenrui:2011 years ago, my colleagues and I discussed how to increase the API for Tizen Webruntime, the idea is to use the node platform to expand the webruntime to achieve the purpose of developing local applications. There was an initiative to encourage innovation in the company, so at first I was able to devote 10% of my working time to the project.

CSDN: How do you think of combining node. js with WebKit technology? What role does node. js and WebKit play in this project? What are the advantages of this combination?

Wang Wenrui: It was known that the node. JS platform was popular among web developers, with many libraries that could write local applications. So there is the idea of expanding webruntime with it. Rather than defining many APIs, developers rarely need to learn new interfaces and can easily extend their own JS or C + +.

WebKit (now Blink) is responsible for HTML5 UI-related parts, while node. JS is responsible for local API interfaces such as file systems, networks, devices, etc.

Csdn:node-webkit What is the rationale for allowing web-based applications to develop on-premises? How is it implemented?

Wang Wenrui: The core idea of the project is that code running in the DOM can directly invoke code that runs in node. js, so the core part is to run the two in the same thread. You need to combine the event loops of the chromium process with the event loops of node. js, and merge the V8 JS Engine environment (context).

CSDN: What is the internal process of compiling html/css/js into native code?

Wang Wenrui: In fact, it's a packaged feature that puts the project file package and Node-webkit executable files together, so you can run it directly. The page file is automatically loaded when the Node-webkit is started.

CSDN: What are the advantages of node-webkit compared to other similar schemes such as TIDESDK?

Wang Wenrui: The most important feature of Node-webkit is the integration of node. js, which can invoke various libraries on the platform directly. Because both the function call and the object's mutual access are direct, so the performance is good. After the advent of Node-webkit, there were other projects that tried to integrate node. JS, but the IPC mechanism was used to run node. JS in a separate process, which required the serialization of function calls and parameters and results. Some other projects do not support node. js.

In addition, the Node-webkit project is active and can be updated frequently and synchronized with upstream projects (Chromium, node. js).

What platforms does Csdn:node-webkit support? What local interfaces does the Node-webkit provide for publishing on each platform?

Wang Wenrui: currently supports Windows,mac OSX and Linux three mainstream desktop platforms. The local interface is implemented primarily through a variety of libraries on the node. JS platform. With tens of thousands of packages (npmjs.org) on this platform, developers can choose what they want. Node-webkit also provides a cross-platform library for manipulating UI elements such as windows, menus, and the Clipboard.

Csdn:node-webkit applications can operate the local OS directly, how is Node-webkit considered and implemented in terms of application performance and security?

Wang Wenrui: Node-webkit supports native applications, which are quite different than security models for Web applications. Like the end user's outlook, Skype and other desktop software, the former through the trusted channel distribution, user installation means that trust the software, software can do almost anything in the system, and the characteristics of the Web application is directly downloaded and executed via the Internet, by default, the user does not trust the app, User authorization is required before the app can perform specific operations, such as accessing the camera.

So despite the same web-based technology, Node-webkit is targeting a completely different security model. For developer code, Node-webkit will relax a lot of restrictions from the Web application security model, such as cross-domain access. Developers can specify the same security measures as Web apps when the Node-webkit program loads untrusted content.

CSDN: Can you tell me about Node-webkit's main developers? At GitHub, Node-webkit has more than 800 fork, and how much does it contribute to the community?

Wang Wenrui: The main developer is the only one for me. There was another major developer, Zhao, who developed a cross-platform UI library for more than half a year while we were practicing here.

We have been encouraging communities to participate in the development of this project. The contribution from the community so far has been little, presumably because users in the community are primarily using JavaScript, and our code is written primarily in C + +. In addition we have been recruiting interns to participate in this project, welcome to send resumes.

CSDN: What are the current success stories/applications based on Node-webkit development?

Wang Wenrui: An innovative IDE project called Lighttable, which used to be one of the top 10 technology projects on the Kickstarter and raised $350,000 to more than 7,000 people, has now been supported by VCs, and many games are based on Node-webkit , such as the Gamedevtycoon;leapmotion Application Center and some applications that support the LeapMotion controller, as well as the Intel HTML5 development environment XDK New.

Csdn:node-webkit The future development plan? Will you consider supporting mobile platforms?

Wang Wenrui: The future needs to be kept in sync with upstream projects on a regular basis, providing more features to the user's needs, such as providing a browser's internal interface and more cross-platform UI capabilities. Because of the current user needs and feedback a lot, so also can not provide mobile platform support.

CSDN: What do you think of the prospect of HTML5 and HTML5 developing local applications?

Wang Wenrui: In the context of the continuous development of the Internet, HTML5 is one of the few industries to continue to focus on the development of technology. With the HTML5 development interface in a leading position, it is bound to be widely used in the desktop world.

CSDN: A while ago, Groupon and PayPal moved their technology stack to node. js, how do you see the development and prospects of node. JS Technology for the last two years?

Wang Wenrui: in the last two years, node. JS has become more and more popular, with more than 4,000 software packages on npmjs.org, more than two years ago when Node-webkit was founded, and has now grown to more than 20,000. Because it gives JavaScript or Web developers a new world beyond the browser environment. They can write local applications, including server-side, and are no longer limited by browser-provided API restrictions. This way of programming is bound to pop.

CSDN: What kind of organization is the Intel Open Source Technology Center? As far as I know, Node-webkit was originally your amateur project, what is the status now?

Wang Wenrui: The Intel Open Source Technology Center (OTC) is a global organization within Intel. Located in the United States, China, the United Kingdom, Finland, Brazil, France, Romania and other more than 800 people. Participate in the development of various open source projects including Linux kernel, virtualization, Android, Tizen, chromium, etc.

At present, because Node-webkit has a lot of users, so I can use all the time to develop this project. Even if there are many problems that cannot be answered, I would like to take this opportunity to forgive you.

Node-webkit author Wang Wenrui: A new way to develop desktop applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.