HTML Desktop app with Node.JS + Socket.IO

Asked

Viewed 969 times

8

I need to develop an HTML-based chat app that connects to a Node.JS server that is running with Socket.IO.

I even developed much of the app using Tidesdk, but at the time of the integration to call the Socket script.IO the app did not load, due to Tidesdk problems.

I have tried the Node-Webkit, but the Webkit notifications didn’t work and I’m not sure if there is support for Socket.IO.

Someone has a platform suggestion for developing an HTML desktop app?

  • 1

    Related, almost duplicate (but your question is more specific): http://answall.com/questions/1676/como-packagingr-e-distribuir-um-system-web

  • Have you ever tried to "shell" your app using Adobe AIR? In the past I used with webview, from version 8 it is possible to use this native resource. If you don’t have official support for something in HTML, you can create Wrappers, it also supports Notifications, but needs wrapper.

  • 1

    @Gabrielgartz, I opted at the time for Tidesdk to have Linux support, as far as I can remember, AIR for Linux was discontinued. Since last year they talk about Tidekit (https://www.tidekit.com/) which would be an evolution of Tidesdk and which would support Socket.IO and even mobile apps. But to this day they have not released it.

  • Very interesting, I used Air in the past on linux, but I confess that it was a junk install. I didn’t know about this evolution for Tidesdk, until I looked for some project like a Chrome Trademark for this, but I didn’t think, I really hope someone finds and answer your question, because it would be useful for me too.

  • @Gabrielgartz, I had an idea a few minutes ago, may not be the best solution, but it’s still a solution: Google Chrome Apps.

  • So, I’ve done Xtensions for Chrome, it’s similar to Apps, but it requires the user to have google Chrome installed, I thought you were looking for a standalone and installable solution.

  • Yeah, working that way is really kind of boring by requiring Google Chrome.

  • @Tomazio, you say you developed the App using Tidesdk and report having had a problem with Socket IO integration but don’t say what this problem was. Integration depends on the Socket IO transport protocol and method that accepts several different types. Can you post a simple proof of concept demonstrating where the problem occurs ? Perhaps the problem is in the proper transport configuration.

  • @Joãoparaná, it loaded the JS scripts before loading the JS from Socket.IO, but with Node-Webkit this problem did not occur.

  • OK @Tomazio working on the Load Assincrono paradigm has these problems. You should pay special attention to these race-conditions in your code. Try using Socket IO Events to inform you that your code can be Loaded safely. This will always work.

Show 5 more comments

2 answers

1

1

It’s really a problem to be a web application?

See: Node.js was made for the web. Html5 is being developed to improve web applications. While Html5 is not fully equivalent to the potential of a well-made desktop application, it is sufficient for most cases.

I don’t want to give an opinion here, I want to give a solution. Node.js is a platform for development web. If you don’t want to use the web, you can risk creating Wrappers for GTK or Wxwidgets, supported by C++, for example. (If you don’t know, Node.js natively supports add-ons made in C++)

Keep in mind that if you use Node.js, your application will be web. You can "pretend" it is desktop for your clients, but in the background Node.js is web.

If your client does not have network access, you can create a package that installs and configures (if necessary) your application next to the Node on your machine (or you can install it yourself if you do not want to venture into creating installers). Then, creating a shortcut to open the browser in your application will not be a problem.

If your client has access and is willing to pay for your hosting, you can host your application on a cloud server. There are already Node servers of good price and quality nowadays.

One last point: If you don’t want to support all browsers (supporting all versions of IE has always been a problem), you don’t need to. Ask the customer to install a free browser like Google Chrome or Firefox. This shouldn’t bother your customer. All desktop applications depend on an installer: management systems, office applications, games, even extensions for desktop applications depend on an installation. Why can’t your app depend on one, too?

  • my backend is already all in Node.JS + Socket.IO, the problem of migrating the web part to is the support of the "conversion" tools with Socket.IO.

  • I couldn’t understand what you meant by that comment. You can elaborate a little better so I can improve my answer?

  • André, the focus of my app is to be desktop, the web application I already have. My question is, migrate it 100% functional to desktop using HTML only.

  • If it’s to use HTML, why not use a browser? Well... if your application runs on Internet Explorer, one solution is to disguise it with an application .hta

  • Because I want it to run on as many devices as possible, Windows computers, Mac OS, Linux and even phones in the future. So I’m looking for a Tidesdk-like solution, I’m currently testing Node-Webkit.

  • If it runs on browsers, it runs on the amount of devices that support a browser (nowadays, I would say all). I still don’t understand what the problem is...

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.