Can I create a native windows desktop application using Node.js - node.js

So I have heard of http://appjs.com/ and http://electron.atom.io/, but what I want to know can I create a native application using node.js?
From my understanding any language can call WINAPI, and it is possible due to that it's just a question if somebody is willing to create a wrapper for them? ( And possibly create equivalents in Linux / OSX )
I just want to know if my understanding is correct.
Thanks in advance!

As mentioned in the comments, there are already modules that do this by interfacing with the Windows API.
You can try node-ffi as well, a module for loading DLLs.

Related

Using QLPreviewPanel with Electron

We are looking into migrating our Objc Application to an Electron one, since the native one is just a WebWrapper around a website already.
We are missing one important feature: the ability to use QuickLook to preview files.
We managed to wrap qlmanage (Quick Look Server debug and management tool) in a npm module (based on this older code) but this is not the same as using QLPreviewPanel.
qlmanage launches an app in the Dock, and can spawn multiple instances of it, unlike QLpreviewPanel.
Does anyone managed to use Quicklook properly with Electron?
Is it possible to create a npm module in C++ using the Foundation Framework from Apple, and then requiring this module from Electron?
Any insight would be greatly appreciated.
We ended up adding this feature directly in Electron.
This will be released soon on the BrowserWindow api, with the following method signature:
previewFile(path [,displayname])
This way everyone gets to use it!

Swift SQLite Linux/Ubuntu

Wanting to give Swift a try and cheaply as possible.
I'm running
Ubuntu 16.04
SQLite 3.11.0
Swift 3.0-dev
All is working, not pretty though, but I'm having a hell of a time connecting to SQLite within Swift.
Has anyone successfully connected and run a query against SQLite with this setup?
While I've seen a bunch of post for iOS solutions I'm not entirely sure these will work on Ubuntu. I wasn't sure if you could or needed to compile Objective-C on Ubuntu.
Since Objective-C as used on Apple's platforms is not well supported on Linux, I think a better approach might be to access the SQLite C API from Swift by either using a system module or bridging header. You might also want to wrap the SQLite API in a C library exposing a subset of the API that you need in a simplified form more suitable to be called from Swift. You would then invoke the wrapper by creating a system module for it (no system module is needed in this case for the SQLite API) or by using a bridging header.
The following may help:
Compile C code and expose it to Swift under Linux
Linking a C library and its supporting library in Swift (linux)

Steps to use Nodejs modules like assert and paralleljs with Titanium appcelerator

I want to use the assert and paralleljs modules in mobile apps developed with Titanium Appcelerator. If anyone has used these modules or similar to this, please help me to use these too.
Thanks in advance.
That would be great! The problem I think is that javascript (at least at it's current version) isn't multi-threaded. it's built to be event driven - and if you use event driven well, you can get pretty good performance. What paralleljs does is using web-workers which are not available in Titanium.
What you might be able to to is write some kind of webview that will run the work inside it and report back to Titanium.
Take a look at the following:
How to create multithreading in mobile sdk
Titanium Worker Thread Module
You'll have to test it and see if it's memory/performance efficient.

Conflict between OpenLDAP's libldap and Oracle's occi library

I'm writing a small tool to do some checks on the data from one Oracle database and on LDAP.
Thinking of performance I've decided to go with C/C++, therefore I'm using the open ldap library and the oracle occi library. Now putting together the wrappers for each library I noticed that functions from the ldap library fail if I link my program with the oracle library. Going further I see there are functions defined in the oracle library with the same name as they're defined in the openldap library.
Now I did not find much on web on this issue, some advise to link first with the ldap library but that doesn't do it, it doesn't fail on init() anymore but it doesn't go past connect().
I'm doing the developing on Linux (Ubuntu), and the libraries I use are all C.
Does anyone have any advice on this? There must be someone else that have had this issue.
Any thoughts are most welcomed.
Many thanks
Unless these functions are also API entry points you should be able to make it work by linking to both as shared libraries. Then each library will use its own version of the function and you don't get to see either version unless you call it yourself.
If the functions concerned are API entry points, i.e. LDAP APIs, there is something pretty odd going on.
You can resolve this issue by specifying "-lldap -llber" in linking stage.
Ensure that you have specified oracle libray at the end in the linking stage. ldap has dependency with liblber.

How to use not pure-JS (C++) Node.js modules in Cloud9IDE?

I am developing Node.js application in Cloud9IDE and I problem using module (like node-expat) in Cloud9IDE.
If it was pure-JavaScript module, there shouldn't be problem, but modules that compiles C++ code for interaction with NodeJS...
I wounder if there is possibility to use/run modules that compiles C++ code in Cloud9IDE. May be you have some experience with this?
Thanks for any feedback!
Cheers,
Milan
Right now Cloud9 IDE blocks binary node modules for security reasons. Right now there is now way to use them. We (the cloud9 team) are discussing ways to enable binary modules e.g. by whitelisting trusted ones.

Resources