Statement on the statement on the history of node-webkit project
This post tries to clear some confusions caused by the “Statement on the history of node-webkit project” written by Roger Wang. I’m going to quote the original text of the statement and give links that can answer the confusions.
This post is not related to my current employer, and is about the time when I was working as intern at Intel.
As node-webkit was becoming popular, we decided to hire an intern student to work with us.
Before I joined the node-webkit project, it was never popular. It was a toy project that demonstrated that it was possible to integrate Node.js into WebKit engine, it was barely worked on and no one was actually using it.
There were two branches of node-webkit, one was a Node.js module that injected Node.js APIs into the WebKit engine, commit history can be found at webkitgtk branch.
The other branch was a custom Chromium browser with Node.js injected, commit history is at cef branch. (There were also patches on Node.js and Chromium, about 100-200 lines, gone forever after NW.js rebased their codebase.)
These links should be able to clearly show how active node-webkit’s development was. As for the community data, before I joined, node-webkit had about 200 stars and 7 issues. I don’t have link for the star history, but the issues number can be found by checking the old issues:
All these links should make it clear that, before I joined, node-webkit was just a small hobby project without fame nor users.
Why did they hire an intern for the project? This was because Intel Open Source Technology Center had the tradition of hiring summer interns to hack on open source projects, they had the head count, and the node-webkit was fun enough for students.
During his 6 months internship, I mentored him on daily technical things (including git tips, bug fixing, making releases, architecture adjustment, etc) and interaction with open source community. As he was pursuing opportunities out of China, we encouraged him to do work which can be seen by the community, including announcing release notes and communicating with users in GitHub issues.
They were basically saying that they hired me as an intern and mentored me to write everything, and I had very active community interactions because they were kind enough to let me show myself.
This was not entirely false because they did hire me as an intern and Roger Wang was my mentor, but they did not mention that the whole development was almost completely on my own.
So after I joined the development of node-webkit, based on the idea of injecting Node.js in Chromium, I rewrote node-webkit from scratch, the commit history of first version.
With my active promotions and community interactions, node-webkit finally started to become popular and had about 1000 stars, the commit history of this point.
With node-webkit becoming a popular project, Roger Wang started to join back the development of node-webkit, the commit history before I left.
We also had forks of Chromium and Node.js with patches to make libuv work together Chromium, the patches were 300-400 lines and were based on Roger Wang’s original work, unfortunately they were gone forever after NW.js rebased their codebase.
Code was of course just one side of the development, if you go over the old issues of node-webkit (between #7 and #180), you will learn how I was working on node-webkit and attending to users’ requests, and how Roger Wang started to join the development after node-webkit got popular (which they called “mentorship”).
So there are two versions of the story:
- I was mentored to do everything while you could hardly find any public sign of the mentor.
- I simply did everything myself.
I think it is hard to believe the first one after reading all the links.
From my personal view, it is vicious to conclude all my efforts simply as result of mentorship and their kindness.
On the contributions to the node-webkit project: The Node integration with Chromium was done before Cheng joined the project. He went on to fill the missing part of packaging and native GUI library.
It is true that the Node.js integration was done before I joined, and it has always been the core of the node-webkit project. But Node.js integration was not even an unique thing at that time, during the time I worked on node-webkit, there were also other frameworks with Node.js integration, namely app.js and brackets-shell. And in order to complete with those frameworks I even rewrote some products with node-webkit, an example was how I completed with app.js to convince Brackets editor to migrate from brackets-shell to node-webkit by porting the Brackets editor to node-webkit.
Before I joined node-webkit project, it was simply a proof-of-concept and never a real product, I turned it into a framework and a good product, which brought node-webkit wide adoption. And node-webkit was not even the only web desktop framework at that time, it was my efforts that made node-webkit stand out. By calling my efforts “filling missing part” they were just erasing my hard work.
See what node-webkit was, and what a true product it became after I “filled the missing parts”.
the code for node-webkit project spans across multiple repositories: the Chromium repo, the Node repo, the v8 repo, the WebKit repo, the breakpad repo and the node-webkit repo. The last one hosts the packaging code, native GUI library and serves as the home page. It is the only one known by most people, and it is the only one referred in Cheng’s post to represent his contributions, which is misleading.
It is true that node-webkit’s source spans multiple repos, but they did not mention that all those code in the Node, v8, WebKit, Chromium forks were just patches to make Node.js integration work, they were initially written by Roger Wang, and then maintained by me during my development on node-webkit. All those patches were about 300-400 lines, and they together implemented the hack of integrating Node.js into Chromium.
While the other parts, which were mostly written by me, had more than 14k lines. That number did not include README or packaging code, they were solid C++ code that implemented a full-featured web desktop framework. Lines of code could be counted by checking out the code I was lastly working on.
What is misleading is that they were comparing a 300 lines hack to a 14k lines complete framework and said the latter was nothing.
Furthermore, the Intel copyright notices were removed and were replaced by GitHub copyright notice in Electron when pieces of code was copied and derivative work was made from some code of node-webkit (see Kevin’s post for the links to source).
Both Electron and node-webkit were reusing lots of code from Chromium, so in the end both projects shared lots of identical code, which looked like I stole my own code from node-webkit when writing Electron, but they were just code from Chromium. I don’t blame them for the false accuse though, I wrote all those parts of code so they did not know the code was from Chromium.
However I have to apology that I reused about 100 lines of code from node-webkit
id_weak_map.cc of Electron, but the reused code was published in the
Node.js fork in node-webkit, which was using the license of Node.js and I did
not add node-webkit’s copyright header to node-webkit’s Node.js fork, so I was
obliged to include license of Node.js to Electron, not node-webkit’s. After some
time that code was moved from the Node.js fork to the main repo of node-webkit,
and in order to avoid confusions I had rewritten that part of code in
We appreciated Cheng’s contributions, but it is really a self-deception that he tried to position himself as a game changer of node-webkit during his internship.
They were hiding my contributions by claiming I was just an intern and did all the work under mentorship, I could hardly feel any appreciation from them.
In their history of node-webkit there was no mention of the importance of my work, they were describing me as an noice happened to work on node-webkit. While the truth is without me the node-webkit project would never be a thing.
In April 2016, it was asked about the origin of the Electron project and its relationship with the node-webkit project, Cheng answered that Electron “was rewritten from scratch”, and it’s not even “inspired by NW.js”. Kevin (co-maintainer of NW.js project today) replied to correct him with verifiable information.
Electron was indeed written from scratch, and as clarified above, those “verifiable information” were just lack of knowledge of node-webkit’s code.
Both node-webkit and Electron succeeded because they were very good web desktop frameworks, the Node.js integration was of course a very important idea but it was never an unique idea (see app.js and brackets-shell). I was inspired by lots of projects to write node-webkit and Electron, like Adobe Air, LÖVE framework, Chrome Apps…, but I really could not say I was inspired by my own work on node-webkit.
That said, we still respect the Electron project, no matter whether it is a derivative work of node-webkit or not. I hope we could close this here with this final statement, and get back to the tons of work ahead.
I used to believe this and has kept silence on this topic for the past year, but the developers of NW.js have kept harassing me using this statement and did personal attacks, I feel obliged to respond to their statement and make facts clear.