Tag: Server Side

ECMAScript 6 has been Approved

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

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

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

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