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.
Node.js is great at times, but in some ways it’s a real pain in the ass.
Sure, it can create WebSocket servers, and it seems to be on the cutting edge of everything, but try to update an array of objects in a database then output a message and you’re in trouble.
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?
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.