TagServer Side

ECMAScript 6 has been Approved

HTML5-Is-Recommended

In the last several days I have been planning for a multi week work trip to India. In fact I’m writing this on the plane to London as it is the first chance I have had to write anything recently.

ECMAScript 6 has been approved!

It was approved on the 18th of June and brings with it many amazing new features. I’m sure I will be writing more about this in the future.

I’ll be celebrating 2 days late and over the Atlantic, but I will be celebrating none the less.

Cordova and Session Cookies

As of Cordova 5.2.0 on Android 5.1 cookies are working.
I will be investigating other platforms, like iOS, soon.

I’ve talked many times about my love of Cordova. I like how I can use my existing knowledge and code to build a mobile application with additional abilities than a web application. While I know how to a write native Android application, I still prefer to do my initial prototyping and launch in Cordova.

I honestly like everything about Cordova aside from the fact that you can’t use cookie based sessions.

In this post I will show you how to do so in Express 4 using jQuery AJAX calls and some simple code.

Continue reading

A Break Up Letter to PHP

A-Break-Up-Letter-to-PHP

Dear PHP,

I’m sure you noticed that I have been a bit distant lately. Our relationship hasn’t been functioning as well as it used to and I don’t know which one of us is to blame.

Continue reading

Node.js Best Practices

I’ve recently been working on a lot of Node.js projects, for myself, with my students, and for national organizations. Because I’m a University instructor I’ve been getting a lot of questions about what the best practices for Node.js are from every project I’m involved with. I’ve worked with Node.js for years and know all the best practices myself, but I had never seen a list that explained the best practices to my satisfaction. So, I have put one together taking all the best practices agreed on by the community and explaining why each practice is the best way to write Node.js code.

If you want to improve these best practices in any way please don’t hesitate to create a pull request to the GitHub repo.

Here we go.

Continue reading

Microsoft has Actually Made a Great Product, TypeScript

Microsoft has Actually Made a Great Product TypeScript

I’m fairly vocal about my opinion of Microsoft products. They have never made a single that is better than the competition, except maybe C#, but only maybe.

IE vs Safari vs Opera vs Chrome vs Firefox: Chrome or Firefox win

Office vs iWork vs LibreOffice = iWork wins

Windows vs OS X vs Linux = Linux wins with OS X a close second

However, they have finally made a product that is I would use over the competition, and most developers I talk to agree.

Continue reading

Making Server JavaScript Apps with Node.js

Making Server JavaScript Apps with Node.js

JavaScript used to be used only within the browser. But nowadays JavaScript can be used pretty much anywhere programming is supported. It can be used in a browser, server, mobile device, and even desktop.

I’m going to write about building JavaScript applications for mobile devices and desktops in future posts. Today I will discuss how to make server applications in JavaScript.

Continue reading

SSH Login Without Password

SSH Login Without Password

Have you ever wanted to login to your servers via SSH without using a password?

Here is a very short explanation of how to do it.

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