Tag: Client Side

Making Desktop JavaScript Apps with node-webkit

Update: node-webkit is now called NW.js and uses io.js and Blink instead of Node.js and WebKit. All other information is still correct.

JavaScript can be run in a browser normally, on a server with Node.js, and on mobile devices with Cordova, but where else can we use JavaScript to program?

Well, plenty other places, but the last big place to write programs is the desktop and today I’m covering writing desktop JavaScript applications with node-webkit.

Continue reading

Releasing Frontend Libraries Via Bower

For a long time I’ve had a CSS and JavaScript library that I’ve maintained for my personal and professional projects. The CSS included UI components, like buttons and switches, and the JavaScript were ports of all the PHP functions I had written so I have the same functions client side that I had server side.

Recently I released these libraries under the banner of a larger project, MogulMVC.

Since releasing them on GitHub I’ve been able to install them in any project by just running a git clone or git pull in my CSS or JS directory, and this makes it very easy to keep them updated, but it was still lacking something.

Continue reading

AJAX vs WebSockets

I’m in the process of converting a web application from an Apache + PHP backend to Node.js. The application being converted is based heavily around real time interaction between users, so, it was a natural fit for WebSockets.

In fact the old application used a Node.js backend for WebSockets, but an Apache + PHP backend for everything else, including page generation and AJAX endpoints. This means every AJAX driven form had a PHP endpoint which performed a desired action and a WebSocket event listener waiting to broadcast the event to other users.

Having to recode this application from the ground up in a new asynchronous language presented an interesting question to me.

Why should I use AJAX when I have WebSockets?

Continue reading

Cross Browser Voice Recognition with PocketSphinx.js

For several months I have wanted a cross browser voice recognition system that doesn’t rely on a server, use browser plugins or extensions, or use external programs like Flash. Something that could continually listen for keywords and trigger functions when one is detected. I looked into the webkitSpeechRecognition() object in Chrome, but unfortunately that relies on Google servers and is only available in Chrome. I looked into building extensions and plugins for Firefox and Chrome that package CMU Sphinx, but that is not native code. I even got voice recognition working in Flash, but wasn’t happy because it didn’t work on my Android device.

After months of looking I have found one that fits the bill completely and is really awesome.

Continue reading