0
votes

I was given the following to consider:

  • Develop desktop application using Nodeweb kit.
  • Also develop web application using the same code base.
  • Applications should look identical.
  • Both apps must use the same code base. The reason for this is to cut down development expenses.

If it was up to me I would not even consider using node-webkit for desktop. There are far better desktop solutions for Win platforms. For web application using Node is certanly viable.

But people who plan the project somehow think Node is a way to go for both apps.

After lots of thinking, I came to the conclusion that doing what they want will only increase dev and maintenance costs.

I consider using express (maybe even Sails.js) for web application. I made some tests where I used express on node-webkit and it run just fine.

Certanly NW is powerfull platform (popcorn). Just in my case I fail to see how can it cut down the dev expense

Am I right to be against this solution? Is this a plausible decision and I am not seeing another solution?

Any opinion is very welcome

2

2 Answers

1
votes

I have actually done exactly this, and it worked very well. The trick was to write some Node Webkit code that will "detect" that it's running as a desktop application, instead of a web app, and thus integrate with desktop notifications etc.

Yes, it was more work than just writing a web app, but it was also less work (and maintenance) than developing separate applications. You get to use a lot of common code, because of the fact that you are running in a browser already, that I feel the project saved a lot of time.

In fact, I am currently working on another application that requires some desktop features (file access, notifications) but the same functionality as the web application, and I'm proposing that the development happens in Node Webkit.

The important criteria here for me is that both applications are 90% the same, the desktop just adds things you don't normally have on the web. So the core of the application is exactly the same AngularJS application, with some JavaScript injected by the Node Webkit startup page to add the required desktop behaviour.

0
votes

You haven't presented reasons why you think node-webkit is not a suitable option for desktop application.

On the other hand I think client's opinion that development in node and node-webkit will be able to cut down costs is not ungrounded.

nw.js (formerly node-webkit) is basically a Chromium browser with intergrated node.js engine. So if you develop a web-application using node.js (and any of its frameworks) then you will be able to reuse it in nw.js fairly easy.