"A Stroll Through Node..."

Today's Web Wednesday series is from Steven Edouard who's been blogging about a number of fun things like a cloud-connected doorbell, Video: SmartDoor, the World’s first Cloud-connected DoorBell and a BART Win.JS app, BartNOW: A WinJS Web App for Subway Trains.

Today's series from Steven is  A Stroll Through Node...

A Stroll Through Node

A Stroll Through Node’ is a series of 4 posts to get you up and running with Node.js and Express websites. This is a really fun series of hands-on labs and walkthroughs which will get you through creating a basic server to a real-time communication website and even utilize a facial recognition API! All these posts use the Node Tools for Visual Studio found here. These tools make debugging and deploying the cloud easier but you certainly do not need Visual Studio for these walk-throughs. You can easily follow along on your Linux/Unix/Mac machine as well. All content posted is open sourced and you can feel free to fork and reuse the code as you’d like. A Stroll Through Node Series:

A Stroll Through Node: Introduction

This walk through will take you through the basics of creating a Node.js server and asynchronous programming in Node.

Note: This walkthrough uses Node tools for Visual Studio which is free and can be found here. You don’t need Visual Studio and you can do all the steps on any machine (mac,windows,Linux) by installing node here.

The full source code repository on github can be found here.

Objective

After the end of this lab, you will know:

1. What Node.js is
2. How to create a basic Node.js application
3. How to create a basic web server
4. Asynchronous programming using callbacks

What is Node.js?

Node.js is an asynchronous Input/Output (I/O) engine optimized for server applications and focuses on driving as much throughput as possible in the application. Throughput can be thought of as the measure of how much an application can process in a given time frame.

Node uses javascript, the same language that runs in web browsers to perform application logic. This creates a more familiar development environment for developing on the server side of a web applications.

...

A Stroll Through Node: Building a Recipes Website with Express, Jade and Bootstrap

Ever wanted to a create real website but don’t know anything about back-end programming? Are you still writing websites with raw HTML files? Try this guide out which uses the Express Web (3.x) framework, Jade HTML templates and Twitter-Bootstrap to make a Simple (and delicious) recipes website.

Note: This walkthrough uses Node tools for Visual Studio which is free and can be found here. Visual Studio is a free IDE which can help you create websites more easily. However, you don’t need Visual Studio for this guide and you can do all the steps on any machine (mac,windows,Linux) by installing node here and just using a text editor and the command line.

Objective

In this lab we will use Express to create Node Recipies a full fledged website which can scale to mobile browsers as well as to the desktop. By the end of this lab you will know

1. How to write html templates with jade
2. How to render a view with a jade template and a model using a route

Getting Started

To get started open up the StartProject/ExpressWebsite.sln in Visual Studio 2013. You will notice a few things different about this project than before.

...

A Stroll Through Node: Building a Real-time Communication App

This is the third post in the series, ‘A Stroll Through Node’.

Real-time communication is an exciting area of web development which utilizes a fairly young technology called Web Sockets. Web Sockets allow for direct communication from your client, often times a web browser to the server. Unlike HTTP, Web Sockets are real-time, that is the browser does not need to establish a connection for every message sent and it also does not need to solicit a message from the server. Instead a message can be received by the browser at any point by the server.

This rich communication has pros and cons. One major advantage is that it enables experiences such as live multiplayer game play or instant messaging. A disadvantage of web sockets is that they are much, much more expensive than an HTTP client. This is because a client holds a connection to the server for a long time which occupies more server memory.

In this walk-through we will use Express.io, a library that is a superset of Socket.io and Express to create a real-time chat application with chat rooms.

Note: This walkthrough uses Node tools for Visual Studio which is free and can be found here. Visual Studio is a free IDE which can help you create websites more easily. However, you don’t need Visual Studio for this guide and you can do all the steps on any machine (mac,windows,Linux) by installing node here and just using a text editor and the command line.

Objectives

At the end of this lab you will know:

1. The difference between Real-time communication vs HTTP communication
2. How to use Express.io and Socket.io javascript library to send and receive real-time messages
3. Using Express.io with Express to create a website that has real-time communication

...



Tags:

Follow the Discussion

No Comments

Sorry, no comments have been submitted yet.

Please make a comment below or check back later.

Comment on the Post

Already have a Channel 9 account? Please sign in