CategoryBrowser

Frontend Routing with Sammy.js

Frontend Routing with Sammy.js

Traditionally web applications were built using backend technology. A request is made to a server and based on the URL being requested the server responds by generating a resource, usually HTML.

To do this servers need to “route” requests to different resource generation logic. This logic is what backend developers build.

This worked well for many years, but as browsers became more advanced code started being moved from the backend to the frontend.

Continue reading

Untrusted is a Really Fun Programming Game

Untrusted is a Really Fun Programming Game

I’m normally not a fan of gamification. It feels like the person trying to teach me thinks I am incapable of learning and needs to trick me into it. However, I just discovered a great programming game that teaches you creative problem solving.

AND IT’S FUN!

Continue reading

Personal Cloud Drive with ownCloud

Personal Cloud Drive with ownCloud

If you’ve ever used Dropbox or Google Drive you know what cloud based storage is. It’s a harddrive located somewhere on the internet for you to store and share your files.

But what if you have terabytes of files, or a preexisting server infrastructure at your work or house? Are those solutions really the best? Is there a better self hosted solution?

There is and it’s called ownCloud.

Continue reading

Making Desktop JavaScript Apps with node-webkit

Making-Desktop-JavaScript-Apps-with-NodeWebkit

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

Making Mobile JavaScript Apps with Cordova

Making Mobile JavaScript Apps with Cordova

Last time I covered what Node.js is and briefly covered creating server side JavaScript applications with it. But as part of my recent desire to write everything in JavaScript I have also started writing mobile applications in JavaScript using Cordova.

I’ve written mobile applications in various technolgies and even have some on the Google Play Store, but I like writing mobile applications in Cordova more than other technology I’ve used, which are Java and Flex with Adobe AIR.

Continue reading

Chrome Keyword Detection with Annyang

Chrome Keyword Detection with Annyang

Recently I’ve been working a lot with continuous speech recognition and keyword detection in Google Chrome. Several months ago I found a really great library for streamlining is the process, a library called annyang.

Continue reading

Releasing Frontend Libraries Via Bower

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

The Good and Bad of WebSockets Over AJAX

The Good and Bad of WebSockets over AJAX

Since deciding to use WebSockets instead of AJAX calls with Node.js I have discovered some interesting things. Some of these things are good, and some are bad.

Continue reading

Asynchronous Loops in Node.js Are Driving Me Loopy

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.

Continue reading

AJAX vs WebSockets

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